Skip to main content

hdfs-s3-gateway (Python)

Python bindings for the HDFS → S3 read-only gateway. This package wraps the Rust gateway so it can be driven from Python either as a foreground blocking call or as an in-process background server.

Install

pip install hdfs-s3-gateway

Python 3.10 or newer. Wheels are published for Linux (x86_64, aarch64), macOS (arm64), and Windows (x64), including free-threaded 3.14t builds. Other platforms (macOS Intel, musl/Alpine) build from source and need a Rust toolchain.

Usage

from hdfs_s3_gateway import Gateway

# Background server (no subprocess — runs on its own native thread + tokio runtime).
gw = Gateway(namenode_uri="hdfs://localhost:8020", hdfs_root="/data", bucket_name="hdfs")
gw.start()
print(gw.address)   # e.g. "127.0.0.1:8080"
# ... point any S3 client at the endpoint ...
gw.stop()           # graceful shutdown

# Or as a context manager:
with Gateway(config_path="gateway.toml") as gw:
    print(gw.address)
    # ... use the endpoint ...

Caches (metadata, block maps, directory listings and negative lookups) are off by default. Enable them for read-heavy workloads with Gateway(..., cache_enabled=True) (or [cache] enabled = true / HDFS_S3_CACHE_ENABLED=1). The same argument is the incident kill switch: pass cache_enabled=False to bypass the caches without waiting for a release, and read gw.cache_enabled to confirm the effective value. Within a TTL, an object written by another client may not be visible yet.

The gateway performs no authentication by default — it must run behind network-level access control. See the top-level project README for the full security posture. You can optionally enable SigV4 auth by passing auth_secret="..." to Gateway(...) (or the --auth-secret CLI flag / auth_secret TOML key). When set, a valid signature is required (unsigned requests are rejected, wrong secret → 403 SignatureDoesNotMatch), so clients use normal signing (any access-key id + that secret) instead of anonymous / aws_skip_signature. When unset (the default), the gateway accepts both anonymous and signed requests.

Reading data through the gateway

Once the gateway is running, point any S3 client at its endpoint. The examples below assume the gateway was started with hdfs_root="/data" and bucket_name="hdfs", exposing a hive-partitioned table at s3://hdfs/seed_parquet/country=us/year=2021/data.parquet.

By default all clients use anonymous / unsigned access (the gateway has no auth). The endpoint is http://<gw.address> — e.g. http://127.0.0.1:39111. If you started the gateway with auth_secret, drop the anonymous / aws_skip_signature flags and pass any access-key id plus that secret instead.

polars

import polars as pl

ep = f"http://{gw.address}"
so = {
    "aws_skip_signature": "true",
    "aws_endpoint_url": ep,
    "aws_allow_http": "true",
}
# Whole directory tree (hive partition columns are recovered automatically):
df = pl.read_parquet(f"s3://hdfs/seed_parquet/", storage_options=so)
# Or a recursive glob (polars expands it client-side into S3 listings):
df = pl.read_parquet(f"s3://hdfs/seed_parquet/country=*/year=*/*.parquet", storage_options=so)

DuckDB

import duckdb

ep = f"http://{gw.address}"
host = ep.replace("http://", "")
duckdb.sql("INSTALL httpfs; LOAD httpfs;")
duckdb.sql(f"SET s3_endpoint='{host}';")
duckdb.sql("SET s3_use_ssl=false;")
duckdb.sql("SET s3_access_key_id='';")
duckdb.sql("SET s3_secret_access_key='';")
duckdb.sql("SET s3_session_token='';")
duckdb.sql("SET s3_url_style='path';")

# DuckDB's httpfs reads a directory tree via a recursive glob:
df = duckdb.sql("SELECT * FROM read_parquet('s3://hdfs/seed_parquet/**')").df()

pandas (pyarrow engine)

import pandas as pd

ep = f"http://{gw.address}"
so = {
    "anon": "true",
    "endpoint_url": ep,
    "client_kwargs": {"endpoint_url": ep},
}
# pandas delegates s3:// URIs to fsspec/s3fs, not pyarrow's native S3 filesystem.
df = pd.read_parquet("s3://hdfs/seed_parquet/", storage_options=so)

pandas (s3fs / fsspec engine)

import pandas as pd

ep = f"http://{gw.address}"
so = {
    "anon": "true",
    "endpoint_url": ep,
    "client_kwargs": {"endpoint_url": ep},
}
df = pd.read_parquet("s3://hdfs/seed_parquet/", storage_options=so)

pyarrow (native S3FileSystem)

import pyarrow.dataset as ds
import pyarrow.fs as pafs

ep = f"http://{gw.address}"
host = ep.replace("http://", "")
s3 = pafs.S3FileSystem(anonymous=True, endpoint_override=host, scheme="http")
# pyarrow wants a "bucket/key" path, not a full s3:// URI.
dataset = ds.dataset("hdfs/seed_parquet", format="parquet", filesystem=s3, partitioning="hive")
table = dataset.to_table()

Note on path forms. Only polars and DuckDB expand glob patterns (country=*/year=*) client-side into real S3 listings; the other engines pass the glob literally to the gateway, which cannot match it. For a whole partitioned table, use the directory form (s3://hdfs/seed_parquet/).

Metadata

Release files for hdfs-s3-gateway 0.3.3

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

Source distribution (sdist)

Source distribution for hdfs-s3-gateway 0.3.3
File Size Uploaded Provenance Actions
hdfs_s3_gateway-0.3.3.tar.gz 256.7 kB With provenance Details for hdfs_s3_gateway-0.3.3.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for hdfs-s3-gateway 0.3.3
File Actions
hdfs_s3_gateway-0.3.3-cp314-cp314t-win_amd64.whl CPython 3.14 CPython 3.14 free-threading Windows x86-64 Details for hdfs_s3_gateway-0.3.3-cp314-cp314t-win_amd64.whl
hdfs_s3_gateway-0.3.3-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ x86-64 Details for hdfs_s3_gateway-0.3.3-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
hdfs_s3_gateway-0.3.3-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ ARM64 Details for hdfs_s3_gateway-0.3.3-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
hdfs_s3_gateway-0.3.3-cp314-cp314t-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64 Details for hdfs_s3_gateway-0.3.3-cp314-cp314t-macosx_11_0_arm64.whl
hdfs_s3_gateway-0.3.3-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details for hdfs_s3_gateway-0.3.3-cp310-abi3-win_amd64.whl
hdfs_s3_gateway-0.3.3-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details for hdfs_s3_gateway-0.3.3-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
hdfs_s3_gateway-0.3.3-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details for hdfs_s3_gateway-0.3.3-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
hdfs_s3_gateway-0.3.3-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details for hdfs_s3_gateway-0.3.3-cp310-abi3-macosx_11_0_arm64.whl

Total release size: 36.8 MB

Release files / hdfs_s3_gateway-0.3.3.tar.gz

Download URL hdfs_s3_gateway-0.3.3.tar.gz
Size 256.7 kB
Tags Source
SHA-256 checksum
How to use checksums
3ab0b004572beb383e189999c9a27f5baccf758b69649dd4188712f421b94d90
BLAKE2b-256 checksum
How to use checksums
aefac0c8ff0f75130fcf09fee40f807610f4e20d7c3a7ed605346d3d957aa0d3
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 Oct 25, 2026.

Transparency log

Release files / hdfs_s3_gateway-0.3.3-cp314-cp314t-win_amd64.whl

Download URL hdfs_s3_gateway-0.3.3-cp314-cp314t-win_amd64.whl
Size 4.4 MB
Tags CPython 3.14 CPython 3.14 free-threading Windows x86-64
SHA-256 checksum
How to use checksums
6e5a640f179b02a36c18f1f69b78509d55e25a9d84768e009d4b082509ad0355
BLAKE2b-256 checksum
How to use checksums
f8cda9dd68f1e6f9d11b3e8c4f58ae276680df67ceab01d5da1d1287068c56a8
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 Oct 25, 2026.

Transparency log

Release files / hdfs_s3_gateway-0.3.3-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL hdfs_s3_gateway-0.3.3-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 5.0 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
bd387292385037135d73e137463f0172f9327df2bd10b21bdab1efda2baa0dbe
BLAKE2b-256 checksum
How to use checksums
8c859a6686fe5da290eba2cfd181ad9559f9731afc752124fc7723d9d3593c9b
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 Oct 25, 2026.

Transparency log

Release files / hdfs_s3_gateway-0.3.3-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL hdfs_s3_gateway-0.3.3-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 5.0 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
c85ae2d915b012d602c3b9a1eacc92123a0db04aae72aae8c0bbe2a8057c6ed6
BLAKE2b-256 checksum
How to use checksums
3cd90d7140079e24377c9b631491927ac507a891b2418e2429111c986a3bb6de
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 Oct 25, 2026.

Transparency log

Release files / hdfs_s3_gateway-0.3.3-cp314-cp314t-macosx_11_0_arm64.whl

Download URL hdfs_s3_gateway-0.3.3-cp314-cp314t-macosx_11_0_arm64.whl
Size 3.9 MB
Tags CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
b493b64f5252452549a73a6fec08d857bc6d50d3eb71f4ab5d6310c1dfd41580
BLAKE2b-256 checksum
How to use checksums
bfee3ffa9b3208a41fd7b9d5bb47d3dd8dabe5e27fb3fd9503f1e2594de4ef35
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 Oct 25, 2026.

Transparency log

Release files / hdfs_s3_gateway-0.3.3-cp310-abi3-win_amd64.whl

Download URL hdfs_s3_gateway-0.3.3-cp310-abi3-win_amd64.whl
Size 4.4 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
74f1f4dd25cb682c0591a2cc88d5a58dc5968fb96abee66dcca15043e38b1b9d
BLAKE2b-256 checksum
How to use checksums
d290fc67d0bfee9bf37905665d94969717ee61b52b29f5ad4d4a11ee4ac18140
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 Oct 25, 2026.

Transparency log

Release files / hdfs_s3_gateway-0.3.3-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL hdfs_s3_gateway-0.3.3-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 5.0 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
06ca24dc34073139377274224011661b4e6fc82919e8caf4b9b875c62549519f
BLAKE2b-256 checksum
How to use checksums
7dd7fbfb3483432c879c1c2cb28bdd1c3beccae360ec0f1600479fdb8fc0ca69
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 Oct 25, 2026.

Transparency log

Release files / hdfs_s3_gateway-0.3.3-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL hdfs_s3_gateway-0.3.3-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 5.0 MB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
31afa7c36c1543d01bb318cf55226abb037ca53c33bf087b757c164170d2db25
BLAKE2b-256 checksum
How to use checksums
28f3284a960ffbe57378a50209cb204fa5648dea7efd6e3ae15719f51384ddde
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 Oct 25, 2026.

Transparency log

Release files / hdfs_s3_gateway-0.3.3-cp310-abi3-macosx_11_0_arm64.whl

Download URL hdfs_s3_gateway-0.3.3-cp310-abi3-macosx_11_0_arm64.whl
Size 3.9 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
736f94502ef131d0417f75e17161811e6934421b0011d293d0fddf91857320dd
BLAKE2b-256 checksum
How to use checksums
9f2a4c376e8a9a68326a4d1e14d43b968d9b5591f349530fe3912d680d926c1b
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 Oct 25, 2026.

Transparency log

Security for hdfs-s3-gateway 0.3.3

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 9 files in this release have been uploaded with provenance metadata.

Select from 9 files

Attestation for hdfs_s3_gateway-0.3.3.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 Oct 25, 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