Skip to main content

fsspec-alt-strategies

PyPI - Version PyPI - Version Python versions License CI CodeQL codecov

An alternative implementation of the file operations behind fsspec's filesystem interface.

Status: alpha. The API may change.

The library aims to handle large cloud storages efficiently, such as data lakes holding millions of files across many directories. It is a third-party project, not part of fsspec.

Principles

Streaming first

  • Its file operations list with one primitive, _ils. fsspec's own operations list every path first, with expand_path. _ils is an async generator instead: it scans the storage step by step, and yields each path as it is found.
  • The operations built on _ils act on its paths as they arrive, as far as they can. So a large file tree is processed without ever being held in memory whole.

Hierarchical namespaces, used

  • Where a storage lists by directory, some operations scan the directories recursively, several at once. That can beat a scan of a flat list of files, e.g. for a pattern pruning most of the tree.
  • A storage's own operations on a whole tree, such as the atomic move of a directory, plug in where the storage has them.

One implementation for different storages

  • fsspec's abstract filesystem classes give default file operations, but many fsspec implementations override them, each for its own storage's behaviour.
  • This library declares a storage's behaviour in a profile instead. From the profile declared for a filesystem, its operations choose the fitting algorithm.

Adaptive file objects

  • The adaptive file classes aim at good read and write performance across access patterns, from random reads of short ranges to bulk sequential reads. No parameter or buffering strategy needs tuning for each workload.
  • They resize their buffers as the data is read or written.
  • They fetch and send a file's blocks on an event loop, in the background and in parallel, as far as they can.

Observability and control

  • Follow a long operation file by file, see which files failed, and stop it at any time, through the familiar fsspec calls.

It also offers

  • Copies between storages: one filesystem can span several storages, and copy or move files between them.
  • Transactions: writes can wait for fsspec's transaction to commit.
  • Works with what you have: existing fsspec filesystems, such as s3fs, get these features with a single call, and a new one by implementing a few basic operations.

Getting started

The library has two packages:

  • fsspec-alt-strategies, installed with pip install fsspec-alt-strategies;
  • fsspec-alt-strategies-impl, which we recommend copying into your own package, so that its behaviour changes only when you choose.

USAGE.md explains what to copy for each feature, and how to use each one.

Compatibility

  • Python: 3.11 to 3.14, each tested in CI.
  • fsspec: 2024.2.0 or later.
  • Dependencies: none but fsspec. The command line copying the strategies needs click, with the cli extra.
  • Filesystems: any fsspec filesystem, async or sync. Those known to monitored() are the local filesystem, s3fs, gcsfs, adlfs, and fsspec's memory, SFTP and HDFS filesystems.

Development, security and license

  • DEVELOPMENT.md explains how to work on the library: its design, setup, tests and releases.
  • SECURITY.md explains how to report a vulnerability.
  • The library is licensed under the Apache License 2.0. See LICENSE.

Metadata

Release files for fsspec-alt-strategies-impl 0.3.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 fsspec-alt-strategies-impl 0.3.0
File Size Uploaded Provenance Actions
fsspec_alt_strategies_impl-0.3.0.tar.gz 207.4 kB With provenance Details for fsspec_alt_strategies_impl-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fsspec-alt-strategies-impl 0.3.0
File Interpreter ABI Platform Actions
fsspec_alt_strategies_impl-0.3.0-py3-none-any.whl Python 3 none any Details for fsspec_alt_strategies_impl-0.3.0-py3-none-any.whl

Total release size: 373.8 kB

Release files / fsspec_alt_strategies_impl-0.3.0.tar.gz

Download URL fsspec_alt_strategies_impl-0.3.0.tar.gz
Size 207.4 kB
Tags Source
SHA-256 checksum
How to use checksums
5129aed8598c9c77b0823d2d5c1bf01155e66442b2cbf45b8d13f11635668a7b
BLAKE2b-256 checksum
How to use checksums
830d6c91eb7edbe0bc6dfc4b46e60275a823e36fbc3aa2aabaabc2097fc2d074
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Release files / fsspec_alt_strategies_impl-0.3.0-py3-none-any.whl

Download URL fsspec_alt_strategies_impl-0.3.0-py3-none-any.whl
Size 166.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aa0990c3353c70832fc7502bd18621746ece6746e7cad3ada1860e4f898e769b
BLAKE2b-256 checksum
How to use checksums
0d0f2fc621e1f2ebe88ac9135f9a7d9342dd2824b093c9f77d0952fa4f3689e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Security for fsspec-alt-strategies-impl 0.3.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for fsspec_alt_strategies_impl-0.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

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.

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