Skip to content

wip: python-implementable store protocols#20

Draft
kylebarron wants to merge 11 commits into
mainfrom
kyle/store-protocols
Draft

wip: python-implementable store protocols#20
kylebarron wants to merge 11 commits into
mainfrom
kyle/store-protocols

Conversation

@kylebarron

Copy link
Copy Markdown
Member

What I am changing

How I did it

How you can test it

Related Issues

kylebarron and others added 11 commits June 16, 2026 23:17
Sync, duck-typed Python stores adapted to zarrs ReadableListableStorageTraits
via a single PyStore wrapper that degrades listing at runtime. Capabilities
declared via @Property predicates (supports_get_partial / supports_listing).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ByteRange is FromStart/Suffix, not FromStart/FromEnd.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Wrap an arbitrary duck-typed Python object as a sync zarrs store.
extract_storage now falls through to PyStore for any non-builtin object.
Listing degrades to a clear "not supported" error when not declared.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
When a store declares supports_get_partial, get_partial_many is forwarded
to the Python object with (kind, offset, length) byte-range triples instead
of fetching and slicing the whole value. Verified via a sharded-array
partial-decode test.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add runtime-checkable ReadableStore/ListableStore protocols documenting the
custom sync store contract, and a README section showing a minimal dict store.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant