-
Project Overview:
- The repository contains the initial stage of a student project to build a clone of the Airbnb website.
- This stage implements a backend interface, or console, to manage program data.
- Console commands allow the user to create, update, and destroy objects, as well as manage file storage.
- Storage is persistent between sessions using a system of JSON serialization/deserialization.
-
Repository Contents by Project Task:
- Task 0: Authors/README File - AUTHORS
- Task 1: Pep8 - All code is pep8 compliant
- Task 2: Unit Testing - /tests
- Task 3: Make BaseModel - /models/base_model.py
- Task 4: Update BaseModel w/ kwargs - /models/base_model.py
- Task 5: Create FileStorage class - /models/engine/file_storage.py, /models/init.py, /models/base_model.py
- Task 6: Console 0.0.1 - console.py
- Task 7: Console 0.1 - console.py
- Task 8: Create User class - console.py, /models/engine/file_storage.py, /models/user.py
- Task 9: More Classes - /models/user.py, /models/place.py, /models/city.py, /models/amenity.py, /models/state.py, /models/review.py
- Task 10: Console 1.0 - console.py, /models/engine/file_storage.py
-
General Use:
- Clone the repository.
- Locate the "console.py" file and run it.
- The prompt "(hbnb)" indicates you are in the "HBnB" console.
- Various commands are available:
- create, destroy, show, all, update, quit
- Advanced syntax is available for some commands.
-
Examples:
-
Primary Command Syntax Examples:
- Creating an object:
create BaseModel
- Showing an object:
show BaseModel 3aa5babc-efb6-4041-bfe9-3cc9727588f8
- Destroying an object:
destroy BaseModel 3aa5babc-efb6-4041-bfe9-3cc9727588f8
- Updating an object:
update BaseModel b405fc64-9724-498f-b405-e4071c3d857f first_name "person"
- Creating an object:
-
Alternative Syntax Examples:
- Showing all User objects:
User.all()
- Destroying a User:
User.destroy("99f45908-1d17-46d1-9dd2-b7571128115b")
- Updating a User by attribute:
User.update("98bea5de-9cb0-4d78-8a9d-c4de03521c30", name "Todd the Toad")
- Updating a User by dictionary:
User.update("98bea5de-9cb0-4d78-8a9d-c4de03521c30", {'name': 'Fred the Frog', 'age': 9})
- Showing all User objects:
-
airbnb_clone_v2's Introduction
airbnb_clone_v2's People
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.