Giter Club home page Giter Club logo

holbertonschool-airbnb_clone's Introduction

In this project we will develop a simple copy of the AirBnB website, starting now until the end of the first year. In this first part we developed the console.


The console description

Command interpreter based in cmd to manipulate data without a visual interface, like in a Shell (perfect for development and debugging)

  • Create our data model
  • Manage (create, update, destroy, etc) objects via a console/command interpreter
  • Store and persist objects to a file (JSON file).

The first piece (the console) is to manipulate a powerful storage system. This storage engine will give us an abstraction between "My object" and "How they are stored and persisted". This means: from your console code (the command interpreter itself) and from the front-end and RestAPI you will build later.


Usage

./console.py

(hbnb) help

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

(hbnb)

(hbnb)

(hbnb) quit

$

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


How to use it

File Description Attributes
help Display all commands available help
create Creates new object create (class here)
update Updates attribute of an object User.update('123', {'name': 'Greg_n_Mel'})
all Display all objects in class user.all
show Retrieve an object from a file user.show
destroy Destroy specified object User.destroy('123')
quit Close the console quit

Models

File Description Attributes
base_model.py BaseModel class for all the sub-classes id, created_at, updated_at
user.py User class for user information. email, password, first_name, last_name
amenity.py Amenity class for information about amenities. name
city.py City class for information about the city. state_id, name
state.py State class for information about the state. name
place.py Place class for details of the AirBnB apartments for rent. city_id, user_id, name, description, number_rooms, number_bathrooms, max_guest, price_by_night, latitude, longitude, amenity_ids
review.py Review class for review information from the user/client. place_id, user_id, text

How to Install

Clone the repository in this link or copy the text bellow.

[email protected]:jegomezV/holbertonschool-AirBnB_clone.git

Testing

Unittests for the HolbertonBnB project are defined in the tests folder. To run the entire test suite simultaneously, execute the following command:

$ python3 unittest -m discover tests
$ python3 unittest -m tests/test_console.py

Authors

holbertonschool-airbnb_clone's People

Contributors

jegomezv avatar chrs-creyk 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.