Giter Club home page Giter Club logo

airbnb_clone's Introduction

		AirBnB Clone Project

Description

AirBnB is a web app with a full development of back-end and front-end API integrating also SQL storage This project is the part 1 of 4 in which the back-end console is created and deployed. This is an educational purposes clone from AirBnB

Classes

This projects uses the following classes:

BaseModel FileStorage User Amenity City Place Review State
Public instance attributes id
created_at
updated_at
Inherits BaseModel Inherits BaseModel Inherits BaseModel Inherits BaseModel Inherits BaseModel Inherits BaseModel
Public instance methods save
to_dict
all
new
save
reload
Public class attributes email
password
first_name
last_name
name _id
name
name city_id
user_id
name
description
_rooms
_bathrooms
max_guest
price
latitude
longitude
amenity_id
place_id
user_id
text
Private class attributes file_path
objects

Storage

The presented classes are stored in FileStorage class file. When the console is initialized, the console redirects an instance of FileStorage named storage. #Storage object is loaded or reloaded from any class instances stored in the JSON file file.json. Class instances are created, updated, or deleted and storage object registers changes intofile.json.

Console

The console is a CLI that allows the use of data as backend tool. It can be used to handle all classes predefined previously called into storage object.

How to Use the CLI non-interactive

To run the console in non-interactive mode:

$ echo "help" | ./console.py
(hbnb)
Documented commands (type help <topic>):
========================================
EOF  all  count  create  destroy  help  quit  show  update
(hbnb)
$
### How to Use the CLI interactive
To run the console in interactive mode:

run the file console.py:

$ ./console.py


Running in interactive mode, the console displays a prompt for input:

$ ./console.py (hbnb)


To quit the console, enter the command `quit`, or input an EOF signal
(`ctrl-D`).

$ ./console.py (hbnb) quit $


$ ./console.py (hbnb) EOF $

How to Test:

Unittests for the CLI AirBnB project are defined in the tests folder. To run the entire test suite simultaneously, execute the following command:

$ python3 unittest -m discover tests

Also, you can specify a single test file to run at a time:

$ python3 unittest -m tests/test_console.py

Authors:

Adava Onimisi <Adava Onimisi> Nnodim Obinna <Nnodim>

airbnb_clone's People

Contributors

nomynameisjames avatar nnodim avatar

Watchers

 avatar

Forkers

nnodim

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.