Skip to main content
Loading page…
Python Mastery
Chapter 31
Lesson 2 of 4
Redis with redis-py
Contents
Notes
Tutor
Concept
What Redis Is (and Isn't)
Loading activity…
Previous
1 / 10
Continue
Contents
Notes
Discussion
Tutor
53 min
10 activities
0 of 10 done
In this lesson
1
What Redis Is (and Isn't)
2
Connecting and Basic String Operations
3
Redis Data Types in Action
4
The Cache-Aside Pattern
5
Pub/Sub and a Sliding-Window Rate Limiter
6
Pipeline and Transaction Gotchas
7
Memory Is Finite — Always Set Expiry
8
Redis Command → Operation
9
Redis Data Types Knowledge Check
10
Senior Lab: Build, Run, and Review Evidence
Objectives
Connect to Redis with redis-py and perform basic get/set operations with expiry
Use Redis data types: strings, lists, hashes, sets, and sorted sets
Implement the cache-aside pattern to accelerate slow database queries
Use Redis pub/sub and understand it as a lightweight message bus
Implement a sliding-window rate limiter using Redis atomic operations
Further reading
redis-py documentation
PyMongo documentation
Chapter 31 · NoSQL with Redis & MongoDB
SQL vs NoSQL
Redis with redis-py
MongoDB with PyMongo
Putting It Together
Previous: SQL vs NoSQL
Next: MongoDB with PyMongo