How to Create Background Tasks in Fast API

preview_player
Показать описание
Having trouble building your Python app? I can help:

Create background tasks in Fast API.

💻 Code written in video
Рекомендации по теме
Комментарии
Автор

This is such an underrated feature, I really wish Django had this without having to set up Celery

zb
Автор

if you can go on with this topic, it would be great, for example how to integrate celery with FastAPI etc. :) Thanks for this video.

Rufeg
Автор

Since FastAPI is an asynchronous framework, we can also use loop.create_task for asynchronous functions and loop.run_in_executor for synchronous functions.

sinancetinkaya
Автор

Wow, amazing explanation with no time loss.

anuragagarwal
Автор

Great video Anthory! Is it possible to get the result of the background task to know if it succeeded of failed? Can this be integrated with RabbitMQ?

brandon_wallace
Автор

This is a life saver for many situations, thanks for sharing man 😎

burakdev
Автор

Hi Anthony, thanks for sharing. 👍🏽
As always, your content is excellent. 😎
Do you know if FASTAPI can carry out this same procedure but by scheduling the tasks? Example: a task schedule to send mail every x day or hour?.

eduardoVanGilRoq
Автор

At production server also no dependency required in Ubuntu. Please suggest.

bkmocfl
Автор

Nice video, didn't know about it but then didn't have need to use it yet. What do you think about making a video on WebRTC (using aiortc) with FastAPI?

nikhilpatel
Автор

I have always thought better to use redis queue for such a thing, what is the different between them?

sarkaran
Автор

Is there a difference to just use asyncio create_task loop?

neutronstar
Автор

also what is the difference between using the background task and just using def in function instead of async def? with def function it would just execute each call in a different thread. So, there would not be a need of the background task...

hyakuheli
Автор

what is the difference between using the background task and just using def in function instead of async def? with def function it would just execute each call in a different thread. So, there would not be a need of the background task...

hyakuheli
Автор

Is there is any extension used on browser/ is it zoomed developer tools?

mystackquest
Автор

What is the response depends on that background task

no-bszq
Автор

Django is a "battery included framework" yet it doesn't come with background task utility. Pretty strange if you ask me.

tochimclaren
Автор

How can I check status email was sent or not using background task

bkmocfl
Автор

i am getting Waiting for background tasks to complete. (CTRL+C to force quit) while sending bulk emails did you know the solution of this problem

stestingtesting
Автор

Thanks a lot for your videos. Appreciating if you can create a video on comparing the Sqlalchemy session between FastApi and Flask. Sending a session to each endpoint seems recommended by SqlAlchemy but is quite different from the way we used to in flask_sqlalchemy.
Does FastApi have something similar to flask_migrate to Migrate in the code and avoid manually using Alembic upgrade?

ashil
Автор

Dependency injection video anytime soon?

chriskeo
join shbcf.ru