GithubHelp home page GithubHelp logo

digreatbrian / airbnb_clone Goto Github PK

View Code? Open in Web Editor NEW

This project forked from misheckgalx/airbnb_clone

0.0 0.0 0.0 64 KB

The first repo of AirBnB

Shell 0.03% Python 23.11% CSS 22.49% HTML 54.37%

airbnb_clone's Introduction

AirBnB_clone - Console

Description of the project

The first part of this project involves simulating an Airbnb application by creating a control system for the modules used on our web page. We achieve this by implementing a JSON-format database and leveraging object-oriented programming, Python data translation, and command interpretation. The result is a local database that can be easily modified using specific commands, providing a flexible and efficient way to manage data.

Installation

git clone https://github.com/MisheckGalx/AirBnB_clone.git  
cd AirBnB_clone

Run

./console.py or python3 console.py

Testing

python3 -m unittest discover tests

Prerequisites

sudo apt-get install python3

Commands Explanation:

create - Creates a new instance of BaseModel, saves it (to the JSON file) and prints the id.
Example:

$ create BaseModel

show - Prints the string representation of an instance based on the class name and id.
Example:

$ show BaseModel 1234-1234-1234
$ BaseModel.show("<id>")

all - Prints all string representation of all instances based or not on the class name.
Example:

$ all BaseModel
$ all
$ BaseModel.all()

update - Updates an instance based on the class name and id by adding or updating attribute (save the change into the JSON file).
Example:

$ update BaseModel 1234-1234-1234 email "[email protected]"`
$ BaseModel.update("<id>", "<attribute>", "<value>")`
$ BaseModel.update("<id>", {"field1":"value1", "field2":int_value})

AUTHORS

Misheck Gogo
Brian Musakwa

airbnb_clone's People

Contributors

misheckgalx avatar digreatbrian avatar

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.