Using Redis with FastAPI

preview_player
Показать описание
Curious how to use Redis with FastAPI? This video walks you through building a fully asynchronous API for checking Bitcoin price and sentiment data with FastAPI and Redis. You'll learn how to aggregate timeseries data with RedisTimeSeries, cache it in Redis, and more.

▬ Links ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

Timeline:
00:00 Intro
00:35 Installing aioredis
00:45 The example project: Is Bitcoin Lit?
02:49 Saving data in RedisTimeSeries
05:51 Aggregating timeseries data with RedisTimeSeries
08:11 Caching data with a background task
14:17 Running the application
17:07 So, is Bitcoin lit or not?
17:28 Where to learn more
Рекомендации по теме
Комментарии
Автор

It’s so complicated for learner like me if only they started with small project to show how Redis works with fastApi and then showed how it works with their own app that would be so much helpful

gameplaystrailers
Автор

Where and how do you initialize the redis client (session)?

osquigene
Автор

TS.DATA cant be use anymore with newer version of redist ?

TIMFAJRGARNA
Автор

So the official solution of integrating redis to FastAPI is having the redis object just as a global object hanging around in your file. This is a joke, isn't it? It effectively prevents unit-testing and opens the door to all the bad things you can do with global variables in general. A good solution would be to provide the redis connection object over the Dependency Injection system of FastAPI.

toru
Автор

This is way too complicated for beginners

tanuvishu
join shbcf.ru