Provide easy access to minecraft-data in Python.
This is a fork of the original python-minecraft-data with modern packaging infrastructure and lazy data loading using Pooch.
- Lazy data loading — Data is downloaded on-demand using Pooch and cached locally
- Efficient caching — Downloaded data is cached in
~/.cache/minecraft_data(configurable) - Modern packaging — Built with Poetry and PEP 517/518 standards
- Comprehensive tests — 90%+ code coverage with pytest
- CI/CD ready — GitHub Actions workflow with coverage enforcement
Clone and install from source:
git clone https://github.com/newexo/python-minecraft-data
cd python-minecraft-data
poetry installimport minecraft_data
# Load a specific version
mc_data = minecraft_data("1.21.6")
# Access version info
print(mc_data.version)
# Access items, blocks, etc. (if available for that version)
if hasattr(mc_data, 'items'):
print(mc_data.items)Currently supported for detailed testing:
1.20.61.21.6
Other versions in the minecraft-data repository are accessible but may have incomplete data.
This library provides Python access to the PrismarineJS minecraft-data project, which contains comprehensive Minecraft game data in JSON format.
Set the MINECRAFT_DATA_DIR environment variable to use a custom cache directory:
export MINECRAFT_DATA_DIR=/custom/path/to/minecraft/data
python your_script.pymake testmake check # Format, lint, and test
make format # Black formatting
make lint # Flake8 lintingmake coverage # Terminal report
make coverage-html # HTML reportMIT — See LICENSE for details.
- Original author: Vito Gamberini
- Game data source: PrismarineJS minecraft-data
- Maintained fork: Reuben Brasher