liveBook · Manning

Redis

As explained in The Quick Python Book, Fourth Edition

Redis is an in-memory data-structure server that provides network-accessible key-value storage and related operations.

Redis is an in-memory, networked key-value store. It behaves like a Python dictionary exposed as a service, making lookups fast and useful for caching, message brokering, and quick information retrieval. section 23.6

Python access commonly uses the redis-py client, installed with pip install redis. A running Redis server is required; a hosted instance, Docker, or a platform-specific installation can provide one. section 23.6

A small Redis session

After connecting with redis.Redis(host=..., port=..., password=...), inspect keys with r.keys(), save a value with r.set('a_key', 'my value'), and retrieve it with r.get('a_key'). The operation returns True on success, while retrieval produces b'my value'.

How The Quick Python Book, Fourth Edition covers it

How deep it goes
Demonstrates Python connections, key-value operations, counters, lists, indexing, and expiration without exploring Redis internals.
Examples
Uses Python snippets for keys, strings, counters, lists, indexed reads, connection settings, and expiring values.
What it assumes
Assumes general Python knowledge and access to a running Redis server, while introducing NoSQL and networked key-value storage.
What you can do after
Operate Redis through redis-py by connecting to a server and performing key-value, counter, list, and expiration operations.
How it connects
Connects NoSQL databases with key-value storage, caching, message brokers, Python clients, and MongoDB.

Also explained in

Compare how 6 books explain Redis →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of The Quick Python Book, Fourth Edition. The section links point to the parts of the book it draws on.