Skip to content

This is the first step towards building the full web application: 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

Notifications You must be signed in to change notification settings

Tom-254/AirBnB_clone

Repository files navigation

AirBnB clone - The console

Description

This team project is part of the AlX Software Engineer program. It's the first step towards building a first full web application: an AirBnB clone. This first step consists of a custom command-line interface simulating data management, and the base classes for the storage of data.

Console and Command Usage

The console is a Unix shell-like command line user interface provided by the python CmdModule It prints a prompt and waits for the user for input, for our project we used (hbnb)

Command Example
Display commands help (hbnb) help <command>
Create object (prints its id) (hbnb) create <class>
Destroy object (hbnb) destroy <class> <id> or (hbnb) <class>.destroy(<id>)
Show object (hbnb) show <class> <id> or (hbnb) <class>.show(<id>)
Show "all" objects or instances class (hbnb) all or (hbnb) all <class>
Run console ./console.py
Quit console (hbnb) quit

Help command example

(hbnb) help

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

Class Models Used

File Description Attributes
base_model.py The BaseModel class is inherited by other classes id, created_at, updated_at
user.py User class stores user-related info email, password, first_name, last_name
city.py City class stores city-specific information state_id, name
state.py State class stores state-specific information name
place.py Place class stores full detailed outline of rental unit features city_id, user_id, name, description, number_rooms, number_bathrooms, max_guest, price_by_night, latitude, longitude, amenity_ids
review.py Review class stores previous customer reviews and opinions place_id, user_id, text
amenity.py Amenity class stores highlighted amenity information name

Tests

All the code is tested with the unittest module. The test for the classes are in the test_models folder.

Authors

About

This is the first step towards building the full web application: 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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published