liveBook · Manning

Key-value store

As explained in The Quick Python Book, Fourth Edition

A key-value store is a data-storage system that associates uniquely identified keys with values for retrieval and modification.

A key-value store associates uniquely identified keys with values that can be retrieved or modified. Redis implements this model as an in-memory, networked service that behaves much like a Python dictionary exposed over a network. Fast lookups make it useful for caching, message brokering, and quick information retrieval. section 23.6

Connect and perform a lookup

Install the Python client with pip install redis, then configure redis.Redis with a host, port, and password. After connecting, r.set('a_key', 'my value') stores data and r.get('a_key') returns b'my value'. A running Redis server can come from a hosted account, Docker, or a local installation. section 23.6

How The Quick Python Book, Fourth Edition covers it

How deep it goes
Demonstrates Python operations for strings, counters, lists, indexing, and expiration without descending into Redis internals.
Examples
Uses Redis strings, counters, lists, indexed retrieval, client configuration, server startup, and timed expiration.
What it assumes
Assumes general Python familiarity and access to a running Redis server; supplies client installation and hosted, Docker, or local setup options.
What you can do after
Operate Redis through Python by connecting to a server, storing values, querying keys, managing lists, and setting expiration.
How it connects
Connects key-value stores with Redis, caching, message brokers, NoSQL systems, relational databases, ORMs, and MongoDB.

Also explained in

Compare how 8 books explain key-value store →

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.