Metadata-Version: 2.4
Name: fsspec-rs
Version: 0.1.3
Summary: fsspec-compatible backends with Rust acceleration
Project-URL: Repository, https://github.com/1kbgz/fsspec-rs
Project-URL: Homepage, https://github.com/1kbgz/fsspec-rs
Author-email: the fsspec-rs authors <dev@1kbgz.com>
License: Apache-2.0
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Programming Language :: Rust
Requires-Python: >=3.10
Requires-Dist: fsspec
Provides-Extra: develop
Requires-Dist: build; extra == 'develop'
Requires-Dist: bump-my-version; extra == 'develop'
Requires-Dist: check-dist; extra == 'develop'
Requires-Dist: cibuildwheel; extra == 'develop'
Requires-Dist: codespell; extra == 'develop'
Requires-Dist: hatch-rs; extra == 'develop'
Requires-Dist: hatchling; extra == 'develop'
Requires-Dist: laxate; extra == 'develop'
Requires-Dist: mdformat; extra == 'develop'
Requires-Dist: mdformat-tables>=1; extra == 'develop'
Requires-Dist: pytest; extra == 'develop'
Requires-Dist: pytest-benchmark; extra == 'develop'
Requires-Dist: pytest-cov; extra == 'develop'
Requires-Dist: ruff; extra == 'develop'
Requires-Dist: s3fs; extra == 'develop'
Requires-Dist: twine; extra == 'develop'
Requires-Dist: ty; extra == 'develop'
Requires-Dist: uv; extra == 'develop'
Requires-Dist: wheel; extra == 'develop'
Requires-Dist: yardang; extra == 'develop'
Description-Content-Type: text/markdown

# fsspec-rs

fsspec-compatible filesystem backends with Rust acceleration.

[![Build Status](https://github.com/1kbgz/fsspec-rs/actions/workflows/build.yaml/badge.svg?branch=main&event=push)](https://github.com/1kbgz/fsspec-rs/actions/workflows/build.yaml)
[![codecov](https://codecov.io/gh/1kbgz/fsspec-rs/branch/main/graph/badge.svg)](https://codecov.io/gh/1kbgz/fsspec-rs)
[![License](https://img.shields.io/github/license/1kbgz/fsspec-rs)](https://github.com/1kbgz/fsspec-rs)
[![PyPI](https://img.shields.io/pypi/v/fsspec-rs.svg)](https://pypi.python.org/pypi/fsspec-rs)

## Overview

`fsspec-rs` provides Python filesystem classes that inherit from
`fsspec.spec.AbstractFileSystem` while delegating core operations to Rust.
They can be used anywhere fsspec filesystems are accepted, including pandas,
dask, xarray, and direct `fsspec.open()` calls.

The package currently includes:

| Backend          | Protocol              | Python class                | Replaces                                       |
| ---------------- | --------------------- | --------------------------- | ---------------------------------------------- |
| Local filesystem | `file-rs`, `local-rs` | `fsspec_rs.LocalFileSystem` | `fsspec.implementations.local.LocalFileSystem` |
| Amazon S3        | `s3-rs`               | `fsspec_rs.S3FileSystem`    | `s3fs.S3FileSystem`                            |

## Install

```bash
pip install fsspec-rs
```

## Quick start

```python
import fsspec
from fsspec_rs import LocalFileSystem
from fsspec_rs import S3FileSystem

fs = LocalFileSystem()
fs.pipe_file("/tmp/example.txt", b"hello")
print(fs.cat_file("/tmp/example.txt"))

s3 = S3FileSystem(bucket="my-bucket", region="us-east-1")
s3.pipe_file("path/to/output.txt", b"hello")

with fsspec.open("file-rs:///tmp/example.txt", "rb") as f:
    print(f.read())
```

## Documentation

- [Filesystems](docs/src/filesystems.md): local and S3 usage, configuration, caching, and path conventions.
- [API reference](docs/src/api.md): Python API generated with yardang/Sphinx.
- [Rust traits](docs/src/rust.md): Rust `FileSystem`, experimental `AsyncFileSystem`, `FsFile`, and cache traits.

Build docs locally with:

```bash
yardang build
```
