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 0.4.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 0.4.0
File Size Uploaded Provenance Actions
fsspec_alt_strategies-0.4.0.tar.gz 17.1 kB With provenance Details for fsspec_alt_strategies-0.4.0.tar.gz

Built distribution (wheel)

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

Total release size: 35.8 kB

Release files / fsspec_alt_strategies-0.4.0.tar.gz

Download URL fsspec_alt_strategies-0.4.0.tar.gz
Size 17.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b3538e79e3cd93823d50f04c62cbbad10606e8e24ffbc59accda8d29c1eae7dc
BLAKE2b-256 checksum
How to use checksums
4f8f5d147ff36ab6649ac109d05012dbc765f4507818bc4b798535fc83d5372b
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 12, 2026.

Transparency log

Release files / fsspec_alt_strategies-0.4.0-py3-none-any.whl

Download URL fsspec_alt_strategies-0.4.0-py3-none-any.whl
Size 18.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9aa45fc750840160a0e361ef9b6014652c900c9563929d26438c5917618615bd
BLAKE2b-256 checksum
How to use checksums
baea55893b1b280516b5804b0b6cd8c625304a9cdd72ef8e7e0ce8802bbd4c5f
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 12, 2026.

Transparency log

Security for fsspec-alt-strategies 0.4.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-0.4.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 12, 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