### SvcsPlugin Configuration Options Source: https://github.com/vkcku/litestar-svcs/blob/main/README.md Explains the configuration options for the SvcsPlugin, specifically how to provide a registry instance or a callable to create one, and how to customize the dependency injection keyword argument name for containers. ```APIDOC SvcsPluginConfig: __init__(registry: Registry | Callable[[], Registry | Awaitable[Registry]], container_dependency_key: str = 'svcs_container') registry: An instance of svcs.Registry or a callable that returns a Registry instance (sync or async). This is used to configure the dependency injection container. container_dependency_key: The name of the keyword argument used for injecting the Svcs container into route handlers. Defaults to 'svcs_container'. Note: The keyword argument name for injecting the registry itself (`svcs_registry`) cannot be configured. ``` -------------------------------- ### Basic Litestar Svcs Integration Source: https://github.com/vkcku/litestar-svcs/blob/main/README.md Demonstrates how to integrate the SvcsPlugin with a Litestar application. It shows how to define a route that injects a service from the Svcs container and how to configure the plugin with a registry. ```python from litestar import Litestar from litestar import get from litestar_svcs import SvcsPlugin, SvcsPluginConfig from svcs import Container, Registry @get("/", sync_to_thread=False) def get_user(svcs_container: Container) -> int: return svcs_container.get(int) registry = Registry() registry.register_factory(int, lambda: 10) svcs_plugin_config = SvcsPluginConfig(registry=registry) svcs_plugin = SvcsPlugin(svcs_plugin_config) app = Litestar([get_user], plugins=[svcs_plugin]) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.