Skip to content

Ronnie5562/alu-AirBnB_clone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

82 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

AirBnB clone - The console ๐Ÿ ๐Ÿ 

65f4a1dd9c51265f49d0

Description of the project

This project is a simple clone of the AirBnB website. The first stage implements a backend interface or console to manage program data(like shell). Console commands allow users to create, update, destroy objects, and manage file storage.

The console - tasks

  • Put in place a parent class (called BaseModel) to take care of the initialization, serialization and deserialization of 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

Description of the command interpreter

The command interpreter helps us to manage the objects of our project by:

  • Creating a new object (ex: a new User or a new Place)
  • Retrieving an object from a file, a database etcโ€ฆ
  • Doing operations on objects (count, compute stats, etcโ€ฆ)
  • Updating attributes of an object
  • Destroying an object

How to start the interpreter

./console.py
(hbnb) help

Documented commands (type help <topic>):
========================================
EOF  all  create  delete  destroy  exit  help  q  quit  show  update

(hbnb) 
(hbnb) 
(hbnb) quit

How to use the interpreter

Tests

To run all the tests execute the following command:

$ python3 -m unittest discover tests

You can also run a single test by specifying the test file:

$ python3 -m unittest tests/test_models/test_city.py

Authors

About

The AirBnB clone project ๐Ÿ ๐Ÿ 

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published