Skip to main content

fractfs

Drop-in tiered file storage for apps on ephemeral nodes.

fractfs lets an app with limited, ephemeral local disk transparently push large files to durable remote storage while keeping small hot state local, with periodic checkpoint/restore so a node stop/start doesn't lose data.

In essence, the file system is fractured into two layers, handled so that you don't have to think about it.

The only change to your application is one line at startup:

import fractfs
fractfs.init()

Selection of what goes where is handled by a .fractfs.toml file in the repo. No I/O interception, no monkeypatching — it works at the filesystem layer via symlinks, so it's library-agnostic (duckdb, polars, raw C all just work).

Any Remote Storage

fractfs doesn't care what the durable store is, only how it's reached:

Backend Reached as [dirs] redirect Checkpoint/restore Install
mount a POSIX filesystem path ✅ yes ✅ yes core (no deps)
fsspec an fsspec URL ❌ no ✅ yes fractfs[fsspec]

mount examples: a Databricks Volume mount, NFS/EFS, SMB, a plain local dir. fsspec examples: S3, GCS, ADLS. s3 is a kept alias for fsspec.

The [dirs] big-file redirect is implemented with directory symlinks, which need a POSIX target — so it requires the mount backend. To redirect big files to an object store, FUSE-mount it (mountpoint-s3 / gcsfuse / blobfuse2) and use the mount backend; the fsspec backend on its own gives you checkpoint/restore of local state, not redirect. See the platform recipes.

Install

pip install fractfs             # core: the mount backend (any POSIX path)
pip install 'fractfs[s3]'       # + fsspec/s3fs for S3/GCS/ADLS object stores
pip install 'fractfs[hashing]'  # + xxhash content-based change detection

Configuration

A single .fractfs.toml at the app root:

[dirs]
# Directories whose contents live on the durable remote store.
# Directory-granular. New files created here later also land remote by default.
paths = ["data/blobs", "exports", "cache/parquet"]

[ignore]
# gitignore-syntax. Matching files are NEVER synced/checkpointed.
patterns = ["*.tmp", "__pycache__/", ".DS_Store"]

[local]
# gitignore-syntax. Matching files are "hot": they live on LOCAL disk
# (fast, atomic rename) but ARE checkpointed for restore.
patterns = ["*.meta.json", "manifest.json", "index.sqlite"]

Environment Variables

Var Meaning Example
FRACTFS_BACKEND mount | fsspec (alias s3) mount
FRACTFS_REMOTE_ROOT Mount path or fsspec URL for the durable store /Volumes/cat/schema/vol, s3://bucket/app
FRACTFS_SYNC_INTERVAL Checkpoint cadence (seconds) 300
FRACTFS_SCRATCH Node-local scratch root for back-symlink targets /tmp/fractfs
FRACTFS_CHECKPOINT_SUBDIR Where checkpoints live under the remote store _checkpoint
FRACTFS_CONTENT_HASH Use content hashing for change detection true
FRACTFS_AUTO_IGNORE_BUNDLE Exclude the deploy bundle from the checkpoint true
FRACTFS_ROOT App root holding .fractfs.toml /app

Env vars override the TOML scalar fields. (Both FRACTFS_ and fractfs_ prefixes are accepted.) With no FRACTFS_REMOTE_ROOT set, fractfs runs in passthrough mode — no redirect, no checkpoint.

Tiers

Tier Source Lands Checkpointed? Mechanism
dirs [dirs].paths Remote No (already durable) directory symlink → REMOTE/<dir>
local [local].patterns Node Yes pre-created back-symlink when inside a remote dir
ignore [ignore].patterns Node No back-symlink (kept off remote) + sync walker skips
(default) everything else Node Yes normal local disk, checkpointed

Precedence (the load-bearing rule)

When a path matches more than one tier, highest priority wins:

  1. ignore — never synced, stays local.
  2. local — stays local, synced.
  3. dirs — remote redirect (the default for everything else under the dir).

Patterns use gitignore syntax (via pathspec) matched against the full relative path: manifest.json matches at any depth; data/blobs/manifest.json matches only there.

Public API

import fractfs

fractfs.init()        # load config, provision symlinks, restore checkpoint, start sync
# ... app runs unchanged ...
fractfs.sync_now()    # force a checkpoint (e.g. before graceful shutdown)
fractfs.status()      # tier of each tracked path, last sync time, etc.
fractfs.shutdown()    # stop the sync daemon (runs a final checkpoint)

init() blocks on restore before returning, so the app never reads cold state. The provisioner refuses to replace a non-empty real local directory with a symlink unless you pass fractfs.init(force=True) (which migrates its contents to the remote store first).

Additional Docs

  • docs/tiers.md — what the local tier does and doesn't guarantee, and how to keep specific files (lock files, sqlite, manifests) always-local inside a remote-redirected directory.
  • docs/deployment.md — deploy-bundle auto-ignore, the fast-ephemeral-disk (NVMe) layout, and the known sharp edges (multi-replica, FUSE atomicity, change detection).

Platform-Specific Guides

Copy-paste config for common setups:

  • docs/aws.md — S3 remote, EBS vs instance-store NVMe, OverlayFS, EFS alternative.
  • docs/databricks.md — Volume remote, deploying on Databricks Apps.
  • docs/gcp.md — GCS remote (gcsfs), GKE/Cloud Run/Local SSD, Filestore alternative.
  • docs/azure.md — ADLS/Blob remote (adlfs), AKS/Container Apps, Azure Files alternative.

License

See LICENSE.

Metadata

Release files for fractfs 0.2.1

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

Source distribution (sdist)

Source distribution for fractfs 0.2.1
File Size Uploaded Provenance Actions
fractfs-0.2.1.tar.gz 35.0 kB With provenance Details for fractfs-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fractfs 0.2.1
File Interpreter ABI Platform Actions
fractfs-0.2.1-py3-none-any.whl Python 3 none any Details for fractfs-0.2.1-py3-none-any.whl

Total release size: 60.1 kB

Release files / fractfs-0.2.1.tar.gz

Download URL fractfs-0.2.1.tar.gz
Size 35.0 kB
Tags Source
SHA-256 checksum
How to use checksums
5d7d815f8a51ea5fc694d2f904f5d849a0a8d386f0238cfa0ad74c7208826bff
BLAKE2b-256 checksum
How to use checksums
d7880688724c9d96726721385a64fae6a37ac4058aef0b9ae09e2d042d3f22ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jul 1, 2026.

Transparency log

Release files / fractfs-0.2.1-py3-none-any.whl

Download URL fractfs-0.2.1-py3-none-any.whl
Size 25.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e8cfdb64a46a0947508fcbdc8e684c3a511033b5798bd26e21c551997a0188a7
BLAKE2b-256 checksum
How to use checksums
10a2bb17dd357b9b50630dde4685ac8679a54116b25cef86f167b0f89387367e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jul 1, 2026.

Transparency log

Security for fractfs 0.2.1

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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for fractfs-0.2.1.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 Jul 1, 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.

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files Full 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