Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ndevu12/airbnb_clone
https://github.com/ndevu12/airbnb_clone
Last synced: 7 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/ndevu12/airbnb_clone
- Owner: Ndevu12
- Created: 2024-02-06T13:46:40.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-02-18T17:16:32.000Z (9 months ago)
- Last Synced: 2024-02-18T18:27:45.137Z (9 months ago)
- Language: Python
- Size: 115 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Authors: AUTHORS
Awesome Lists containing this project
README
# AirBnB Clone - The Console
## Project Goal
The primary goal of this project is to deploy a simplified version of the AirBnB website on a server. While not implementing all the features, it aims to cover fundamental concepts of the higher level programming track.
## First Step: Command Interpreter
The initial step involves building a command interpreter to manage AirBnB objects. This command interpreter is similar to a limited-use Shell, specifically tailored for our project's needs. It enables us to:
- Create new objects (e.g., User or Place)
- Retrieve objects from files or databases
- Perform operations on objects (count, compute stats, etc.)
- Update attributes of an object
- Destroy an object## Execution
The command interpreter can be used both interactively and non-interactively.
### Interactive Mode
```bash
$ ./console.py
(hbnb) helpDocumented commands (type help ):
========================================
EOF help quit(hbnb)
(hbnb)
(hbnb) quit
$
```
### Non-Interactive Mode
```bash$ 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)
$
```
## Commands- `create`: Create an object
- `show`: Show an object (based on id)
- `destroy`: Destroy an object
- `all`: Show all objects, of one type or all types
- `update`: Updates an instance based on the class name and id
- `quit/EOF`: Quit the console
- `help`: See descriptions of commands# Getting Started
To start the console, type the following command in the shell:
```bash
AirBnB_clone$ ./console.py
(hbnb)
```
# Object Management Commands## Create
To create an object, use the format `create `:
```bash
(hbnb) create BaseModel
```
## ShowTo show an instance based on the class name and id, use:
```bash
(hbnb) show BaseModel 1234-1234-1234.
```
## DestroyTo delete an instance of an object, use:
```bash
(hbnb) destroy BaseModel 1234-1234-1234.
```
## AllTo show all instances or all instances of a specific type, use:
```bash
(hbnb) all
(hbnb) all State
```## Update
To update an instance based on the class name and id, use:
```bash
(hbnb) update BaseModel 1234-1234-1234 email "[email protected]"
```## Quit
To exit the console, use:
```bash
(hbnb) quit
```## Help
To get help on commands, use:
```bash
(hbnb) help
(hbnb) help quit
```
# Supported Classes- BaseModel
- User
- State
- City
- Amenity
- Place
- Review# Authors
- `(Ndevu)` NIYOKWIZERWA Jean Paul Elisa - [email protected] `linkedIn` - http://linkedin.com/in/jean-paul-elisa
- Musah Adomah - [email protected]