Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/aelabassi/airbnb_clone

The AirBnB clone project
https://github.com/aelabassi/airbnb_clone

cmd flask html-css-javascript json python python-abc python-cmd python-oop restful-api sql webstatic

Last synced: about 1 month ago
JSON representation

The AirBnB clone project

Awesome Lists containing this project

README

        

# 0x00-AirBnB_clone

Welcome to the AirBnB clone project

First step: The command console to manage AirBnB objects

  • Create a parent class BaseModel (abstract?) to take care of initialization, serialization and deserialization
  • Create a simple flow of serialization/deserialization: Instance <-> Dictionary <-> JSON string <-> file
  • Create all classes used for AirBnB (User, State, City, Place…) that inherit from BaseModel
  • Create the first abstracted storage engine of the project: File storage.
  • Create all unittests to validate all our classes and storage engine

Execution

Interactive mode:

```
$ ./console.py
(hbnb) help

Documented commands (type help ):
========================================
EOF help quit

(hbnb)
(hbnb)
(hbnb) quit
$
```

Non ineractive 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)
$
```

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