Skip to content

Commit

Permalink
docs: expand docs to include Valkey store
Browse files Browse the repository at this point in the history
Adds an autogenerated documentation page for the ValkeyStore itself.
Additionally includes some notes on the existing `stores.rst` usage page indicating the equivalence of Valkey/Redis.
  • Loading branch information
Jordan Russell committed Dec 8, 2024
1 parent fb37e94 commit 992d5bc
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"trio": ("https://trio.readthedocs.io/en/stable/", None),
"pydantic": ("https://docs.pydantic.dev/latest/", None),
"typing_extensions": ("https://typing-extensions.readthedocs.io/en/stable/", None),
"valkey": ("https://valkey-py.readthedocs.io/en/latest/", None),
}

napoleon_google_docstring = True
Expand Down Expand Up @@ -102,6 +103,7 @@
(PY_CLASS, "sqlalchemy.dialects.postgresql.named_types.ENUM"),
(PY_CLASS, "sqlalchemy.orm.decl_api.DeclarativeMeta"),
(PY_CLASS, "sqlalchemy.sql.sqltypes.TupleType"),
(PY_CLASS, "valkey.asyncio.Valkey"),
(PY_METH, "_types.TypeDecorator.process_bind_param"),
(PY_METH, "_types.TypeDecorator.process_result_value"),
(PY_METH, "litestar.typing.ParsedType.is_subclass_of"),
Expand Down
1 change: 1 addition & 0 deletions docs/reference/stores/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ stores
memory
redis
registry
valkey
5 changes: 5 additions & 0 deletions docs/reference/stores/valkey.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
valkey
======

.. automodule:: litestar.stores.valkey
:members:
6 changes: 6 additions & 0 deletions docs/usage/stores.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ Built-in stores
A store backend by `redis <https://redis.io/>`_. It offers all the guarantees and features of Redis, making it
suitable for almost all applications. Offers `namespacing`_.

:class:`ValKeyStore <litestar.stores.valkey.ValkeyStore>`
A store backed by `valkey <https://valkey.io>`_, a fork of Redis created as the result of Redis' license changes.
Similarly to the RedisStore, it is suitable for almost all applications and supports `namespacing`_.
At the time of writing, :class:`Valkey <valkey.asyncio.Valkey>` is equivalent to :class:`redis.asyncio.Redis`,
and all notes pertaining to Redis also apply to Valkey.

.. admonition:: Why not memcached?
:class: info

Expand Down

0 comments on commit 992d5bc

Please sign in to comment.