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.7

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.7
File Size Uploaded
hdfs_native-0.14.7.tar.gz 285.5 kB Details

Built distributions (wheels)

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

Total release size: 56.8 MB

Release files / hdfs_native-0.14.7.tar.gz

Download URL hdfs_native-0.14.7.tar.gz
Size 285.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b17422786c935bdec05f7f1fefa796ee146e047cbd47723607b2d4f892879331
BLAKE2b-256 checksum
How to use checksums
fcda8a4fdaeeeded840af1106bd815ff2a78f4e5813ba1289d4823c1fdf95638
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","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.7-cp314-cp314t-win_amd64.whl

Download URL hdfs_native-0.14.7-cp314-cp314t-win_amd64.whl
Size 5.2 MB
Tags CPython 3.14 CPython 3.14 free-threading Windows x86-64
SHA-256 checksum
How to use checksums
a23aff8a772794c7c63dc04ce8f9c0222e151406ac2f111a7d5ce8792d210b23
BLAKE2b-256 checksum
How to use checksums
6b7bcb99c4c29f6ca587548bc21108f384f245b19e640e307e7885486a843f18
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","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.7-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL hdfs_native-0.14.7-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 6.0 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
74c66c709d04f90119b22dd3c88265a8ccf5ebe7be9ea02905b1515d947955ba
BLAKE2b-256 checksum
How to use checksums
6e069fff81e3e6495fbd079d478774bd44fe13104e96e30470eb822884c6a4d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","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.7-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL hdfs_native-0.14.7-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 5.9 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
fbc1e14ba85e6d3a6a970e12dede79dbcbba7590c3cf20cc4757d2cddbd78076
BLAKE2b-256 checksum
How to use checksums
1f69fd78270a5e664d6ff08440a19c2d8d265ba8d75e252a477935c163163140
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","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.7-cp314-cp314t-macosx_11_0_arm64.whl

Download URL hdfs_native-0.14.7-cp314-cp314t-macosx_11_0_arm64.whl
Size 5.4 MB
Tags CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
f145db0d371143aec64e556e7d1de14509ff2ca601ff470a8c2676de1a3f69ea
BLAKE2b-256 checksum
How to use checksums
d1a345f2e7b6219da790bacbd698bff04dec7eb44d7ee96ea90888265c938b3b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","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.7-cp314-cp314t-macosx_10_12_x86_64.whl

Download URL hdfs_native-0.14.7-cp314-cp314t-macosx_10_12_x86_64.whl
Size 5.7 MB
Tags CPython 3.14 CPython 3.14 free-threading macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
7c5d1e74f333d591b3338312893db5910b89b35cb617a9612c8fc760d74234e5
BLAKE2b-256 checksum
How to use checksums
40ae3edb014aeadbfb1147c9c274ba3a350d8aa79eb3a0b3adc4fbdec5922f66
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","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.7-cp310-abi3-win_amd64.whl

Download URL hdfs_native-0.14.7-cp310-abi3-win_amd64.whl
Size 5.2 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
27b0ab00a175bf7a194f7f2dc8a719e80d5b445dc165f1f97b008d7401f0f5f4
BLAKE2b-256 checksum
How to use checksums
85e551963acfa575c664901d4bf245c64465165f65ad2fa5960bf1b080a4ce8f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","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.7-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL hdfs_native-0.14.7-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 6.0 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
5d11413c0b4c31d9d33956c70155216bff9ec28db3bbd0961f28abd7cb76682e
BLAKE2b-256 checksum
How to use checksums
5011e8e4616a159fbebacf6753d579b0c749980c175eb755d53c274888336e7d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","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.7-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL hdfs_native-0.14.7-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 5.9 MB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
d4beef896fe657bc253d57c67d0e64402e049d5447c11249fe9cf999731683ff
BLAKE2b-256 checksum
How to use checksums
1500d0dc0712e5858301c843e787bd3b92a49fe8a4f838809fdd82e12a83964b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","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.7-cp310-abi3-macosx_11_0_arm64.whl

Download URL hdfs_native-0.14.7-cp310-abi3-macosx_11_0_arm64.whl
Size 5.4 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
99732e4772946b2bade4913b0fbcc707bfe449832186cd030b38ca32c09b444a
BLAKE2b-256 checksum
How to use checksums
9593025256ac4da2f6e018575b0495ec4df59a5b7c95520ca657e43f97e68c4d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","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.7-cp310-abi3-macosx_10_12_x86_64.whl

Download URL hdfs_native-0.14.7-cp310-abi3-macosx_10_12_x86_64.whl
Size 5.7 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
2003f9c4259ca3ae41b23831f96ec61994a3cb6babddc02caab0406691206cdd
BLAKE2b-256 checksum
How to use checksums
9caabbf020967128e7e537a7b74f987764ab8b3aae811260b64f67127e81c309
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","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