ProxyStore¶
Base class for building Store middleware. Subclass it to intercept specific operations while delegating the rest to the inner Store.
ProxyStore is an internal delegation base by
design —
it centralises the private-attribute coupling that ObservedStore and
CachedStore share. It is documented publicly
because it is visible in their inheritance chain and useful for anyone
building custom Store extensions.
ProxyStore
¶
ProxyStore(inner: Store)
Bases: Store
Base class for Store proxies that delegate to an inner Store.
All public Store methods delegate to self._inner by default.
Subclasses override only the methods they intercept and must implement
_wrap_child() to control how child() propagates wrapper behavior.
ObservedStore and CachedStore are built on this base.
Subclass it to build your own Store middleware.
Parameters:
-
inner(Store) –The Store instance to wrap.
Example
Interop (Backend-Specific)¶
Backend-specific methods
unwrap, native_path, and to_key delegate directly to the inner
Store and expose backend internals. Using them ties your code to a
specific backend. supports() is portable — it works on all backends.
See Store — Interop for the full
contract.
See also¶
- ext.observe — ObservedStore, built on ProxyStore
- ext.cache — CachedStore, built on ProxyStore
- ext.streams — composable stream wrappers (an alternative to Store-level proxying)