logo

0x00. AirBnB clone - The console

Description

First step: Write a command interpreter to manage your AirBnB objects.
This is the first step towards building your first full web application: the AirBnB clone. This first step is very important because you will use what you build during this project with all other following projects: HTML/CSS templating, database storage, API, front-end integration…

Each task is linked and will help you to:

put in place a parent class (called BaseModel) to take care of the initialization, serialization and deserialization of your future instances
create a simple flow of serialization/deserialization: Instance <-> Dictionary <-> JSON string <-> file
create all classes used for AirBnB (User, State, City, Place…) that inherit from BaseModel
create the first abstracted storage engine of the project: File storage.
create all unittests to validate all our classes and storage engine

Installation

If you want to run the command interpreter follow the next steps:

  1. Access AirBnB_clone directory: cd AirBnB_clone

  2. Run: ./console.py

Usage Examples

Interactive Mode

carbon (2)

carbon (3)

Non-Interactive Mode

carbon (6)

console commands

- quit - Exit the program.
- EOF - Exit the program.
- help - Gives a little description of a command.
- create - Creates a new instance.
- show - Prints the string representation of an instance based on the class name and id.
- detroy - Deletes an instance based on the class name and id.
- all - Prints all string representation of all instances based or not on the class name.
- update - Updates an instance based on the class name and id by adding or updating attribute.

exercises.

implementation and creation of AirBnB clone - The console. 

the project has 10 exercises

0. README, AUTHORS
1. Be Pycodestyle compliant!
2. Unittests
3. BaseModel
4. Create BaseModel from dictionary
5. Store first object
6. Console 0.0.1
7. Console 0.1
8. First User
9. More classes!
10. Console 1.0

Authors

* Maycol David Roa [@maycolroa](https://github.com/maycolroa)
* Pablo Osorio [@PabloOsorix](https://github.com/PabloOsorix)