{"id":28339445,"url":"https://github.com/gejix/airbnb_clone","last_synced_at":"2026-01-27T01:33:57.545Z","repository":{"id":51794472,"uuid":"520623428","full_name":"Gejix/AirBnB_clone","owner":"Gejix","description":"AirBnB clone project 🦞","archived":false,"fork":false,"pushed_at":"2022-08-13T13:56:22.000Z","size":73,"stargazers_count":0,"open_issues_count":5,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-20T09:45:16.445Z","etag":null,"topics":["console"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Gejix.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-02T19:22:27.000Z","updated_at":"2022-08-13T13:54:17.000Z","dependencies_parsed_at":"2022-08-13T01:10:28.181Z","dependency_job_id":null,"html_url":"https://github.com/Gejix/AirBnB_clone","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Gejix/AirBnB_clone","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gejix%2FAirBnB_clone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gejix%2FAirBnB_clone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gejix%2FAirBnB_clone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gejix%2FAirBnB_clone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Gejix","download_url":"https://codeload.github.com/Gejix/AirBnB_clone/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gejix%2FAirBnB_clone/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28795468,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T01:07:07.743Z","status":"ssl_error","status_checked_at":"2026-01-27T01:07:06.974Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["console"],"created_at":"2025-05-27T01:27:46.828Z","updated_at":"2026-01-27T01:33:57.536Z","avatar_url":"https://github.com/Gejix.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://is5-ssl.mzstatic.com/image/thumb/Purple123/v4/fd/ac/b4/fdacb4f9-4c73-1ca6-5595-ef18f821ee62/AppIcon-0-0-1x_U007emarketing-0-0-0-7-0-0-sRGB-0-0-0-GLES2_U002c0-512MB-85-220-0-0.png/246x0w.png\"\u003e\n\u003cimg src=\"https://image.shutterstock.com/image-illustration/clone-icon-illustration-creative-sign-260nw-1497218057.jpg\"\u003e\n\n# 0x00 AirBnB clone - The console\n\nIn this directory you will find a implementation of a AirBnB clone.\nIn this first step is implemented the Console. Commands for create, update, destroy, show and manage diferent classes and attributes for the items that the app will be offer and for the users.\n\n### The console ###\n* create your data model\n* manage (create, update, destroy, etc) objects via a console / command interpreter\n* store and persist objects to a file (JSON file)\nThe first piece is to manipulate a powerful storage system. This storage engine will give us an abstraction between “My object” and “How they are stored and persisted”. This means: from your console code (the command interpreter itself) and from the front-end and RestAPI you will build later, you won’t have to pay attention (take care) of how your objects are stored.\nThis abstraction will also allow you to change the type of storage easily without updating all of your codebase.\nThe console will be a tool to validate this storage engine\n\n### Command interpreter ###\n\nOur command interpreter looks like a mini shell and allow us manage the objects of our project:\n\n* Create a new object (ex: a new User or a new Place)\n* Retrieve an object from a file, a database etc…\n* Do operations on objects (count, compute stats, etc…)\n* Update attributes of an object\n* Destroy an object\n\n### Objectives of project ###\n\n* How to create a Python package\n* How to create a command interpreter in Python using the cmd module\n* What is Unit testing and how to implement it in a large project\n* How to serialize and deserialize a Class\n* How to write and read a JSON file\n* How to manage datetime\n* What is an UUID\n* What is *args and how to use it\n* What is **kwargs and how to use it\n* How to handle named arguments in a function\n\n### Content of Directory ###\n* Models Folder: Classes of the project. BaseModel is the parent Class. The other classes (amenity, city, place, review, state, user) inherit from BaseModel and specify others attributes for itselfs.\n* Tests Folder : Unittests for the project\n* AUTHORS: Information about the authors\n* console.py: Eceutable file for the console\n* file.json: JSON file with all information of instances\n\n---\n\n## Table of Contents\n\n- [Examples and Usage](#ExamplesandUsage)\n- [Installation](#installation)\n- [Documentation](#documentation)\n- [Contributing](#contributing)\n- [Team](#team)\n- [Support](#support)\n- [License](#license)\n\n\n---\n\n## Examples of Usage\n\n### Execution ###\n```\n$ ./console.py\n(hbnb) help\n\nDocumented commands (type help \u003ctopic\u003e):\n========================================\nEOF  help  quit\n\n(hbnb) \n(hbnb) \n(hbnb) quit\n$\n```\n### create ###\nCreat an instance and show us the id number\n```\nvagrant@vagrant-ubuntu-trusty-64:~/AirBnB_clone$ ./console.py \n(hbnb) create BaseModel\ne37cf8df-351a-4df6-9d15-fd9331a5bfb2\n(hbnb) \n```\n\n### Show ###\nShow the Class, object if the id is especified and its attributes\n```\n(hbnb) show BaseModel e37cf8df-351a-4df6-9d15-fd9331a5bfb2\n[BaseModel] (e37cf8df-351a-4df6-9d15-fd9331a5bfb2) {'id': 'e37cf8df-351a-4df6-9d15-fd9331a5bfb2', 'created_at': datetime.datetime(2020, 7, 1, 18, 50, 15, 695895), 'updated_at': datetime.datetime(2020, 7, 1, 18, 50, 15, 695945)}\n(hbnb) \n```\n### all ###\nshows all the instances\n```\n(hbnb) all BaseModel\n[\"[BaseModel] (5c8ebd08-a708-4823-b9a2-29d58b87c063) {'id': '5c8ebd08-a708-4823-b9a2-29d58b87c063', 'created_at': datetime.datetime(2020, 7, 1, 5, 4, 54, 926171), 'updated_at': datetime.datetime(2020, 7, 1, 5, 4, 54, 926179)}\", \"[BaseModel] (e576e179-8bb6-4229-a8be-90585b0c1d01) {'id': 'e576e179-8bb6-4229-a8be-90585b0c1d01', 'created_at': datetime.datetime(2020, 7, 1, 5, 5, 38, 896687), 'updated_at': datetime.datetime(2020, 7, 1, 5, 5, 38, 896706)}\", \"[BaseModel] (0763761f-4534-4a02-8097-79a4ab935ecb) {'id': '0763761f-4534-4a02-8097-79a4ab935ecb', 'created_at': datetime.datetime(2020, 7, 1, 4, 8, 48, 451468), 'updated_at': datetime.datetime(2020, 7, 1, 4, 8, 48, 451881)}\", \"[BaseModel] (f794d1ba-6688-42b8-ae08-0b307125643a) {'id': 'f794d1ba-6688-42b8-ae08-0b307125643a', 'created_at': datetime.datetime(2020, 7, 1, 5, 4, 54, 922410), 'updated_at': datetime.datetime(2020, 7, 1, 5, 4, 54, 923071)}\", \"[BaseModel] (ef9b217c-b58c-4d5f-b797-0dbbed80dedd) {'id': 'ef9b217c-b58c-4d5f-b797-0dbbed80dedd', 'created_at': datetime.datetime(2020, 7, 1, 5, 4, 54, 930489), 'updated_at': datetime.datetime(2020, 7, 1, 5, 4, 54, 930504)}\", \"[BaseModel] (e37cf8df-351a-4df6-9d15-fd9331a5bfb2) {'id': 'e37cf8df-351a-4df6-9d15-fd9331a5bfb2', 'created_at': datetime.datetime(2020, 7, 1, 18, 50, 15, 695895), 'updated_at': datetime.datetime(2020, 7, 1, 18, 50, 15, 695945)}\", \"[BaseModel] (82f3d1a2-c28d-4327-be5f-0bceb29b0eb9) {'id': '82f3d1a2-c28d-4327-be5f-0bceb29b0eb9', 'created_at': datetime.datetime(2020, 7, 1, 5, 5, 38, 888932), 'updated_at': datetime.datetime(2020, 7, 1, 5, 5, 38, 889340)}\", \"[BaseModel] (e029daa8-9083-4097-b2bd-a66fe4895532) {'id': 'e029daa8-9083-4097-b2bd-a66fe4895532', 'created_at': datetime.datetime(2020, 7, 1, 5, 5, 38, 892554), 'updated_at': datetime.datetime(2020, 7, 1, 5, 5, 38, 892561)}\"\n(hbnb) \n```\n### update ###\nupdate an instance\n```\n(hbnb) show BaseModel e37cf8df-351a-4df6-9d15-fd9331a5bfb2\n[BaseModel] (e37cf8df-351a-4df6-9d15-fd9331a5bfb2) {'id': 'e37cf8df-351a-4df6-9d15-fd9331a5bfb2', 'created_at': datetime.datetime(2020, 7, 1, 18, 50, 15, 695895), 'updated_at': datetime.datetime(2020, 7, 1, 18, 50, 15, 695945)}\n(hbnb) update BaseModel e37cf8df-351a-4df6-9d15-fd9331a5bfb2 first_name \"CharlieMeco\"\n(hbnb) show BaseModel e37cf8df-351a-4df6-9d15-fd9331a5bfb2\n[BaseModel] (e37cf8df-351a-4df6-9d15-fd9331a5bfb2) {'first_name': '\"CharlieMeco\"', 'id': 'e37cf8df-351a-4df6-9d15-fd9331a5bfb2', 'created_at': datetime.datetime(2020, 7, 1, 18, 50, 15, 695895), 'updated_at': datetime.datetime(2020, 7, 1, 18, 50, 15, 695945)}\n(hbnb) \n```\n### Destroy ###\nDelete an instance\n```\n(hbnb) destroy BaseModel e37cf8df-351a-4df6-9d15-fd9331a5bfb2\n(hbnb) show BaseModel e37cf8df-351a-4df6-9d15-fd9331a5bfb2\n** no instance found **\n(hbnb) \n```\n---\n\n## Installation\n\n* Clone the repository. git clone https://github.com/Gejix/AirBnB_clone.git\n* Open the /AirBnB_clone directory and execute console.py\n\n### Setup\n\n* You need Python interpreter.\nIMPORTANT: The project was created in UBUNTU 14.04.3 LTS and Python 3.4.3.\n\n---\n\n## Documentation \n\n\u003ca href=\"https://intranet.hbtn.io/rltoken/Fx9HXIjmGzbmET4ylYg2Rw\"\u003e`cmd module`\u003c/a\u003e\u003cbr\u003e\n\u003ca href=\"https://intranet.hbtn.io/rltoken/jKl9WFpKA-fPt7_guv9_3Q\"\u003e`packages`\u003c/a\u003e\u003cbr\u003e\n\u003ca href=\"https://intranet.hbtn.io/rltoken/eaQ6aELbdqb0WmPddhD00g\"\u003e`uuid module`\u003c/a\u003e\u003cbr\u003e\n\u003ca href=\"https://intranet.hbtn.io/rltoken/_ySDcgtfrwLkTyQzYHTH0Q\"\u003e`datetime`\u003c/a\u003e\u003cbr\u003e\n\u003ca href=\"https://intranet.hbtn.io/rltoken/QX7d4D__xhOJIGIWZBp39g\"\u003e`unittest module`\u003c/a\u003e\u003cbr\u003e\n\u003ca href=\"https://intranet.hbtn.io/rltoken/jQd3P_uSO0FeU6jlN-z5mg\"\u003e`args/kwargs`\u003c/a\u003e\u003cbr\u003e\n\u003ca href=\"https://intranet.hbtn.io/rltoken/WPlydsqB0PG0uVcixemv9A\"\u003e`Python test cheatsheet`\u003c/a\u003e\u003cbr\u003e\n---\n\n## Contributing\n\n\u003e To get started...\n\n### Step 1\n\n- **Option 1**\n    - 🍴 Fork this repo!\n\n- **Option 2**\n    - 👯 Clone this repo to your local machine using \n\n### Step 2\n\n- **HACK AWAY!** 🔨🔨🔨\n\n### Step 3\n\n- 🔃 Create a new pull request using. \n---\n\n## Team\n\n- GitHub at \u003ca href=\"https://github.com/Gejix\"\u003e`Gejix`\u003c/a\u003e\n- GitHub at \u003ca href=\"https://github.com/Peacebern\"\u003e`Peacebern`\u003c/a\u003e\n\n\n---\n\n## License\n\nFree Source Code\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgejix%2Fairbnb_clone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgejix%2Fairbnb_clone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgejix%2Fairbnb_clone/lists"}