nbtlib
A python package to read and edit nbt data
Decision gist · record as of 2026-08-14
Yes, with conditions. nbtlib is the standard library for NBT handling in Python and has no known vulnerabilities. However, the project is abandoned (last commit December 2022, last release November 2021) and version 2.0.4 is explicitly marked unstable—use the stable 1.12.1 release for production work. If you need to work with NBT files and can tolerate no further upstream updates, it remains reliable; if you need active maintenance or expect format changes, verify that 1.12.1 meets your needs before committing.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.8 or later.
- Version 2.0.4 is unstable; the description recommends using version 1.12.1 for production use.
- Low install friction with a single runtime dependency (numpy).
License · maintenance · safety
MIT (permissive) — Licensed under MIT (permissive), so you can use, modify, and distribute nbtlib freely in commercial and private projects without restriction.
last release 2021-11-25 (1723 days) · last repo commit 2022-12-19 · 157 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 84,472 downloads/mo, #13,994 on PyPI
Alternatives
Verify before relying
import nbtlib
from nbtlib.tag import Int
# Load and read
nbt_file = nbtlib.load('demo.nbt')
value = nbt_file['counter']
# Edit and save
with nbtlib.load('demo.nbt') as demo:
demo['counter'] = Int(demo['counter'] + 1)- Whether version 2.0.4 is suitable for production use or if 1.12.1 should be preferred despite being older
- Current compatibility with modern Minecraft NBT format versions
- Whether the abandoned maintenance status affects real-world reliability for typical use cases
What it is and what it does
nbtlib is a Python library for reading, writing, and editing NBT (Named Binary Tag) files, the binary format Minecraft uses to store structured data. It provides both a programmatic API and a command-line tool for working with NBT data. The library treats NBT tags as Python objects that inherit from their built-in counterparts (e.g., NBT Compound tags inherit from dict, Int tags from int), making it natural to read and manipulate NBT data using standard Python operations.
The package supports multiple NBT variants: gzipped and uncompressed files, big-endian and little-endian byte orders, and both binary and literal (text) notation. It includes schema support for enforcing specific tag types on compound structures, NBT path syntax for accessing deeply nested properties, and a CLI for quick read/write/merge operations on NBT files. A single runtime dependency (numpy) keeps installation straightforward.
Use it for
- Parse and inspect Minecraft world data, player data, or schematic files stored in NBT format
- Programmatically modify NBT structures (player inventories, world properties, entity data) for server administration or data migration
- Convert NBT data between binary and human-readable literal notation for debugging or documentation
- Define and validate NBT schemas to ensure data integrity when working with structured Minecraft data
- Build tools or utilities that read or generate NBT files for Minecraft mods, datapacks, or server plugins
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, with conditions.
nbtlib is the standard library for NBT handling in Python and has no known vulnerabilities. However, the project is abandoned (last commit December 2022, last release November 2021) and version 2.0.4 is explicitly marked unstable—use the stable 1.12.1 release for production work. If you need to work with NBT files and can tolerate no further upstream updates, it remains reliable; if you need active maintenance or expect format changes, verify that 1.12.1 meets your needs before committing.
Install
nbtlib on PyPI
Before you install
Low install friction with a single runtime dependency (numpy). However, the package is in abandoned maintenance status with the last commit in December 2022 and no releases since November 2021. The current stable version is 1.12.1; version 2.0.4 is explicitly marked as unstable and actively worked on.
Requires Python 3.8 or later. Version 2.0.4 is unstable; the description recommends using version 1.12.1 for production use.
License in practice
Licensed under MIT (permissive), so you can use, modify, and distribute nbtlib freely in commercial and private projects without restriction.
Quickstart
import nbtlib
from nbtlib.tag import Int
# Load and read
nbt_file = nbtlib.load('demo.nbt')
value = nbt_file['counter']
# Edit and save
with nbtlib.load('demo.nbt') as demo:
demo['counter'] = Int(demo['counter'] + 1)
Verify before relying
- Whether version 2.0.4 is suitable for production use or if 1.12.1 should be preferred despite being older
- Current compatibility with modern Minecraft NBT format versions
- Whether the abandoned maintenance status affects real-world reliability for typical use cases
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.8,<4.0 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagenumpy |
| Maintenance | Abandoned 1,723 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 84,472 / month, #13,994 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9 |
Evidence: nbtlib-2.0.4-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “nbt file parser minecraft”
- nbtlibRead, write, and edit NBT (Named Binary Tag) data files used in…
- amulet-coreAmulet Core reads and writes Minecraft world data in various save…
- amulet-leveldbProvides a Cython wrapper around Mojang's modified LevelDB library…
Give your agent the search over MCP, or paste the wish link into any chat.
More Utilities packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.
Install it if you need to display or transform source code.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
See also amulet-core · mcpylib · geobuf · amulet-leveldb · bitarray-hardbyte · mcstatus · tibs · PyByteBuffer · python-bitcoinlib