nbtx - NBT parser in Python
Zero-dependency, strictly-typed NBT parser and writer.
- Documentation: https://phoenixr-codes.github.io/nbtx/
- PyPI: https://pypi.org/project/nbtx/
Installation (Library)
Because the entire implementation finds place in a single file and does not
depend on third-party libraries, you can simply copy src/nbtx/__init__.py
to your project. Alternatively, you can install nbtx by using a package
manager.
Pip
pip install nbtx
Poetry
poetry add nbtx
uv
uv add nbtx
Installation (CLI)
pipx
pipx install nbtx
Usage (Library)
import nbtx
with open("file.nbt", "rb") as f:
content = nbtx.load(f)
print(content.pretty())
Usage (CLI)
You can display the contents of an NBT file by using the CLI of nbtx:
Read Big Endian NBT File
cat samples/bigtest.nbt | nbtx -e big
# or
nbtx -e big samples/bigtest.nbt
Read Little Endian NBT File
cat samples/caged_villager.mcstructure | nbtx -e little
# or
nbtx -e little samples/caged_villager.mcstructure
References
Metadata
Release files for nbtx 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nbtx-0.4.1.tar.gz | 9.0 kB | Without provenance | Details for nbtx-0.4.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nbtx-0.4.1-py3-none-any.whl | Python 3 | none | any | Details for nbtx-0.4.1-py3-none-any.whl |
Total release size: 18.9 kB
Release files / nbtx-0.4.1.tar.gz
| Download URL | nbtx-0.4.1.tar.gz |
|---|---|
| Size | 9.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4cff89779883ef639a71ca31c39b56bca4f238b4f1bebcd9527c871eda22955b
|
|
BLAKE2b-256 checksum How to use checksums |
05aa5ddb9e17f34ce158774476c05e144076ee8b467be3cb7022c434df0df94c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.3 CPython/3.11.14 Linux/6.17.5-arch1-1
|
Release files / nbtx-0.4.1-py3-none-any.whl
| Download URL | nbtx-0.4.1-py3-none-any.whl |
|---|---|
| Size | 9.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cea2abc9126ab5788cef5898fbb4e83396429dcb4437b4ba9417c8a7c07be755
|
|
BLAKE2b-256 checksum How to use checksums |
6651e6f3f0b75a2494e5ab1e5914535b03834a2a50edacd93e0ec3006a14d6c3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.3 CPython/3.11.14 Linux/6.17.5-arch1-1
|
Security for nbtx 0.4.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.