Git Product home page Git Product logo

airbnb_clone's Introduction

0x00 AirBnB Clone

hbnb logo First project in the AirBnB clone series is about laying the framework for a simple AirBnB clone.
We have created some base classes for recieving, serializing and deserializtion of information along with creating a console using Class cmd for added control of handling the information.

Environment

Creation and testing-

  • Ubuntu 14.04.5 LTS
  • Vagrant VirtualBox
  • Python 3
  • PEP8 styling

Repository Contents

Directories and Classes

Directory Class Description
Model BaseModel Defines all common attributes/methods for other classes
Amenity Defines amenities available
City Defines state id and name of the city
Place Defines attributes like price by night, city id, number of rooms etc
Review Defines attributes like place id, user id and text description
State Defines state name
User Defines user attributes like email, password, first and last names
model/engine FileStorage Class to create, save and reload instances
console HBNBCommand Inherited from class cmd that will create, show, destroy, update and print instances
tests/test_models Test_Amenity Testing methods in amenity
TestBaseModel Testing methods in BaseModel class
TestCityModel Testing class city attributes in BaseModel class
TestPlaceModel Testing class city attributes in BaseModel class
TestReviewModel Unittest cases for review class
TestStateModel Unittest for cases of state class
TestUserModel Unittest for cases of User class
tests/test_models/engine TestFileStorage Unittests to test File storage class

Installation

This repository can be clones using the git provided url:
$ git clone https://github.com/eightlimbed/AirBnB_clone.git\

Console

The console is used to create, update, destroy and print instances of the classes.\

To start the console:
~/AirBnB_clone$ ./console

Example of use:

AirBnB_clone$ ./console.py
(hbnb) create BaseModel
c93ddfb5-f80c-4a70-bd9a-6c922e384a46
(hbnb) show BaseModel 7872aba3-eae1-4b93-a0c1-8932c96183e0
[BaseModel] (7872aba3-eae1-4b93-a0c1-8932c96183e0) {'id': '7872aba3-eae1-4b93-a0c1-8932c96183e0', 'created_at': datetime.datetime(2018, 2, 15, 1, 0, 42, 625486), 'updated_at': datetime.datetime(2018, 2, 15, 1, 0, 42, 625516)}
(hbnb) create
** class name missing **
(hbnb) show BaseModel
** instance id missing **

Testing

The code can be tested using unittest in the tests directory by using the following command- AirBnB_clone$ python3 -m unittest discover tests

Bugs

This program is the embodiment of perfection. So no bugs.

Credit

Lee Gaines - Github || Twitter

Sue Kalia - Github || Twitter

airbnb_clone's People

Contributors

adp-airflow-team-a avatar vkalia602 avatar

Watchers

James Cloos avatar  avatar

Forkers

vkalia602

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.