{"id":24462330,"url":"https://github.com/tsohledev/airbnb_clone_v2","last_synced_at":"2026-01-02T13:13:53.150Z","repository":{"id":226985627,"uuid":"770101777","full_name":"tsohleDev/AirBnB_clone_v2","owner":"tsohleDev","description":"AirBnB clone fullstack and devops","archived":false,"fork":false,"pushed_at":"2024-08-21T15:49:52.000Z","size":1300,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-21T04:32:20.764Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tsohleDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-03-10T22:56:02.000Z","updated_at":"2024-08-21T15:49:56.000Z","dependencies_parsed_at":"2024-03-25T02:51:59.268Z","dependency_job_id":"f9bb2dec-8278-4197-a9ea-76adccf5c564","html_url":"https://github.com/tsohleDev/AirBnB_clone_v2","commit_stats":null,"previous_names":["tsohledev/airbnb_clone_v2"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsohleDev%2FAirBnB_clone_v2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsohleDev%2FAirBnB_clone_v2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsohleDev%2FAirBnB_clone_v2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsohleDev%2FAirBnB_clone_v2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tsohleDev","download_url":"https://codeload.github.com/tsohleDev/AirBnB_clone_v2/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243559885,"owners_count":20310813,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2025-01-21T04:32:13.645Z","updated_at":"2026-01-02T13:13:53.090Z","avatar_url":"https://github.com/tsohleDev.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ccenter\u003e \u003ch1\u003eHBNB - The Console\u003c/h1\u003e \u003c/center\u003e\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/justinmajetich/AirBnB_clone/blob/dev/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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsohledev%2Fairbnb_clone_v2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftsohledev%2Fairbnb_clone_v2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsohledev%2Fairbnb_clone_v2/lists"}