{"id":28527528,"url":"https://github.com/peanuts-83/booking_back","last_synced_at":"2025-08-10T03:06:44.689Z","repository":{"id":255397092,"uuid":"849471903","full_name":"Peanuts-83/booking_back","owner":"Peanuts-83","description":"back-end part of booking app (python)","archived":false,"fork":false,"pushed_at":"2024-09-01T19:21:32.000Z","size":63,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-06T15:42:51.543Z","etag":null,"topics":["fastapi","mariadb","pydantic","python","sqlalchemy","starlette","uvicorn"],"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/Peanuts-83.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":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-29T16:52:22.000Z","updated_at":"2025-05-09T06:48:55.000Z","dependencies_parsed_at":"2024-08-29T19:22:38.351Z","dependency_job_id":null,"html_url":"https://github.com/Peanuts-83/booking_back","commit_stats":null,"previous_names":["peanuts-83/booking_back"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Peanuts-83/booking_back","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Peanuts-83%2Fbooking_back","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Peanuts-83%2Fbooking_back/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Peanuts-83%2Fbooking_back/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Peanuts-83%2Fbooking_back/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Peanuts-83","download_url":"https://codeload.github.com/Peanuts-83/booking_back/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Peanuts-83%2Fbooking_back/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269668765,"owners_count":24456529,"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","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"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":["fastapi","mariadb","pydantic","python","sqlalchemy","starlette","uvicorn"],"created_at":"2025-06-09T12:13:49.374Z","updated_at":"2025-08-10T03:06:44.668Z","avatar_url":"https://github.com/Peanuts-83.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![FastApi](https://img.shields.io/badge/PythonBackEnd-FastApi-info?logo=fastapi\u0026logoColor=white\u0026color=009688)](https://fastapi.tiangolo.com/)\n[![Pydantic](https://img.shields.io/badge/DataValidation-Pydantic-info?logo=pydantic\u0026logoColor=white\u0026color=E92063)](https://docs.pydantic.dev/latest/)\n[![Uvicorn](https://img.shields.io/badge/ASGIWebServer-Uvicorn-info?logo=gunicorn\u0026logoColor=white\u0026color=499848)](https://www.uvicorn.org/)\n[![Starlette](https://img.shields.io/badge/ASGIWebServer-Starlette-info?logo=\u0026logoColor=white\u0026color=4285F5)](https://www.starlette.io/)\n[![SQLAlchemy](https://img.shields.io/badge/ORM-SQLAlchemy-info?logo=sqlalchemy\u0026logoColor=white\u0026color=D71F00)](https://docs.pydantic.dev/latest/)\n[![MariaDB](https://img.shields.io/badge/Database-MariaDB-info?logo=mariadb\u0026logoColor=white\u0026color=003545)](https://mariadb.org/)\n\n\n# Booking back-end - FastApi (python)\n\nBack-end part of Booking app project, using FastApi (python). This is an experimental managment application for hotel, with booking, invoice and customer modules.\n\nCommunicates with Front-end (angular) and database (mariadb).\n\nFinal project should be packed in a Docker public image in order to be displayed in containers anywhere required.\n\n## Setup procedure\n\n*requirements: [pip](https://pypi.org/) \u0026 [python](https://www.python.org/downloads/)*\n\n### Install new project from scratch\n\n* Find the right python env for your project. Mine is set up in conda\n    * Find the right env : ```conda env list```\n    * Activate it : ```conda activate my_env```\n* add files :\n    * requirements.txt (I prefer **pipreqs** to pip freeze that gets ALL packages in env)\n    * environment.yml\n    * main.py\n\n```bash\npip install \"fastapi[all]\" databases aiomysql sqlalchemy\npipreqs .\n```\n\n### Install requirements for this project\n\nAs development is going on, requirements file is increasing. Please note above install commands are only the less required for startup.\n\n```bash\npip install -r requirements.txt\n```\n\n### Setup database\n\n*requirements: [Docker](https://docs.docker.com/get-started/get-docker/)*\n\nYou can use bash script file **generator.sh** to create a container based on mariadb:latest Docker image. Just one line to make it come to life, that simple!\n\n```bash\n./generator.sh --mariadb\n# OR\n./generator.sh -m\n\n# mariadb is served at 192.168.168.2:3306\n# connect and use password 'myuserpassword' at prompt\nmysql -h 192.168.168.2 -u myuser -p\n```\n\nCredentials and connection procedure are given at the end of the process. Feel free to update login and password for securizing your database.\n\nI used [mockaroo.com](http://www.mockaroo.com) to fill the database **mydatabase** with tables and mocked data.\n\n*Next coming soon : database already filled with tables and data in a Docker image - working on it!*\n\n* db: mydatabase\n* tables:\n    * booking\n    * comment\n    * customer\n    * invoice\n    * room\n\n## Run project\n\nNavigate to the directory where your main.py file is located (remember python path is done by '.' and not '/') and run:\n\n```bash\nuvicorn src.main.main:app --reload\n```\n\n**--reload** option is a watch mode that reloads app at each change in the source code.\n\nOnce served:\n\n* the app shall be available at: \u003chttp://localhost:8000/\u003e\n* **OpenApi documentation** (ex-OpenApi) is served at: \u003chttp://localhost:8000/docs\u003e\n* Redoc documentation is served at: \u003chttp://localhost:8000/redoc\u003e\n\n## Debug project\n\nYou shall find at root of global project **.vscode/launch.json** convenient configuration file to run vscode debugger - just click Play button in **Run \u0026 Debug** menu.\nThe same file is duplicated at root of this project (back-end part) with path modified, just in case you would work on this side of the project separatly.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeanuts-83%2Fbooking_back","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeanuts-83%2Fbooking_back","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeanuts-83%2Fbooking_back/lists"}