#0x02. AirBnB clone - MySQL Learning Objectives
At the end of this project, you are expected to be able to explain to anyone, without the help of Google:
General
What is Unit testing and how to implement it in a large project What is *args and how to use it What is **kwargs and how to use it How to handle named arguments in a function How to create a MySQL database How to create a MySQL user and grant it privileges What ORM means How to map a Python Class to a MySQL table How to handle 2 different storage engines with the same codebase How to use environment variables
This is the console /command interpreter for the Holberton Airbnb clone project. The console can be used to store objects in and retrieve objects from a JSON.
- BaseModel
- User
- State
- City
- Amenity
- Place
- Review
- create - create an object
- show - show an object (based on id)
- destroy - destroy an object
- all - show all objects, of one type or all types
- quit/EOF - quit the console
- help - see descriptions of commands
To start, navigate to the project folder and enter ./console.py
in the shell.
create <class name>
Ex:
create BaseModel
show <class name> <object id>
Ex:
show User my_id
destroy <class name> <object id>
Ex:
destroy Place my_place_id
all
or all <class name>
Ex:
all
or all State
quit
or EOF
help
or help <command>
Ex:
help
or help quit
Additionally, the console supports <class name>.<command>(<parameters>)
syntax.
Ex:
City.show(my_city_id)