Redis for Python Developers banner image

RU102PY · Self paced

Redis for Python Developers

A complete introduction to Redis for Python developers.

Register  
 course image

What you’ll learn

In RU102PY, you’ll build a complete application using Python, Redis, and the Flask web framework. You’ll learn how to connect to Redis, model a domain, store and retrieve data, and take advantage of common Redis patterns.


What you’ll build

As the course progresses, you’ll write code that implements the features of a solar power monitoring application. This real-world project consists of three components:

  • A command-line data loading application
  • A REST API backend using Flask
  • A Vue.js front end (No Vue experience required!)

We’ll store data in Redis using a data model that we’ll develop along the way. The project will leverage a number of Redis data structures, including:

  • Hashes
  • Sets
  • Sorted Sets
  • Geospatial indexes
  • Streams

We’ll provide examples of best practices such as the use of pipelining, transactions, and Lua scripting. We’ll also demonstrate several common Redis patterns, including rate-limiting for API calls and leaderboards for top-producing solar sites.


Course Outline

Week 1

  • Overview and Introduction
  • Hello Redis
  • Getting Started with the Redis Client for Python
  • Introduction to Coding Challenges and test-driven development

Week 2

  • Modeling a Domain Problem in Redis
  • Storing Solar Site Metrics
  • Sorted Sets for Site Energy Status
  • Building Leaderboards and Top-N/Bottom-N Queries
  • Pipelining
  • Transactions

Week 3

  • Geo-Indexing Solar Sites
  • Criteria Searching with Geo
  • Redis Streams for Data Ingestion

Week 4

  • Rate-Limiting
  • Error Handling
  • Connection Management
  • Debugging
  • Understanding Client Internals: Protocols, Binary Data, and Encoding

Week 5

  • Final Exam
Course Number
RU102PY
Starts
January 23, 2024
Ends
March 07, 2024
Estimated Effort
~ 3 hours per week

Prerequisites

RU102PY has no course prerequisites. However, we assume that students already understand:

  • The Python programming language
  • Redis and Redis Data Structures, at least at a basic level

Software Requirements

  • Web Browser: Firefox 39.0+ or Chrome 43+
  • Operating System: Mac OS X 10.7+ 64-bit, Ubuntu 14.04+ 64-bit, or Windows 10
  • Software: Docker, or local installs of Python 3.8, make and Redis 5 or 6
  • Access to youtube.com, university.redis.com and github.com
A photograph of Andrew Brookins
Instructor Andrew Brookins

Andrew Brookins was a Developer Advocate at Redis and is the author of The Temple of Django Database Performance. A senior developer with ten years of experience, Andrew has made big contributions to production software using Python, Ruby, JavaScript/ES6, Objective-C, and more.