0x00. AirBnB clone - The console

What’s a command interpreter?

  1. Create a new object (ex: a new User or a new Place)
  2. Retrieve an object from a file, a database etc…
  3. Do operations on objects (count, compute stats, etc…)
  4. Update attributes of an object
  5. Destroy an object

Learning Objectives

At the end of this project, you'd be able to explain to anyone, without the help of Google:

  1. How to create a Python package
  2. How to create a command interpreter in Python using the cmd module
  3. What is Unit testing and how to implement it in a large project
  4. How to serialize and deserialize a Class
  5. How to write and read a JSON file
  6. How to manage datetime
  7. What is an UUID
  8. What is *args and how to use it
  9. What is **kwargs and how to use it
  10. How to handle named arguments in a function

Execution

Your shell should work like this in interactive mode:

$ ./console.py

But also in non-interactive mode: (like the Shell project in C)

$ echo "help" | ./console.py $ cat test_help | ./console.py