Background Tasks - FastAPI
fastapi.tiangolo.com · 1,252 words · saved by 1 readers
FastAPI framework, high performance, easy to learn, fast to code, ready for production
Background Tasks ¶ You can define background tasks to be run after returning a response. This is useful for operations that need to happen after a request, but that the client doesn't really have to be waiting for the operation to complete before receiving the response. This includes, for example: Email notifications sent after performing an action: As connecting to an email server and sending an email tends to be "slow" (several seconds), you can return the response right away and send the email notification in the background. Processing data: For example, let's say you receive a file th
related reading
- Bigger Applications - Multiple Files - FastAPIfastapi.tiangolo.com
- How Python Asyncio Works: Recreating it from Scratchjacobpadilla.com
- Run a Server Manually - FastAPIfastapi.tiangolo.com
- The simplest way to add server sent events to Django 🏺 - Tom Dekanphotondesigner.com
- Introduction - Asynchronous Programming in Rustrust-lang.github.io
- python - How does asyncio actually work? - Stack Overflowstackoverflow.com
- How To Create a React + Flask Project - miguelgrinberg.comblog.miguelgrinberg.com
- (Quite) A Few Words About Asyncyoric.github.io
- Pass data between tasks | Astronomer Documentationastronomer.io
- FastAPI vs Flask: Comparison Guide to Making a Better Decisionturing.com
- Channels | Tokio - An asynchronous Rust runtimetokio.rs
- How to Build End-to-End LLM Observability in FastAPI with OpenTelemetryfreecodecamp.org