A high-performance Minecraft schematic parser and utility library
Project description
Nucleation for Python
Python bindings for Nucleation, a high-performance Minecraft schematic
engine. Read, edit, build, simulate, and mesh .schematic, .litematic,
.nbt, and .mcstructure files — at native speed.
The core is written in Rust and compiled to a CPython extension via PyO3
(abi3-py38), so a single wheel works on every CPython 3.8+ on your
platform — no Rust toolchain required to install.
Install
pip install nucleation
Pre-built wheels are published for:
- Linux x86_64 and aarch64
- macOS x86_64 (Intel) and arm64 (Apple Silicon)
- Windows x86_64
If your platform isn't covered, pip will fall back to the source
distribution and build locally (requires a Rust toolchain).
Quick start
from nucleation import Schematic, sign, text
# Three explicit constructors (legacy `Schematic("file.schem")` still works):
schem = Schematic.open("example.litematic") # load from disk
fresh = Schematic.new("my_schematic") # blank
templ = Schematic.from_template("ab\ncd") # ASCII template
# Polished set_block: tuple coords, structured state and NBT, chainable.
schem.set_block((0, 0, 0), "minecraft:repeater",
state={"delay": 4, "facing": "east"})
schem.set_block((0, 1, 0), "minecraft:oak_sign",
state={"rotation": 8},
nbt=sign([text("Hello", color="gold"), "world"]))
# Format inferred from extension.
schem.save("out.litematic")
Hot loops
For placing many blocks, prefer the batch and fast-path APIs:
# 30+ M placements/sec — one native call.
schem.set_blocks([(x, 0, 0) for x in range(1_000_000)], "minecraft:stone")
# 10+ M placements/sec — pre-resolve once, place by index.
stone = schem.prepare_block("minecraft:stone")
place = schem.place
for x, y, z in positions:
place(x, y, z, stone)
Tile-entity helpers
from nucleation import Schematic, chest, sign, text, Item
schem = Schematic.new("loot_room")
schem.set_block((0, 0, 0), "minecraft:chest",
state={"facing": "north"},
nbt=chest([
Item("minecraft:diamond", count=64),
Item("minecraft:elytra"),
]))
schem.set_block((0, 1, 0), "minecraft:oak_sign",
nbt=sign([text("Loot", color="gold"), "this way →"]))
Documentation
Full reference, including simulation, meshing, and resource-pack rendering, lives in the main repository:
Why Rust?
Nucleation's core is shared across Rust, WebAssembly/JS, Python, and C/PHP — one engine, one set of behaviour, one set of tests. The Python package you install is the same engine that powers the JS and Rust libraries; you get native throughput for free.
License
AGPL-3.0-only. See the main repository for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nucleation-0.2.7.tar.gz.
File metadata
- Download URL: nucleation-0.2.7.tar.gz
- Upload date:
- Size: 5.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87b405b48018a29cfd31858f12e0186aa07e349b5c2753f555f8053821f82942
|
|
| MD5 |
1482b3d9117252bb84c09c109cffcb72
|
|
| BLAKE2b-256 |
7afa9700646a2fc49e0aac178fbb609aac4c514cb66f44efee053d580cae45d7
|
File details
Details for the file nucleation-0.2.7-cp38-abi3-win_amd64.whl.
File metadata
- Download URL: nucleation-0.2.7-cp38-abi3-win_amd64.whl
- Upload date:
- Size: 5.3 MB
- Tags: CPython 3.8+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8173376c34f16afd79e2599d7260dc951d3de313721d5052b4a37d5908e21c3e
|
|
| MD5 |
492ec11bfa8775c518b194f67d0fe8de
|
|
| BLAKE2b-256 |
893efa04cd532c5fe75882dea6ccf172c5a0366b1f72f0a8de4bd787c11cb75d
|
File details
Details for the file nucleation-0.2.7-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: nucleation-0.2.7-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 5.6 MB
- Tags: CPython 3.8+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5356f7b49fe7144447b7fd56a410e62546fe869576240a2318f6827f6d438e9d
|
|
| MD5 |
0afcfd38f25a4ba81cc6b6eef48eea7f
|
|
| BLAKE2b-256 |
5a4e19b14bc0587558a9267b1e8dbc7a892f4feb530801043f752a7a0957b7c4
|
File details
Details for the file nucleation-0.2.7-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: nucleation-0.2.7-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 5.7 MB
- Tags: CPython 3.8+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b885c5643f5db5d2ae8d0873d02ad77aba11f23a0b8d4cf9d9be3b23ce84099a
|
|
| MD5 |
2c4baf14e9085a2dd913c079ec5c40e6
|
|
| BLAKE2b-256 |
d47249a35e73fc6dfb9dc288bc79eb53348b65b524a2f96acf228a3cd77025e8
|
File details
Details for the file nucleation-0.2.7-cp38-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: nucleation-0.2.7-cp38-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 4.6 MB
- Tags: CPython 3.8+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e115551e4cc035ac465586ba6e8eb87c40f3bc9aabdfb4cb24326e3e4e4d27b7
|
|
| MD5 |
232076c7df581f0bb92011426d09a639
|
|
| BLAKE2b-256 |
f28865f5faaef9dc26e5ca11657d0dba8e5e9b1be918bf62e5da4bd2b1b01685
|
File details
Details for the file nucleation-0.2.7-cp38-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: nucleation-0.2.7-cp38-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 4.9 MB
- Tags: CPython 3.8+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08fcfc620b626ddcdae31900a0536186f16b6bf114e35033e54aed0d5c523fc7
|
|
| MD5 |
f36e78d6884223e1b5de2e33ecc2f9bc
|
|
| BLAKE2b-256 |
c6e0a0909153c174101c7d2df08984b8951990e64af0153fd36344df3a0222a4
|