Redka aims to reimplement the core parts of Redis with SQL, while remaining compatible with Redis API.
Highlights:
Redka is functionally ready for 1.0. Feel free to try it in non-critical production scenarios and provide feedback in the issues.
Here are some situations where Redka might be helpful:
Embedded cache for Go applications. If your Go app already uses SQLite or just needs a built-in key-value store, Redka is a natural fit. It gives you Redis-like features without the hassle of running a separate server. You're not limited to just get/set with expiration, of course — more advanced structures like lists, maps, and sets are also available.
Lightweight testing environment. Your app uses Redis in production, but setting up a Redis server for local development or integration tests can be a hassle. Redka with an in-memory database offers a fast alternative to test containers, providing full isolation for each test run.
Postgres-first data structures. If you prefer to use PostgreSQL for everything but need Redis-like data structures, Redka can use your existing database as the backend. This way, you can manage both relational data and specialized data structures with the same tools and transactional guarantees.
Redka supports five core Redis data types:
Redka also provides commands for key management, server/connection management, and transactions.
Redka comes in two flavors:
You can also run an in-process Redka server as a lightweight alternative to Redis test containers, or as a small-scale production instance.
Redka can use either SQLite or PostgreSQL as its backend. It stores data in a relational database with a simple schema and provides views for better introspection.
Redka is not about raw performance. You can't beat a specialized data store like Redis with a general-purpose relational backend like SQLite. However, Redka can still handle tens of thousands of operations per second, which should be more than enough for many apps.
See the benchmarks for more details.
Contributions are welcome. For anything other than bugfixes, please first open an issue to discuss what you want to change.
Make sure to add or update tests as needed.
Redka would not be possible without these great projects and their creators:
Logo font by Ek Type.
Redka is mostly a one-man project, not backed by a VC fund or anything.
If you find Redka useful, please star it on GitHub and spread the word among your peers. It really helps to move the project forward.
If you use Redka for commercial purposes, consider purchasing support.
★ Subscribe to stay on top of new features.
$ claude mcp add redka \
-- python -m otcore.mcp_server <graph>