quantlab.core.store_uses.StoreUse#
- class quantlab.core.store_uses.StoreUse(path, relation, handle=None)[source]#
Bases:
objectOne store a component uses directly, and how.
- Parameters:
- pathstr or None
The Zarr store, as the component names it;
Nonefor a"reads"of a panel held in memory (aFrameDataset), which reads no store.- relationstr
"reads","owns"or"source"(see the module docstring).- handleRangedStoreHandle, optional
For a store written by date range: what reads its recorded range and extends it. Required with
"owns";Nonefor a dataset’s store.
- Raises:
- ValueError
If
relationis not one ofRELATIONS, an"owns"use has no handle, or a use other than a plain"reads"has no path.- TypeError
If
handlelacks a member ofRangedStoreHandle.
Examples
>>> StoreUse("data/prices.zarr", "reads") StoreUse(path='data/prices.zarr', relation='reads', handle=None) >>> StoreUse("data/momentum.zarr", "owns") Traceback (most recent call last): ValueError: StoreUse('data/momentum.zarr', 'owns'): an owned store carries the RangedStoreHandle that extends it
- property ranged#
Whether the store is written by date range: the use carries a handle.
Examples
>>> StoreUse("data/prices.zarr", "reads").ranged False