{"id":21199002,"url":"https://github.com/kieled/fastapi-aiopika-boilerplate","last_synced_at":"2025-07-26T06:03:12.517Z","repository":{"id":151057701,"uuid":"623551287","full_name":"kieled/fastapi-aiopika-boilerplate","owner":"kieled","description":"FastAPI, SQLAlchemy, aio_pika, RabbitMQ and Docker boilerplate","archived":false,"fork":false,"pushed_at":"2023-04-04T19:36:43.000Z","size":31,"stargazers_count":25,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-13T20:02:23.245Z","etag":null,"topics":["aio-pika","async","asynchronous","boilerplate","docker","docker-compose","fastapi","python","rabbitmq","sqlalchemy"],"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/kieled.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":"2023-04-04T15:41:18.000Z","updated_at":"2025-03-14T14:39:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"92071bb8-7be5-4db1-a660-d92885bac1de","html_url":"https://github.com/kieled/fastapi-aiopika-boilerplate","commit_stats":null,"previous_names":["kieled/fastapi-aiopika-boilerplate"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kieled/fastapi-aiopika-boilerplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kieled%2Ffastapi-aiopika-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kieled%2Ffastapi-aiopika-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kieled%2Ffastapi-aiopika-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kieled%2Ffastapi-aiopika-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kieled","download_url":"https://codeload.github.com/kieled/fastapi-aiopika-boilerplate/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kieled%2Ffastapi-aiopika-boilerplate/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267127194,"owners_count":24039990,"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-07-26T02:00:08.937Z","response_time":62,"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":["aio-pika","async","asynchronous","boilerplate","docker","docker-compose","fastapi","python","rabbitmq","sqlalchemy"],"created_at":"2024-11-20T19:55:07.521Z","updated_at":"2025-07-26T06:03:12.386Z","avatar_url":"https://github.com/kieled.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch2 align=\"center\"\u003e:small_red_triangle: FastAPI, SQLAlchemy 2, aio_pika, RabbitMQ boilerplate :small_red_triangle:\u003c/h1\u003e\n\n![abstract rectangles colorful with ragged edges per (2)](https://user-images.githubusercontent.com/68655454/229900974-2cd4b9e5-01a4-475a-9df7-f545118e7887.jpg)\n\n\n### :heavy_check_mark: Features:\n\n1. [x] _Project fully async_\n2. [x] _SqlAlchemy async session_\n3. [x] _docker-compose and Dockerfiles_\n4. [x] _`RabbitConnection` class. Path: `src/config/rabbit_connection_py`_\n5. [x] _Base logging configuration_\n6. [x] _FastAPI Cors base configuration_\n7. [x] _FastAPI lifespan feature_\n8. [x] _Poetry package manager_\n9. [x] _Used hypercorn_\n10. [x] _Configurated default BaseSettings instance_\n11. [x] _PostgreSQL database and asyncpg driver used_\n\n\n### :lock: Dependencies:\n\n```python\npython = \"^3.11\"\nfastapi = \"^0.95.0\"\nhypercorn = \"^0.14.3\"\naio-pika = \"^9.0.5\"\nsqlalchemy = \"^2.0.8\"\nasyncpg = \"^0.27.0\"\n```\n\n### :checkered_flag: Setup\n\n1. _Install Docker if not installed_\n2. _Rename `.env.dev-example` to `.env.dev`_\n3. _Run `docker compose up -d --build` command_\n4. _Open `http://localhost:8000/docs` in your browser_\n\n\n### :label: Tips:\n\n* Logs you can find by path `src/logs`\n* Also you can run command `docker compose logs` to check logs\n* You can disable logging to the files by removing/commenting this code in the `consumer.py` and `main.py`:\n```python\nimport logging\n\nlogging.basicConfig(\n    level=logging.DEBUG,\n    format='%(asctime)s %(levelname)s %(message)s',\n    handlers=[\n        logging.FileHandler(\"logs/fastapi.log\"),\n        logging.StreamHandler()\n    ]\n)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkieled%2Ffastapi-aiopika-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkieled%2Ffastapi-aiopika-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkieled%2Ffastapi-aiopika-boilerplate/lists"}