Skip to main content

Native HDFS Python bindings based on hdfs-native Rust package.

Installation

pip install hdfs-native

Example

from hdfs_native import Client
client = Client("hdfs://localhost:9000")

status = client.get_file_info("/file.txt")

To use explicit Kerberos credentials, pass the principal and optionally a keytab and/or credential cache to either Client or AsyncClient:

from hdfs_native import Client

client = Client(
    "hdfs://namenode.example.com:9000",
    kerberos_principal="client@EXAMPLE.COM",
    kerberos_keytab="/run/secrets/client.keytab",
)

kerberos_principal is required when kerberos_keytab or kerberos_cache is provided. A keytab without an explicit cache uses a native in-memory cache. The same arguments are available on AsyncClient.

CLI

There is a built-in CLI hdfsn that implements most of the behavior of hdfs dfs but with a more bash-like syntax. The easiest way to use the CLI is with UV.

Install CLI with UV

uv tool install hdfs-ntaive

Auto-complete support

The CLI supports auto-complete for HDFS paths using argcomplete. There are two ways to enable this support

To permanently enable support for all Python modules using argcomplete:

uv tool install argcomplete
activate-global-python-argcomplete

To enable support just for hdfsn in your active shell:

uv tool install argcomplete
eval "$(register-python-argcomplete hdfsn)"

Kerberos support

Kerberos (SASL GSSAPI) is supported through a runtime dynamic link to libgssapi_krb5. This must be installed separately, but is likely already installed on your system. If not you can install it by:

Debian-based systems

apt-get install libgssapi-krb5-2

RHEL-based systems

yum install krb5-libs

MacOS

brew install krb5

Running tests

The same requirements apply as the Rust tests, requiring Java, Maven, Hadoop, and Kerberos tools to be on your path. Then you can:

python3 -m venv .venv
source .venv/bin/activate
pip3 install maturin
maturin develop -E devel
pytest

Metadata

Release files for hdfs-native 0.14.6

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-native 0.14.6
File Size Uploaded
hdfs_native-0.14.6.tar.gz 276.1 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for hdfs-native 0.14.6
File
hdfs_native-0.14.6-cp314-cp314t-win_amd64.whl CPython 3.14 CPython 3.14 free-threading Windows x86-64 Details
hdfs_native-0.14.6-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
hdfs_native-0.14.6-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ ARM64 Details
hdfs_native-0.14.6-cp314-cp314t-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64 Details
hdfs_native-0.14.6-cp314-cp314t-macosx_10_12_x86_64.whl CPython 3.14 CPython 3.14 free-threading macOS 10.12+ x86-64 Details
hdfs_native-0.14.6-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details
hdfs_native-0.14.6-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details
hdfs_native-0.14.6-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details
hdfs_native-0.14.6-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details
hdfs_native-0.14.6-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details

Total release size: 54.7 MB

Release files / hdfs_native-0.14.6.tar.gz

Download URL hdfs_native-0.14.6.tar.gz
Size 276.1 kB
Tags Source
SHA-256 checksum
How to use checksums
43b2bbd8d00ac6093685fae493e989450ad761801ea2cee4014864837370bbba
BLAKE2b-256 checksum
How to use checksums
93e46a864758af6e67affb91e91acfd094a244276efa71ef5949d3d9e5158bed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / hdfs_native-0.14.6-cp314-cp314t-win_amd64.whl

Download URL hdfs_native-0.14.6-cp314-cp314t-win_amd64.whl
Size 5.0 MB
Tags CPython 3.14 CPython 3.14 free-threading Windows x86-64
SHA-256 checksum
How to use checksums
b903ece2d0541f3b1d632a8598e7cf67e56a0a7cf24409057db2bd2004638009
BLAKE2b-256 checksum
How to use checksums
1b1dfee3f5ad92b8cc5bf511123316fc3f7fcf417303769ab820cf7e5e7edb80
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / hdfs_native-0.14.6-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL hdfs_native-0.14.6-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 5.8 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
3fd4788ec17fd881f2c42b588ebac62b2f61800624d595bb9857466e8b459315
BLAKE2b-256 checksum
How to use checksums
d95fd92695380ff4950cef674e8af7d0c240b31eed75f9c93fc0959dfa3b880c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / hdfs_native-0.14.6-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL hdfs_native-0.14.6-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 5.7 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
a5448c905be7799a2df54e523943445b5fea34f8d2332f8def3c6773cbb29f45
BLAKE2b-256 checksum
How to use checksums
5de4e043f1742860d9bcafa3c574f145769112d61fef848a69840fb051095a44
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / hdfs_native-0.14.6-cp314-cp314t-macosx_11_0_arm64.whl

Download URL hdfs_native-0.14.6-cp314-cp314t-macosx_11_0_arm64.whl
Size 5.2 MB
Tags CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
e53859d8a21bc5b2e76e8f71fc438d45b95378c580b32f96fd45df269b23a3f1
BLAKE2b-256 checksum
How to use checksums
2b2aeca151ebe56ace68d53c074b752ad73898a378589ea16f3a632b46874046
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / hdfs_native-0.14.6-cp314-cp314t-macosx_10_12_x86_64.whl

Download URL hdfs_native-0.14.6-cp314-cp314t-macosx_10_12_x86_64.whl
Size 5.5 MB
Tags CPython 3.14 CPython 3.14 free-threading macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
cec7c867fb688e7b971dd5d92a247df9ee26c328e069a7d3b581a9da7a986518
BLAKE2b-256 checksum
How to use checksums
35d9fb0a5e6734bf7453008f58acd955e9e4fd01cd5e3986a9646916ab41b976
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / hdfs_native-0.14.6-cp310-abi3-win_amd64.whl

Download URL hdfs_native-0.14.6-cp310-abi3-win_amd64.whl
Size 5.0 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
5d99f12ae8fc040fea206f787c3286b143851f28eb874c133b5e6651a843f51d
BLAKE2b-256 checksum
How to use checksums
5bca76357d438c2bdc2476161ff3d25bcd361a0a17868655a99e6dde2b31af49
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / hdfs_native-0.14.6-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL hdfs_native-0.14.6-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 5.8 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
49e12d97889bd865b0fbd1096972423d099d0e72487334b8ca6ce7e3134c8d64
BLAKE2b-256 checksum
How to use checksums
e8609babef4a68ca075da4b93d6bd7fe9250b111f59bb273441ba3e68e0f41c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / hdfs_native-0.14.6-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL hdfs_native-0.14.6-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 5.7 MB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
f2d4e09937b6a2529e120a4a5c54790c191fbe6b4238061fe469dee1fc039393
BLAKE2b-256 checksum
How to use checksums
27eb511a0ddf9fc10e3d6cafdce763c8e7ec01128324a34193e9bef6802511d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / hdfs_native-0.14.6-cp310-abi3-macosx_11_0_arm64.whl

Download URL hdfs_native-0.14.6-cp310-abi3-macosx_11_0_arm64.whl
Size 5.2 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
a2cdab85cc1fec68995464b4203da9bdf8707cb021c44d83d29c086360a0ffd9
BLAKE2b-256 checksum
How to use checksums
4a2931cacce57aa5b2db801065a07e04ef3ccdfd1e7e978758108f6c5e1d5707
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / hdfs_native-0.14.6-cp310-abi3-macosx_10_12_x86_64.whl

Download URL hdfs_native-0.14.6-cp310-abi3-macosx_10_12_x86_64.whl
Size 5.5 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
ed23ae1924d15021d86d3499872444497b8c0e3d5eb6954e01c2766f45ad5241
BLAKE2b-256 checksum
How to use checksums
01c7ee658eec2527b6422d2a39e4a80d80de755dc28b64f15045dfd792d5e974
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

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