Comments (8)
Hello, guys. It's been a long ride, but finally taskiq is mature enough to be integrated in fastapi-template.
To close this issue I've created a project, lol, but now I'll be trying to make it more popular and continue developing it. There're some missing features in taskiq, but everything what we plan for future will be implemented.
It doesn't have a docs about how to use it with fastapi in official documentation, please use this README as reference to integrate it in existing projects.
Warm thanks for your patience and have a great hacking.
from fastapi-template.
Hi there. After some research I found out that there is no such thing as celery or dramatiq for async projects. So I've created one. It's called taskiq. Currently it's unstable, but I will try to add this integration after we stabilize all interfaces, add tests, and create more brokers and result backends.
It took only month to build it from scratch. But I guess it may be very helpful project for many people that struggle in search for the async celery alternative.
from fastapi-template.
It looks great. Will definitely consider it next time i have a need. Side note, thoughts on adding hacktoberfest tag to the repo? (definitely asking for my own selfish desire to get a badge... 👀 )
from fastapi-template.
Hey!
Yeah I already use fastapi background tasks because as you said, it supports async and it's already included. That's very cool.
But I think that it has some limitations, meaning you may need to spawn multiple instances of your FastAPI app to handle these tasks to avoid slowing down your API too much.
Also, if for some reason your app crashes or reboots, you loose all the tasks which is not ideal.
I heard about dramatiq, never tried it though. I thought Celery was supposed to support async, but it seems to have been delayed. I'll see what I can find.
from fastapi-template.
@haffi96 RQ supports only redis. Also taskiq can pipeline tasks using taskiq-pipelines library and it's easily extendable.
from fastapi-template.
@haffi96 Added a tag. Thanks for noticing.
from fastapi-template.
Hi. You have several ways of doing this. Have you tried default fastapi background tasks? https://fastapi.tiangolo.com/tutorial/background-tasks/
Celery and Dramatiq are nice , but these libraries don't support async functions (You can overpass this restriction using async_to_sync function from asgiref) .
Often I write workers by hand. by creating python file that listens to specific queue.
from fastapi-template.
Whats the benefit/differences of taskiq compared to rq? https://python-rq.org/ or perhaps https://github.com/samuelcolvin/arq if you want built in async
from fastapi-template.
Related Issues (20)
- TypeError: 'type' object is not subscriptable HOT 2
- Alembic supports HOT 3
- Loguru startup error HOT 12
- Taskiq Mypy validation error HOT 1
- pytest is not working with kafka HOT 3
- Docker Conflict. The container name "/buildx_buildkit_default" HOT 3
- How setup VSC launch.json for run debugging app HOT 1
- Add Ruff HOT 1
- RuntimeError After Pytest Completion
- ImportError: cannot import name 'auth_cookie' HOT 3
- PEP 604 Optional[] HOT 3
- Please add NATS support HOT 1
- Unable to locate GCC
- Mac m1, do not progress HOT 1
- feat: Add Support for PDM
- Fast api
- Anyone has pytest working with docker-compose ? HOT 2
- Resolving dependencies... (201.9 s) HOT 3
- Pre Commits Hooks fails when installed with Python-3.12.1 HOT 1
- partially initialized module 'asyncio' has no attribute 'get_running_loop'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fastapi-template.