{"id":20637974,"url":"https://github.com/gregavrbancic/fastapi-celery","last_synced_at":"2025-04-04T17:10:20.362Z","repository":{"id":37423353,"uuid":"180937561","full_name":"GregaVrbancic/fastapi-celery","owner":"GregaVrbancic","description":"Minimal example utilizing fastapi and celery with RabbitMQ for task queue, Redis for celery backend and flower for monitoring the celery tasks.","archived":false,"fork":false,"pushed_at":"2024-01-25T06:50:02.000Z","size":28,"stargazers_count":541,"open_issues_count":4,"forks_count":108,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-28T16:11:12.500Z","etag":null,"topics":["celery","docker-compose","fastapi","flower","python","rabbitmq","redis"],"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/GregaVrbancic.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}},"created_at":"2019-04-12T05:37:37.000Z","updated_at":"2025-03-26T06:43:58.000Z","dependencies_parsed_at":"2024-04-10T21:30:38.570Z","dependency_job_id":"1dd3c593-eadf-4a42-82df-5b15f5d44a97","html_url":"https://github.com/GregaVrbancic/fastapi-celery","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GregaVrbancic%2Ffastapi-celery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GregaVrbancic%2Ffastapi-celery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GregaVrbancic%2Ffastapi-celery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GregaVrbancic%2Ffastapi-celery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GregaVrbancic","download_url":"https://codeload.github.com/GregaVrbancic/fastapi-celery/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247217222,"owners_count":20903009,"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":["celery","docker-compose","fastapi","flower","python","rabbitmq","redis"],"created_at":"2024-11-16T15:16:29.078Z","updated_at":"2025-04-04T17:10:20.343Z","avatar_url":"https://github.com/GregaVrbancic.png","language":"Python","readme":"# FastAPI with Celery\n\n\u003e Minimal example utilizing FastAPI and Celery with RabbitMQ for task queue, Redis for Celery backend and flower for monitoring the Celery tasks.\n\n## Requirements\n\n- Docker\n  - [docker-compose](https://docs.docker.com/compose/install/)\n\n## Run example\n\n1. Run command ```docker-compose up```to start up the RabbitMQ, Redis, flower and our application/worker instances.\n2. Navigate to the [http://localhost:8000/docs](http://localhost:8000/docs) and execute test API call. You can monitor the execution of the celery tasks in the console logs or navigate to the flower monitoring app at [http://localhost:5555](http://localhost:5555) (username: user, password: test).\n\n## Run application/worker without Docker?\n\n### Requirements/dependencies\n\n- Python \u003e= 3.7\n  - [poetry](https://python-poetry.org/docs/#installation)\n- RabbitMQ instance\n- Redis instance\n\n\u003e The RabbitMQ, Redis and flower services can be started with ```docker-compose -f docker-compose-services.yml up```\n\n### Install dependencies\n\nExecute the following command: ```poetry install --dev```\n\n### Run FastAPI app and Celery worker app\n\n1. Start the FastAPI web application with ```poetry run hypercorn app/main:app --reload```.\n2. Start the celery worker with command ```poetry run celery worker -A app.worker.celery_worker -l info -Q test-queue -c 1```\n3. Navigate to the [http://localhost:8000/docs](http://localhost:8000/docs) and execute test API call. You can monitor the execution of the celery tasks in the console logs or navigate to the flower monitoring app at [http://localhost:5555](http://localhost:5555) (username: user, password: test).","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregavrbancic%2Ffastapi-celery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgregavrbancic%2Ffastapi-celery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregavrbancic%2Ffastapi-celery/lists"}