Giter VIP home page Giter VIP logo

airbnb_clone's Introduction

0x00.AirBnB Clone - The Console

Functionalities of this command interpreter:

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

Environment

This project is interpreted/tested on Ubuntu 20.04 LTS using python3 (version 3.8.5)

Installation

  • Clone this repository: git clone "https://github.com/habu27/AirBnB_clone.git"
  • Access AirBnb directory: cd AirBnB_clone
  • Run hbnb(interactively): ./console and enter command
  • Run hbnb(non-interactively): echo "" | ./console.py

Description

This team project is part of 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 for data management,and the base classes for the storage of this 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
Create object (prints its id) (hbnb) create )
Destroy object (hbnb) destroy or (hbnb) .destroy()
Show object (hbnb) show or (hbnb) .show()
Show "all" objects or instances class (hbnb) all or (hbnb) all
Run console ./console.py
Quit console (hbnb)quit

Help command example

(hbnb) help

Documented commands (type help ):

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 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_rooms, number_bathrooms, max_guest,
price_by_night, latitude, longitude, amenity_ids
review.py Review class stores previous customer reviews place_id, user_id, text
and opinions
amenity.py Amenity class stores highlighted amenity name
information

Tests

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

Authors

airbnb_clone's People

Contributors

habu27 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.