Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for valkey-py based client manager #1428

Open
Ohnoimded opened this issue Dec 27, 2024 · 3 comments
Open

Support for valkey-py based client manager #1428

Ohnoimded opened this issue Dec 27, 2024 · 3 comments

Comments

@Ohnoimded
Copy link

Problem

Since Redis has been forked to Valkey and many projects are likely to adopt Valkey over Redis, using RedisManager/AsyncRedisManager no longer works with Valkey URLs (e.g., valkey://...) and valkey-py, as it only checks for Redis URLs (e.g., redis://...).

Solution

I created a custom implementation called ValkeyManager/AsyncValkeyManager inherited from PubSubManager/AsyncPubSubManager, using valkey-py instead of redis-py.

Why This Matters

Due to Redis' licensing change, many projects are transitioning to Valkey. Adding support for Valkey URLs would help users migrate seamlessly and avoid the need for custom solutions.

Request

Would it be possible to integrate support for Valkey URLs in the official implementation? This would make it easier for projects to adopt Valkey.

@Ohnoimded Ohnoimded changed the title Support for Valkey based client manager Support for valkey-py based client manager Dec 27, 2024
@miguelgrinberg
Copy link
Owner

miguelgrinberg commented Dec 27, 2024

Instead of duplicating the existing classes that work with Redis, I would prefer to extend them to support either the Redis or the Valkey clients. This would avoid code duplication, at least while the two projects mantain similar APIs.

@Ohnoimded
Copy link
Author

Sounds like a good idea. Can I make a PR for this?

@miguelgrinberg
Copy link
Owner

@Ohnoimded Sure, go ahead and submit a PR once done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants