salah-koulal / AirBnB_clone

Command interpreter for managing the AirBnB projects plus web static.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Alx School - AirBnB_clone

Air_BnB_clone logo

Description

This team project is part of the Holberton School Full-Stack 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 interpreter program built using the python module cmd. Contains to create, update, delete and print a class instance or all instaces created.

Helpful Links

Usage:

The console works both in interactive mode and non-interactive mode, much like a Unix shell. It prints a prompt (hbnb) and waits for the user for input.

Command Example
Run the console ./console.py
Quit the console (hbnb) quit
Display the help for a command (hbnb) help <command>
Create an object (prints its id) (hbnb) create <class>
Show an object (hbnb) show <class> <id> or (hbnb) <class>.show(<id>)
Destroy an object (hbnb) destroy <class> <id> or (hbnb) <class>.destroy(<id>)
Show all objects, or all instances of a class (hbnb) all or (hbnb) all <class>
Update an attribute of an object (hbnb) update <class> <id> <attribute name> "<attribute value>" or (hbnb) <class>.update(<id>, <attribute name>, "<attribute value>")

Your shell should work like this in interactive mode:

$ ./console.py
(hbnb) help

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

(hbnb) 
(hbnb) 
(hbnb) quit
$

But also in non-interactive mode: (like the Shell project in C)

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

Documented commands (type help <topic>):
========================================
EOF  help  quit
(hbnb) 
$
$ cat test_help
help
$
$ cat test_help | ./console.py
(hbnb)

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

Authors

About

Command interpreter for managing the AirBnB projects plus web static.


Languages

Language:HTML 46.1%Language:Python 33.2%Language:CSS 20.7%