{"id":24875905,"url":"https://github.com/samuelsenerwa/airbnb_clone_v2","last_synced_at":"2026-05-01T10:31:48.799Z","repository":{"id":153515045,"uuid":"628468264","full_name":"samuelsenerwa/AirBnB_clone_v2","owner":"samuelsenerwa","description":null,"archived":false,"fork":false,"pushed_at":"2023-05-26T22:02:43.000Z","size":195,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T02:45:25.381Z","etag":null,"topics":["flask","python","sql"],"latest_commit_sha":null,"homepage":"","language":"Python","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/samuelsenerwa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-16T03:15:07.000Z","updated_at":"2023-05-26T22:07:28.000Z","dependencies_parsed_at":"2023-07-25T19:32:15.320Z","dependency_job_id":null,"html_url":"https://github.com/samuelsenerwa/AirBnB_clone_v2","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/samuelsenerwa/AirBnB_clone_v2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuelsenerwa%2FAirBnB_clone_v2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuelsenerwa%2FAirBnB_clone_v2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuelsenerwa%2FAirBnB_clone_v2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuelsenerwa%2FAirBnB_clone_v2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samuelsenerwa","download_url":"https://codeload.github.com/samuelsenerwa/AirBnB_clone_v2/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuelsenerwa%2FAirBnB_clone_v2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32494270,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["flask","python","sql"],"created_at":"2025-02-01T08:18:25.820Z","updated_at":"2026-05-01T10:31:48.792Z","avatar_url":"https://github.com/samuelsenerwa.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AirBnB_clone_v2\n\n\nThis 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. Using a system of JSON serialization/deserialization, storage is persistent between sessions.\n\n---\n\n\u003ccenter\u003e\u003ch3\u003eRepository Contents by Project Task\u003c/h3\u003e \u003c/center\u003e\n\n| Tasks | Files | Description |\n| ----- | ----- | ------ |\n| 0: Authors/README File | [AUTHORS](https://github.com/Lordwill1/AirBnB_clone_v2/blob/master/AUTHORS) | Project authors |\n| 1: Pep8 | N/A | All code is pep8 compliant|\n| 2: Unit Testing | [/tests](https://github.com/justinmajetich/AirBnB_clone/tree/dev/tests) | All class-defining modules are unittested |\n| 3. Make BaseModel | [/models/base_model.py](https://github.com/justinmajetich/AirBnB_clone/blob/dev/models/base_model.py) | Defines a parent class to be inherited by all model classes|\n| 4. Update BaseModel w/ kwargs | [/models/base_model.py](https://github.com/justinmajetich/AirBnB_clone/blob/dev/models/base_model.py) | Add functionality to recreate an instance of a class from a dictionary representation|\n| 5. Create FileStorage class | [/models/engine/file_storage.py](https://github.com/justinmajetich/AirBnB_clone/blob/dev/models/engine/file_storage.py) [/models/_ _init_ _.py](https://github.com/justinmajetich/AirBnB_clone/blob/dev/models/__init__.py) [/models/base_model.py](https://github.com/justinmajetich/AirBnB_clone/blob/dev/models/base_model.py) | Defines a class to manage persistent file storage system|\n| 6. Console 0.0.1 | [console.py](https://github.com/justinmajetich/AirBnB_clone/blob/dev/console.py) | Add basic functionality to console program, allowing it to quit, handle empty lines and ^D |\n| 7. Console 0.1 | [console.py](https://github.com/justinmajetich/AirBnB_clone/blob/dev/console.py) | Update the console with methods allowing the user to create, destroy, show, and update stored data |\n| 8. Create User class | [console.py](https://github.com/justinmajetich/AirBnB_clone/blob/dev/console.py) [/models/engine/file_storage.py](https://github.com/justinmajetich/AirBnB_clone/blob/dev/models/engine/file_storage.py) [/models/user.py](https://github.com/justinmajetich/AirBnB_clone/blob/dev/models/user.py) | Dynamically implements a user class |\n| 9. More Classes | [/models/user.py](https://github.com/justinmajetich/AirBnB_clone/blob/dev/models/user.py) [/models/place.py](https://github.com/justinmajetich/AirBnB_clone/blob/dev/models/place.py) [/models/city.py](https://github.com/justinmajetich/AirBnB_clone/blob/dev/models/city.py) [/models/amenity.py](https://github.com/justinmajetich/AirBnB_clone/blob/dev/models/amenity.py) [/models/state.py](https://github.com/justinmajetich/AirBnB_clone/blob/dev/models/state.py) [/models/review.py](https://github.com/justinmajetich/AirBnB_clone/blob/dev/models/review.py) | Dynamically implements more classes |\n| 10. Console 1.0 | [console.py](https://github.com/justinmajetich/AirBnB_clone/blob/dev/console.py) [/models/engine/file_storage.py](https://github.com/justinmajetich/AirBnB_clone/blob/dev/models/engine/file_storage.py) | Update the console and file storage system to work dynamically with all  classes update file storage |\n\u003cbr\u003e\n\u003cbr\u003e\n\u003ccenter\u003e \u003ch2\u003eGeneral Use\u003c/h2\u003e \u003c/center\u003e\n\n1. First clone this repository.\n\n3. Once the repository is cloned locate the \"console.py\" file and run it as follows:\n```\n/AirBnB_clone$ ./console.py\n```\n4. When this command is run the following prompt should appear:\n```\n(hbnb)\n```\n5. This prompt designates you are in the \"HBnB\" console. There are a variety of commands available within the console program.\n\n##### Commands\n    * create - Creates an instance based on given class\n\n    * destroy - Destroys an object based on class and UUID\n\n    * show - Shows an object based on class and UUID\n\n    * all - Shows all objects the program has access to, or all objects of a given class\n\n    * update - Updates existing attributes an object based on class name and UUID\n\n    * quit - Exits the program (EOF will as well)\n\n\n##### Alternative Syntax\nUsers are able to issue a number of console command using an alternative syntax:\n\n\tUsage: \u003cclass_name\u003e.\u003ccommand\u003e([\u003cid\u003e[name_arg value_arg]|[kwargs]])\nAdvanced syntax is implemented for the following commands: \n\n    * all - Shows all objects the program has access to, or all objects of a given class\n\n\t* count - Return number of object instances by class\n\n    * show - Shows an object based on class and UUID\n\n\t* destroy - Destroys an object based on class and UUID\n\n    * update - Updates existing attributes an object based on class name and UUID\n\n\u003cbr\u003e\n\u003cbr\u003e\n\u003ccenter\u003e \u003ch2\u003eExamples\u003c/h2\u003e \u003c/center\u003e\n\u003ch3\u003ePrimary Command Syntax\u003c/h3\u003e\n\n###### Example 0: Create an object\nUsage: create \u003cclass_name\u003e\n```\n(hbnb) create BaseModel\n```\n```\n(hbnb) create BaseModel\n3aa5babc-efb6-4041-bfe9-3cc9727588f8\n(hbnb)                   \n```\n###### Example 1: Show an object\nUsage: show \u003cclass_name\u003e \u003c_id\u003e\n\n```\n(hbnb) show BaseModel 3aa5babc-efb6-4041-bfe9-3cc9727588f8\n[BaseModel] (3aa5babc-efb6-4041-bfe9-3cc9727588f8) {'id': '3aa5babc-efb6-4041-bfe9-3cc9727588f8', 'created_at': datetime.datetime(2020, 2, 18, 14, 21, 12, 96959), \n'updated_at': datetime.datetime(2020, 2, 18, 14, 21, 12, 96971)}\n(hbnb)  \n```\n###### Example 2: Destroy an object\nUsage: destroy \u003cclass_name\u003e \u003c_id\u003e\n```\n(hbnb) destroy BaseModel 3aa5babc-efb6-4041-bfe9-3cc9727588f8\n(hbnb) show BaseModel 3aa5babc-efb6-4041-bfe9-3cc9727588f8\n** no instance found **\n(hbnb)   \n```\n###### Example 3: Update an object\nUsage: update \u003cclass_name\u003e \u003c_id\u003e\n```\n(hbnb) update BaseModel b405fc64-9724-498f-b405-e4071c3d857f first_name \"person\"\n(hbnb) show BaseModel b405fc64-9724-498f-b405-e4071c3d857f\n[BaseModel] (b405fc64-9724-498f-b405-e4071c3d857f) {'id': 'b405fc64-9724-498f-b405-e4071c3d857f', 'created_at': datetime.datetime(2020, 2, 18, 14, 33, 45, 729889), \n'updated_at': datetime.datetime(2020, 2, 18, 14, 33, 45, 729907), 'first_name': 'person'}\n(hbnb)\n```\n\u003ch3\u003eAlternative Syntax\u003c/h3\u003e\n\n###### Example 0: Show all User objects\nUsage: \u003cclass_name\u003e.all()\n```\n(hbnb) User.all()\n[\"[User] (99f45908-1d17-46d1-9dd2-b7571128115b) {'updated_at': datetime.datetime(2020, 2, 19, 21, 47, 34, 92071), 'id': '99f45908-1d17-46d1-9dd2-b7571128115b', 'created_at': datetime.datetime(2020, 2, 19, 21, 47, 34, 92056)}\", \"[User] (98bea5de-9cb0-4d78-8a9d-c4de03521c30) {'updated_at': datetime.datetime(2020, 2, 19, 21, 47, 29, 134362), 'id': '98bea5de-9cb0-4d78-8a9d-c4de03521c30', 'created_at': datetime.datetime(2020, 2, 19, 21, 47, 29, 134343)}\"]\n```\n\n###### Example 1: Destroy a User\nUsage: \u003cclass_name\u003e.destroy(\u003c_id\u003e)\n```\n(hbnb) User.destroy(\"99f45908-1d17-46d1-9dd2-b7571128115b\")\n(hbnb)\n(hbnb) User.all()\n(hbnb) [\"[User] (98bea5de-9cb0-4d78-8a9d-c4de03521c30) {'updated_at': datetime.datetime(2020, 2, 19, 21, 47, 29, 134362), 'id': '98bea5de-9cb0-4d78-8a9d-c4de03521c30', 'created_at': datetime.datetime(2020, 2, 19, 21, 47, 29, 134343)}\"]\n```\n###### Example 2: Update User (by attribute)\nUsage: \u003cclass_name\u003e.update(\u003c_id\u003e, \u003cattribute_name\u003e, \u003cattribute_value\u003e)\n```\n(hbnb) User.update(\"98bea5de-9cb0-4d78-8a9d-c4de03521c30\", name \"Todd the Toad\")\n(hbnb)\n(hbnb) User.all()\n(hbnb) [\"[User] (98bea5de-9cb0-4d78-8a9d-c4de03521c30) {'updated_at': datetime.datetime(2020, 2, 19, 21, 47, 29, 134362), 'id': '98bea5de-9cb0-4d78-8a9d-c4de03521c30', 'name': 'Todd the Toad', 'created_at': datetime.datetime(2020, 2, 19, 21, 47, 29, 134343)}\"]\n```\n###### Example 3: Update User (by dictionary)\nUsage: \u003cclass_name\u003e.update(\u003c_id\u003e, \u003cdictionary\u003e)\n```\n(hbnb) User.update(\"98bea5de-9cb0-4d78-8a9d-c4de03521c30\", {'name': 'Fred the Frog', 'age': 9})\n(hbnb)\n(hbnb) User.all()\n(hbnb) [\"[User] (98bea5de-9cb0-4d78-8a9d-c4de03521c30) {'updated_at': datetime.datetime(2020, 2, 19, 21, 47, 29, 134362), 'name': 'Fred the Frog', 'age': 9, 'id': '98bea5de-9cb0-4d78-8a9d-c4de03521c30', 'created_at': datetime.datetime(2020, 2, 19, 21, 47, 29, 134343)}\"]\n```\n\u003cbr\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamuelsenerwa%2Fairbnb_clone_v2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamuelsenerwa%2Fairbnb_clone_v2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamuelsenerwa%2Fairbnb_clone_v2/lists"}