Skip to content

aelabassi/AirBnB_clone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

0x00-AirBnB_clone

Welcome to the AirBnB clone project

First step: The command console to manage AirBnB objects

  • Create a parent class BaseModel (abstract?) to take care of initialization, serialization and deserialization
  • 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

Execution

Interactive mode:

$ ./console.py
(hbnb) help

Documented commands (type help <topic>):
========================================
EOF help quit 

(hbnb)
(hbnb)
(hbnb) quit
$

Non ineractive mode

$ echo "help" | ./console.py
(hbnb)

Documented commands (type help <topic>):
========================================
EOF help quit
(hbnb)
$
$ cat test_help
help
$
$ cat test_help | ./console.py
(hbnb)

Documented commands (type help <topic>):
========================================
EOF help quit
(hbnb)
$

All tests should also pass in non-interactive mode: $ echo "python3 -m unittest discover tests" | bash