Skip to content

luzperdomo92/AirBnB_clone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

99 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AirBnB clone - The console

This repository is the first step of the simple copy of the AirBnB website. This project is about a command interpreter to manipulate data without a visual interface, like in a Shell (perfect for development and debugging)

The Console objective :

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

Getting started

  1. Clone all the repository in your terminal.
$ git@github.com:luzperdomo92/AirBnB_clone.git
  1. Execute the program.
./console

You should see something like this:

(hbnb)

Note: There are other way to run the program, in non-interactive mode by simply piping the commands into the shell executable.

$ echo "help" | ./console.py

How used the console:

For run some command in the program, the syntax that you have to use is the same like a usual Shell.

($) <command> <class name> <id> <attribute name> "<attribute value>"

Example:

(hbnb) create BaseModel

or

(hbnb) update BaseModel 49faff9a-6318-451f-87b6-910505c55907 first_name "Betty"

Commands

This console support some commands:

  • create - Creates a new instance.
  • show - Prints the string representation of an instance.
  • destroy - Deletes an instance.
  • all - Prints all string representation of all instances.
  • update - Updates an instance based.

Standard commands:

  • quit - Exit the program
  • EOF - Exit the program (ctrl + d)
  • help - Shows whats a command do

Authors

  • Adonis Tejeda.
  • Luz A. Perdomo.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages