Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/testdrivenio/fastapi-celery
Example of how to handle background processes with FastAPI, Celery, and Docker
https://github.com/testdrivenio/fastapi-celery
fastapi fastapi-celery fastapi-docker task-queue
Last synced: about 2 months ago
JSON representation
Example of how to handle background processes with FastAPI, Celery, and Docker
- Host: GitHub
- URL: https://github.com/testdrivenio/fastapi-celery
- Owner: testdrivenio
- License: mit
- Created: 2021-05-09T15:35:00.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-04-06T12:48:55.000Z (over 1 year ago)
- Last Synced: 2024-08-02T14:12:21.544Z (5 months ago)
- Topics: fastapi, fastapi-celery, fastapi-docker, task-queue
- Language: Python
- Homepage:
- Size: 8.79 KB
- Stars: 369
- Watchers: 7
- Forks: 92
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-starred-test - testdrivenio/fastapi-celery - Example of how to handle background processes with FastAPI, Celery, and Docker (Python)
README
# Asynchronous Tasks with FastAPI and Celery
Example of how to handle background processes with FastAPI, Celery, and Docker.
## Want to learn how to build this?
Check out the [post](https://testdriven.io/blog/fastapi-and-celery/).
## Want to use this project?
Spin up the containers:
```sh
$ docker-compose up -d --build
```Open your browser to [http://localhost:8004](http://localhost:8004) to view the app or to [http://localhost:5556](http://localhost:5556) to view the Flower dashboard.
Trigger a new task:
```sh
$ curl http://localhost:8004/tasks -H "Content-Type: application/json" --data '{"type": 0}'
```Check the status:
```sh
$ curl http://localhost:8004/tasks/
```