pymemcache
A comprehensive, fast, pure Python memcached client
Decision gist · record as of 2026-08-14
Yes, with conditions. Install if you need a pure-Python memcached client for Django 3.2+, gevent integration, or custom serialization. The library is stable and widely used, but maintenance is aging (last release 2022-10-17). Suitable for production use; verify that your Python version is 3.7+ and that you have memcached infrastructure in place.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires a running memcached server accessible at the specified host and port.
- Low friction: pure Python wheel with no runtime dependencies.
- Aging maintenance status—last release was 2022-10-17, though the repository remains active with recent commits and no archived status.
License · maintenance · safety
Apache License 2.0 (permissive) — Apache License 2.0 (permissive) allows commercial use, modification, and distribution with minimal restrictions, making it suitable for most projects.
last release 2022-10-17 (1397 days) · last repo commit 2025-07-09 · 839 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,981,655 downloads/mo, #2,802 on PyPI
Alternatives
Verify before relying
pip install pymemcache
from pymemcache.client.base import Client
client = Client(('localhost', 'port'))
client.set(b'key', b'value')
result = client.get(b'key')- Current performance characteristics relative to other pure-Python memcached clients in modern workloads.
- Extent of typing coverage added in version 4.0.0 and whether it covers the full public API.
- Whether pluggable compression serde (added in 4.0.0) is production-ready and documented.
- Specific port number or connection defaults for typical memcached deployments.
What it is and what it does
pymemcache is a pure-Python client library for memcached that implements the complete memcached text protocol. It provides flexible connection options (TCP over IPv4/IPv6 or UNIX sockets), configurable socket timeouts, and access to memcached's noreply flag for write optimization. The library includes modular serialization and deserialization, optional error-as-cache-miss handling, and supports both single-client and pooled/hashed cluster patterns.
Because it is pure Python with no compiled dependencies, it integrates well with async frameworks like gevent. It is maintained by Pinterest and used in production at scale. The latest version (4.0.0) dropped Python 2 and 3.6 support, added type hints, and introduced pluggable compression serialization.
Use it for
- Cache layer for web applications using Django 3.2+ (built-in backend) or other frameworks needing distributed caching.
- Cluster-aware caching with HashClient for consistent hashing across multiple memcached nodes.
- Async-compatible caching in gevent-based applications where C extensions are not viable.
- High-throughput write scenarios using noreply mode to reduce round-trip latency.
- Custom serialization workflows via flexible serde interface for domain-specific data types.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, with conditions.
Install if you need a pure-Python memcached client for Django 3.2+, gevent integration, or custom serialization. The library is stable and widely used, but maintenance is aging (last release 2022-10-17). Suitable for production use; verify that your Python version is 3.7+ and that you have memcached infrastructure in place.
Install
pymemcache on PyPI
Before you install
Low friction: pure Python wheel with no runtime dependencies. Aging maintenance status—last release was 2022-10-17, though the repository remains active with recent commits and no archived status.
Requires a running memcached server accessible at the specified host and port.
License in practice
Apache License 2.0 (permissive) allows commercial use, modification, and distribution with minimal restrictions, making it suitable for most projects.
Quickstart
pip install pymemcache
from pymemcache.client.base import Client
client = Client(('localhost', 'port'))
client.set(b'key', b'value')
result = client.get(b'key')
Verify before relying
- Current performance characteristics relative to other pure-Python memcached clients in modern workloads.
- Extent of typing coverage added in version 4.0.0 and whether it covers the full public API.
- Whether pluggable compression serde (added in 4.0.0) is production-ready and documented.
- Specific port number or connection defaults for typical memcached deployments.
Package facts
| License | Apache License 2.0 permissive |
| Python support | Supports the current Python release >=3.7 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Aging 1,397 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,981,655 / month, #2,802 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: Apache Software LicenseProgramming Language :: PythonProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: PyPyTopic :: Database |
Evidence: pymemcache-4.0.0-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “pure python memcache”
- pymemcacheA pure-Python memcached client implementing the complete text…
- aiomcacheAsyncio-based memcached client providing non-blocking get, set,…
- opentelemetry-instrumentation-pymemcacheAdds OpenTelemetry tracing instrumentation to pymemcache client…
Give your agent the search over MCP, or paste the wish link into any chat.
More Database packages
psycopg2-binary is a PostgreSQL database adapter for Python that implements the DB API 2.0 specification, enabling Python applications to connect to and query PostgreSQL databases with thread-safe concurrent operations.
Python client library for connecting to and executing commands against Redis key-value stores, supporting both synchronous and asynchronous operations.
Install it if your application needs to interact with Redis; the only prerequisite is a running Redis server instance.
YDB Python SDK is the official client library for connecting to and querying YDB databases from Python applications.
Install it if you need to connect Python applications to YDB databases.
Connects Python applications to Snowflake data warehouses using the DB API 2.0 specification, enabling SQL queries, data transfers, and warehouse operations.
sqlparse tokenizes SQL text into a tree of statements, clauses, and expressions, and provides functions to split scripts, format queries, and inspect parsed tokens without validating dialect or syntax.
Install it if you need to manipulate, format, or analyze SQL text programmatically.
Provides base adapter protocols and shared functionality that database adapters use to integrate with dbt-core, handling connections, dialect translation, relation caching, and core interface management.
See also pylibmc · python-memcached · opentelemetry-instrumentation-pymemcache · python-binary-memcached · aiomcache · pmd-pytcp · clamav-client · aiocache · google-cloud-memcache · icmplib