Giter VIP home page Giter VIP logo

airbnbs_clonesix's Introduction

0x00. AirBnB clone - The console This is the first part of a project for Holberton School: AirBnB clone - The console. First step: Write a command interpreter to manage the AirBnB objects.

The command interpreter The command interpreter is currently capable of:

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 Installation git clone https://github.com/alejolo311/AirBnB_clone cd AirBnB_clone Usage Interactive Mode

$ ./console.py (hbnb) help

Documented commands (type help ):

EOF help quit

(hbnb) (hbnb) (hbnb) quit $ Non-Interactive Mode

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

Documented commands (type help ):

EOF help quit (hbnb) $ $ cat test_help help $ $ cat test_help | ./console.py (hbnb)

Documented commands (type help ):

EOF help quit (hbnb) $ Usage This interpreter has basic console commands such as help, quit, EOF, create, show, destroy, update, all and count.

Command Snytax and Usage: Command Syntax Output help help [option] Displays all available commands quit quit Exit command interpreter EOF EOF Exit command interpreter create create [class_name] or [class_name].create() Creates an instance of class_name update update [class_name] [object_id] [update_key] [update_value] or [class].update([object_id] [update_key] update_value Updates the key:value of class_name.object_id instance show show [class_name] [object_id] or [class_name].show([object_id])() Displays all attributes of class_name.object_id all all [class_name], [class_name].all() Displays every instance of class_name, if used without option displays every instance saved to the file destroy destroy [class_name] [object_id] or [class_name].destroy([object_id])() Deletes all attributes of class_name.object_id count count [class_name] or [class_name].count() Counts all the instances with class name specified Files File Name Description models/base_model.py Base Class with public instance attributes and methods models/amenity.py An Amenity class that inherits from BaseModel models/city.py A City class that inherits from BaseModel models/place.py A Place class that inherits from BaseModel models/review.py A Review class that inherits from BaseModel models/state.py A State class that inherits from BaseModel models/user.py A User class that inherits from BaseModel models/engine/file_storage.py A class that serializes instances to a JSON file and deserializes JSON file to instances tests/test_models/ Unittests for BaseModel, User, amenity, city, place, review, and state tests/test_models/test_engine/ Unittest for file storage Environment Language: Python3 OS: Ubuntu 14.04 LTS Style guidelines: PEP 8 (version 1.7) || Google Style Python Docstrings Authors Alejandro Lopez | GitHub | Jorge Chaux Jr | GitHub |

airbnbs_clonesix's People

Contributors

dot-eagle 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.