/valkey-skills:migrate-redis-py [API or pattern to migrate]from valkey-skills
Use when migrating Python from redis-py to Valkey GLIDE. Covers async-first API, bytes returns (no decode_responses), list args, PubSub, ExpirySet/ConditionalChange. Not for greenfield Python apps - use valkey-glide-python instead.
Ships in valkey-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Use when migrating a Python application from redis-py to the GLIDE client library.
| Area | redis-py | GLIDE |
|---|---|---|
| Default mode | Synchronous | Async-first (sync API from GLIDE 2.1) |
| Return type | Strings (with decode_responses=True) | Bytes always - call .decode() |
| Multi-arg commands | Varargs: delete("k1", "k2") | List args: delete(["k1", "k2"]) |
| Expiry | Keyword args: ex=60 | ExpirySet objects |
| Conditional SET | Separate setnx(), setex() | Enum options on set() |
| Connection model | Connection pool (default 10 conns) | Single multiplexed connection per node |
| Cluster client | redis.RedisCluster() | GlideClusterClient with auto-topology |
redis-py:
import redis
r = redis.Redis(host="localhost", port=6379, db=0, decode_responses=True)
r.ping()
GLIDE (async):
from glide import GlideClient, GlideClientConfiguration, NodeAddress
config = GlideClientConfiguration(
addresses=[NodeAddress("localhost", 6379)], database_id=0, request_timeout=5000)
client = await GlideClient.create(config)
await client.ping()
GLIDE (sync - 2.1+):
from glide_sync import GlideClient, GlideClientConfiguration, NodeAddress
config = GlideClientConfiguration(
addresses=[NodeAddress("localhost", 6379)], database_id=0)
client = GlideClient.create(config)
client.ping()
| redis-py parameter | GLIDE equivalent |
|---|---|
| host, port | NodeAddress(host, port) in addresses list |
| db | database_id |
| password | ServerCredentials(password=...) in credentials |
| username | ServerCredentials(username=..., password=...) |
| socket_timeout | request_timeout (milliseconds, not seconds) |
| ssl=True | use_tls=True |
| retry_on_timeout | Built-in reconnection with BackoffStrategy |
| decode_responses | No equivalent - always returns bytes |
No drop-in replacement or compatibility layer exists for Python. Migration approach:
valkey-glide alongside redis-pyasyncio.gather() or the Batch API for bulk operationsredis-py dependency| Topic | File |
|---|---|
| Command-by-command API mapping (strings, hashes, lists, sets, sorted sets, delete, exists, cluster) | api-mapping |
| Pipelines, transactions, Pub/Sub, platform notes | advanced-patterns |
protobuf>=3.20 - pin versions carefully.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
Generated from the plugin's indexed repository (internet-dot/valkey-skills) — no native marketplace selected
npx claudepluginhub p/internet-dot-valkey-skills15 skills in this plugin
/glide-devUse when contributing to the GLIDE client - Rust core internals, language bindings (PyO3/JNI/NAPI/CGO/FFI), protocol layer, PubSub synchronizer, cluster topology, and build system. For using GLIDE in apps, see valkey-glide instead./glide-mqUse when building message queues with glide-mq. Covers queue setup, producer/consumer patterns, job scheduling, workflows, batch processing, streaming, and suspend/resume. Not for migrating from BullMQ (migrate-bullmq) or Bee-Queue (migrate-bee)./migrate-go-redisUse when migrating Go from go-redis to Valkey GLIDE. Covers Result[T] nil handling, CGO dependency, PubSub, SetWithOptions, Alpine/MUSL gotchas. Not for greenfield Go apps - use valkey-glide-go instead./migrate-ioredisUse when migrating Node.js from ioredis to Valkey GLIDE. Covers API mapping, creation-time PubSub, reversed publish args, Batch API, TypeScript types. Not for greenfield Node.js apps - use valkey-glide-nodejs instead./migrate-jedisUse when migrating Java from Jedis to Valkey GLIDE. Covers zero-code-change compatibility layer, native CompletableFuture rewrite, PubSub, Batch API, cluster mode. Not for greenfield Java apps - use valkey-glide-java instead./migrate-lettuceUse when migrating Java from Lettuce to Valkey GLIDE. Covers Spring Data Valkey path, native rewrite from RedisFuture to CompletableFuture, PubSub, no reactive API or codec equivalent. Not for Jedis migration - use migrate-jedis instead.