Skip to main content

globusfs

An fsspec filesystem for Globus collections.

Status: working. Verified against three live collections — including ALCF Eagle (alcf#dtn_eagle, 747 project directories), where ls, glob, info, open() with mid-file seek, and sparse ranged reads all work against production Lustre. Writes (PUT/DELETE) round-trip on Globus Tutorial Collection 1. Anonymous pyarrow column projection works on a public collection — one column of sixty, a few KB instead of 360 KB — while that collection was intermittently returning backend-fault 404s.

import globusfs

# Browser login once; tokens persist to ~/.globusfs/tokens.json
fs = globusfs.filesystem("<collection-uuid>")

fs.ls("/")
with fs.open("data/file.parquet", "rb") as f:
    ...

Public collections need no credentials — and no globus-sdk:

import fsspec, pyarrow.parquet as pq

fs = fsspec.filesystem(
    "globus",
    collection_id="isaac",
    https_url="https://g-05a4b6.2d513.8443.data.globus.org",
)

with fs.open("isaac/ability/ALL_2007-01.parquet", "rb") as f:
    # Reads only the bytes this column needs, over HTTP range requests.
    table = pq.ParquetFile(f).read(columns=["author"])

Why

Globus is how large scientific datasets actually move between facilities, but there is no fsspec backend for it — so pyarrow, pandas, dask, and grain can't read a Globus collection the way they read s3:// or gs://. This fills that gap with one backend that serves all of them.

How it works

Globus Connect Server exposes two services, and this needs both:

Concern Service Why
Reading bytes HTTPS collection endpoint Serves full HTTP range semantics: 206, Content-Range, mid-file seeks, multipart
Listing / metadata Transfer API The HTTPS interface has no directory listings

The read path subclasses fsspec's HTTPFileSystem, which already speaks exactly the range dialect GCS serves.

Server quirks this works around

Verified against a live collection:

  • Backend flakiness surfaces as a 404. GCS load-balances across GridFTP backends; a failing one returns ENDPOINT_ERROR / GCS Manager Internal Error rendered as HTTP 404 — byte-identical in status to a genuinely missing file, and sticky for the life of a connection. Observed failure rates on the public test collection swung from 0/20 to 20/20 within minutes, hitting files, directories, and the collection root alike. Retries need a fresh connection, and the only way to tell a transient error from a real miss is to parse the body. A client that treats 404 as "absent" will report healthy data as missing.
  • Suffix ranges (bytes=-8) return 416, which is how parquet readers typically seek to the footer. Because info() knows the true size, readers can use absolute offsets instead.
  • HEAD is unusable. A HEAD 404 carries no body — and the body is the only thing distinguishing a backend fault from a real miss. So HEAD results are permanently ambiguous. Size and existence come from the Transfer API, or from a ranged GET (which does return a body and carries the total in Content-Range).
  • The HTTPS interface has no directory listings at all — hence the Transfer API for metadata.

Known ALCF collections

Resolved via endpoint_search; ALCF's docs list names, not UUIDs.

Collection UUID Type
alcf#dtn_eagle 05d2c76a-e867-4f67-aa57-76edeb0beda0 mapped
alcf#dtn_flare f39a7a0f-5bfc-46ce-9615-ba9f8592814f mapped
alcf#dtn_grand 3caddd4a-bb35-4c3d-9101-d9a0ad7f3a30 mapped
Globus Tutorials on ALCF Eagle a6f165fa-aee2-4fe5-95f3-97429c28bf82 guest, public

Eagle's collection root is already /eagle/projects, so paths are project-relative: fs.ls("/datascience"), not /eagle/projects/datascience.

Expect roughly 2 s per metadata or read operation through the DTN — fine for sparse reads and exploration, not for per-record access in a training loop. See the note on training workloads below.

Credentials

Token acquisition is pluggable, because it varies more than anything else: a public collection needs nothing, a portal already has a token, an interactive user needs a browser.

Provider Use
AnonymousCredentials Public collections (default)
StaticToken A token you already hold
CallableToken Fetch on demand — the pickle-safe option
AppCredentials Wraps globus_sdk UserApp/ClientApp

Two constraints worth knowing, both from the globus-sdk docs:

  • GlobusApp is not thread-safe, but fsspec shares one filesystem across threads. AppCredentials serializes every call through a lock.
  • fsspec pickles filesystems to worker processes. A live token in the constructor args would be copied into every worker payload, so StaticToken refuses to pickle; use CallableToken reading from the environment or shared storage so workers re-read rather than receive.

Also set request_refresh_tokens=True — it defaults to False, and without it a long run dies when the access token expires mid-epoch.

A note on training workloads

This is built for remote and sparse reads: column projection, exploration, data not yet staged. For distributed training, staging with Globus Transfer to node-local scratch beats per-record HTTPS on every axis — no per-record latency, no token expiry mid-epoch, and it works with formats like ArrayRecord whose readers do their own seeking.

Tests

Characterization tests hit a real public collection and are marked network:

pytest                    # everything
pytest -m "not network"   # offline only

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

globusfs-0.1.0.tar.gz (128.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

globusfs-0.1.0-py3-none-any.whl (21.2 kB view details)

Uploaded Python 3

File details

Details for the file globusfs-0.1.0.tar.gz.

File metadata

  • Download URL: globusfs-0.1.0.tar.gz
  • Upload date:
  • Size: 128.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for globusfs-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1634a1a0e6f12f568c6cd90e9f166b7b3d9e441082dfcea37275402165f05764
MD5 7d097291db6ccc90055e7a0b4c49e3eb
BLAKE2b-256 081aab5989dc23c7e30e068f308b16a53081f354762dc3cea1c8012556c022ad

See more details on using hashes here.

Provenance

The following attestation bundles were made for globusfs-0.1.0.tar.gz:

Publisher: release.yml on saforem2/globusfs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file globusfs-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: globusfs-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 21.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for globusfs-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 474999613f8d84d74206789f958f962d162d79079546e2af77302f2153221578
MD5 3094f05ef2d2d8c6f74e58ac59e64588
BLAKE2b-256 1cf06d038bbd2b28cf8195c0e76fabc3f0711ce2bfd3d62560434638aa6e31ba

See more details on using hashes here.

Provenance

The following attestation bundles were made for globusfs-0.1.0-py3-none-any.whl:

Publisher: release.yml on saforem2/globusfs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.2.0

2 files

This release

0.1.0 This release

2 files

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