Skip to main content

kadi-fsspec

Expose a kadi4mat collection as fsspec filesystem. Collections and records are represented as directories. Files attached to records are represented as files.

The kadi-apy library is used, in particular all API calls go through a KadiManager instance.

Usage

General

Basic usage, assuming you have a .kadiconfig file (e.g. because you have previously used kadi-apy):

from kadi_fsspec import KadiFileSystem

root_collection_identifier = "@root-collection"

fs = KadiFileSystem(root_collection_identifier)

Alternatively, pass an instance of KadiManager or options to create one, for example:

from kadi_fsspec import KadiFileSystem
from kadi_apy import KadiManager

root_collection_identifier = "@root-collection"

manager = KadiManager(
    host="https://kadi4mat.iam.kit.edu/",
    pat="<your-kadi-access-token>",
)

fs = KadiFileSystem(root_collection_identifier, kadi_manager=manager)

Inside marimo

The original motivation for this package was to allow users of marimo to browse a kadi4mat collection from inside a notebook. If you add a cell with the code shown above, marimo should autodetect the instance of fsspec.AbstractFileSystem and a file tree should appear in the "Remote Storage" section of the "Files" tab of the left sidebar.

Other usage

The package registers the kadi:// protocol in fsspec, so you can also get an instance of a KadiFileSystem filesystem or open a file via the fsspec API:

# Instance of KadiFileSystem
fs = fsspec.filesystem("kadi", root_collection_identifier="@root-collection")

# Open files directly
with fsspec.open("kadi:///some-collection/some-record/some-file.txt", "rb", root_collection_identifier="@root-collection") as f:
    print(f.read().decode())

Status

  • Listing records and collections as directories
  • Read and download files
  • Create new records (parent collection must exist)
  • Write to existing files
  • Create new files (parent record must exist)
  • Partial reads, streaming

Copyright GFZ Helmholtz Centre for Geosciences. kadi-fsspec is licensed under EUPL-1.2.

Metadata

Release files for kadi-fsspec 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kadi-fsspec 0.1.0
File Size Uploaded Provenance Actions
kadi_fsspec-0.1.0.tar.gz 5.1 kB Without provenance Details for kadi_fsspec-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for kadi-fsspec 0.1.0
File Interpreter ABI Platform Actions
kadi_fsspec-0.1.0-py3-none-any.whl Python 3 none any Details for kadi_fsspec-0.1.0-py3-none-any.whl

Total release size: 11.9 kB

Release files / kadi_fsspec-0.1.0.tar.gz

Download URL kadi_fsspec-0.1.0.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
51a2e891a2696992b48d0fd5ae585750705c3e1a8e96ae1e842ad83660fa5664
BLAKE2b-256 checksum
How to use checksums
67feb841ecefb19c453fc4b9d84ac6711bd27716484299df9a829db4058d98a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / kadi_fsspec-0.1.0-py3-none-any.whl

Download URL kadi_fsspec-0.1.0-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
56b0ad3b5814aa2b7a12ef742eed5ad72851e426037021974c08b830fb966413
BLAKE2b-256 checksum
How to use checksums
e186c642230c22bd13ad96bc001fe81c6c6ab1764ca5e703e304ae594a4c7243
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Security for kadi-fsspec 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page