{"id":33237262,"url":"https://github.com/faststream-community/fastapi-dishka-faststream","last_synced_at":"2026-04-06T09:13:53.609Z","repository":{"id":239296568,"uuid":"770039164","full_name":"faststream-community/fastapi-dishka-faststream","owner":"faststream-community","description":"Template for app based on: FastAPI, dishka, faststream, sqlalchemy, pydantic","archived":false,"fork":false,"pushed_at":"2026-03-02T00:33:09.000Z","size":22,"stargazers_count":307,"open_issues_count":0,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-03-02T03:35:01.460Z","etag":null,"topics":["dishka","fastapi","faststream","pydantic","sqlalchemy"],"latest_commit_sha":null,"homepage":"","language":"Python","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/faststream-community.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":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-03-10T18:47:13.000Z","updated_at":"2026-03-02T00:33:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"3c3e518f-6d1b-4738-b039-febacb33d11a","html_url":"https://github.com/faststream-community/fastapi-dishka-faststream","commit_stats":null,"previous_names":["sehat1137/litestar-dishka-faststream","faststream-community/litestar-dishka-faststream","faststream-community/fastapi-dishka-faststream"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/faststream-community/fastapi-dishka-faststream","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faststream-community%2Ffastapi-dishka-faststream","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faststream-community%2Ffastapi-dishka-faststream/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faststream-community%2Ffastapi-dishka-faststream/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faststream-community%2Ffastapi-dishka-faststream/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/faststream-community","download_url":"https://codeload.github.com/faststream-community/fastapi-dishka-faststream/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faststream-community%2Ffastapi-dishka-faststream/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31466228,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-06T08:36:52.050Z","status":"ssl_error","status_checked_at":"2026-04-06T08:36:51.267Z","response_time":112,"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":["dishka","fastapi","faststream","pydantic","sqlalchemy"],"created_at":"2025-11-16T19:00:28.732Z","updated_at":"2026-04-06T09:13:53.604Z","avatar_url":"https://github.com/faststream-community.png","language":"Python","readme":"# FastAPI-Dishka-FastStream\n\n[![License - MIT](https://img.shields.io/badge/license-MIT-202235.svg?logo=python\u0026labelColor=202235\u0026color=edb641\u0026logoColor=edb641)](https://spdx.org/licenses/)\n[![FastAPI](https://img.shields.io/badge/FastAPI-009485.svg?logo=fastapi\u0026logoColor=white)](https://fastapi.tiangolo.com)\n[![FastStream](https://camo.githubusercontent.com/4bbf0095f52083ac1b693fdab68466f859b674aeef4bcb5c92fb0c087812dfc0/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f75726c3d68747470732533412532462532467261772e67697468756275736572636f6e74656e742e636f6d25324661673261692532466661737473747265616d2532466d61696e253246646f6373253246646f6373253246617373657473253246696d67253246736869656c642e6a736f6e)](https://faststream.ag2.ai/latest/)\n[![Dishka](https://img.shields.io/badge/Dishka-1.4.2+-green)](https://github.com/reagento/dishka)\n\nThis project is an implementation of \"Clean architecture\" in combining:\n- [FastAPI](https://github.com/fastapi/fastapi)\n- [Dishka](https://github.com/reagento/dishka)\n- [FastStream](https://github.czom/ag2ai/faststream)\n\n\u003e ⚡ **Why FastAPI?**\\\nThe original example application was built using the Litestar framework. However, as the framework evolved, it took a rather specific development direction, so we decided to rewrite the materials using FastAPI. As of today, it is the most optimal framework choice for working with HTTP.\n\n## Architecture Overview\n\n- [Пишем универсальный прототип бэкенд-приложения](https://habr.com/ru/companies/pt/articles/820171/)\n- [Практическое тестирование приложений](https://habr.com/ru/articles/958014/)\n\n## Quick Start\n\n### Prerequisites\n- Python 3.10+\n- Docker \u0026 Docker Compose\n\n### Installation\n\nSet up virtual environment and install dependencies:\n```shell\npython3 -m venv venv  # Edit .env if needed\nsource venv/bin/activate\npip install -r requirements.txt\n```\n\nConfigure environment and start services:\n```shell\ncp .env.dist .env\ndocker compose up -d\nexport $(grep -v '^#' .env | xargs)  # This command can be useful in the next stages\n```\n\nInitialize database:\n```shell\nalembic upgrade head\n```\n\nCreate RabbitMQ queues:\n```shell\ndocker exec -it book-club-rabbitmq rabbitmqadmin -u $RABBITMQ_USER -p $RABBITMQ_PASS -V / declare queue name=create_book durable=false\ndocker exec -it book-club-rabbitmq rabbitmqadmin -u $RABBITMQ_USER -p $RABBITMQ_PASS -V / declare queue name=book_statuses durable=false\n```\n\n### Run the project\n\nFull Application HTTP + AMQP (Recommended for demo):\n```shell\nuvicorn --factory book_club.main:get_app --reload\n```\n_but you also can run HTTP API only or AMQP consumer only_\n\n```shell\n// HTTP API Only\nuvicorn --factory book_club.main:get_fastapi_app --reload\n\n// AMQP Consumer Only\nfaststream run --factory book_club.main:get_faststream_app --reload\n```\n\n### Usage Examples\n\n```shell\n// Create a Book via AMQP\ndocker exec -it book-club-rabbitmq rabbitmqadmin -u $RABBITMQ_USER -p $RABBITMQ_PASS \\\npublish exchange=amq.default routing_key=create_book payload='{\"title\": \"The Brothers Karamazov\", \"pages\": 928, \"is_read\": true}'\n\n// Read uuid of created book\ndocker exec -it book-club-rabbitmq rabbitmqadmin -u $RABBITMQ_USER -p $RABBITMQ_PASS get queue=book_statuses count=10\n\n// Get book info by http api\ncurl http://localhost:8000/book/{uuid}\n```\n\n### Testing\n\nCreate test database:\n```shell\ndocker exec -it book-club-postgres psql -U $POSTGRES_USER -d $POSTGRES_DB -c \"CREATE DATABASE test_db\"\n```\n\nRun tests:\n```shell\nTEST_DB=test_db pytest tests/ --asyncio-mode=auto\n```\n","funding_links":[],"categories":["Resources"],"sub_categories":["Best Practices"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffaststream-community%2Ffastapi-dishka-faststream","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffaststream-community%2Ffastapi-dishka-faststream","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffaststream-community%2Ffastapi-dishka-faststream/lists"}