Skip to main content

Redis for Python Developers

RU102PY is a complete introduction to Redis for Python developers. You can expect to learn how to make connections to Redis, store and retrieve data, and leverage essential Redis features such as sorted sets and streams.

  • Course Number

    RU102PY
  • Classes Start

    Early Summer, 2020
  • Estimated Effort

    3:00/week

What you will learn

RU102PY provides a deep dive into Python application development with Redis. You can expect to learn how to make connections to Redis, store and retrieve data, and leverage essential Redis features such as sorted sets and streams.

What you will 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 Express
  • 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

Week 2

Week 3

  • Overview and Introduction
  • Hello Redis
  • Getting Started with the Redis Client for Python
  • Introduction to Coding Challenges and test-driven development
  • Modeling a Domain Problem in Redis
  • Extending Hashes for Denormalized Recency Data
  • Storing Solar Site Metrics
  • Sorted Sets for Site Energy Status
  • Building Leaderboards and Top-N/Bottom-N Queries
  • Pipelining
  • Transactions
  • Geo-Indexing Solar Sites
  • Criteria Searching with Geo
  • Redis Streams for Data Ingestion
  • Rate-Limiting

Week 4

Week 5

  • Error Handling
  • Connecting to Partitioned Deployments
  • Debugging
  • Understanding Client Internals: Protocols, Binary Data, and Encoding
  • Final Exam

Course Requirements

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

  • The Python programming language
  • Redis and Redis Data Structures (approximately to the level covered in the RU101 course)

Software Requirements

  • Web Browser: Firefox 39.0+ or Chrome 43+ (Internet Explorer is currently not supported)
  • Operating System: Mac OS X 10.7+ 64-bit, Ubuntu 14.04+ 64-bit, or Windows 8+ (64-bit)
  • Access to www.youtube.com and university.redislabs.com (i.e. non-blocked access)

Enroll