Skip to main content

xlambda-redis

Managed Redis: provisioning, sub-users, backups, and a get_client() convenience.

pip install xlambda-redis            # provisioning only
pip install "xlambda-redis[client]"  # plus redis-py, for get_client()

Python port of @xlambda-tech/redis.

xlambda.redis and redis-py's top-level redis coexist without shadowing each other — Python 3 imports are absolute, so importing one never resolves to the other.

Provisioning

from xlambda.redis import RedisClient

client = RedisClient(api_key=os.environ["XLAMBDA_API_KEY"])

instance = client.instances.create(
    project_id="proj_123",
    name="cache",
    tier="starter",              # shared; 'pro'/'business' are dedicated
    persistence_mode="rdb",      # 'none' | 'rdb' | 'rdb_aof'
)

create(), rotate_password(), and reveal_connection() return a RedisInstanceHandle — a plain dict subclass, so every response field reads normally, with client constructors added on top:

cache = instance.get_client()              # redis-py, blocking
cache.set("hello", "world")

acache = instance.get_async_client()       # redis.asyncio
await acache.set("hello", "world")

On shared-tier instances every key is namespaced behind instance["keyPrefix"].

reveal_connection() discloses the current password rather than changing it. It 404s for instances that predate the feature or were created without CONSOLE_CREDENTIAL_ENCRYPTION_KEY configured — rotate to recover.

Sub-users and backups

user = client.instances.users(instance["id"]).create(permission="readonly")
user["password"]     # shown once

backups = client.instances.backups(instance["id"])
backups.create()
backups.restore("bkp_123")   # overwrites all current data; cannot be undone

What this doesn't wrap

The dashboard's own command / EVAL / pub-sub browser. Running commands isn't something the REST API mediates, so once an instance is provisioned you talk to it with redis-py through the handle above. get_client() is a thin ergonomic wrapper, not a reimplementation, and redis-py stays an optional extra so provisioning-only callers don't install a driver they never use.

Async

from xlambda.redis import AsyncRedisClient

async with AsyncRedisClient(api_key=...) as client:
    instance = await client.instances.create(project_id="proj_123", name="cache", tier="starter")

Note the two axes are independent: AsyncRedisClient is about the provisioning API, get_async_client() about talking to Redis itself. You can mix them freely.

Conventions

Arguments are snake_case; responses are the API's own camelCase, returned as plain dicts typed by TypedDict. memoryBytes and backup sizeBytes are bigints server-side and arrive as strings. See xlambda-core.

Metadata

Release files for xlambda-redis 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xlambda-redis 0.2.0
File Size Uploaded Provenance Actions
xlambda_redis-0.2.0.tar.gz 7.4 kB With provenance Details for xlambda_redis-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for xlambda-redis 0.2.0
File Interpreter ABI Platform Actions
xlambda_redis-0.2.0-py3-none-any.whl Python 3 none any Details for xlambda_redis-0.2.0-py3-none-any.whl

Total release size: 16.5 kB

Release files / xlambda_redis-0.2.0.tar.gz

Download URL xlambda_redis-0.2.0.tar.gz
Size 7.4 kB
Tags Source
SHA-256 checksum
How to use checksums
05e181d349fc7dd82176d250904aa24ef3c1c4044055134af25e0d1a1666af2b
BLAKE2b-256 checksum
How to use checksums
80a2b729e4e14afa4bf1c5064eea4bccbfaacd047c0e5537f2f8393d5ca9b87a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.

Transparency log

Release files / xlambda_redis-0.2.0-py3-none-any.whl

Download URL xlambda_redis-0.2.0-py3-none-any.whl
Size 9.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
197486353b0cf97facf230968affdb17cbacc099415a7898a0448a4f45086b02
BLAKE2b-256 checksum
How to use checksums
39629842f73753652605c335c64934839d05b2224ea022f71b5b1113f517d095
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.

Transparency log

Security for xlambda-redis 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for xlambda_redis-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page