Skip to main content

nucleation

A high-performance Minecraft schematic engine, powered by a native Rust core. Parse, edit, diff, fingerprint, and generate schematics from Python.

Policy-driven normalization, material profiles, content inspection, UUID standardization, bounded decoding, and registry routing are documented in the complete transformation-policy guide.

Wheels are published for CPython 3.12+ (stable ABI) on Linux, macOS, and Windows. They include a py.typed marker and generated .pyi stubs for Mypy, Pyright, and editor completion. The installed package-level __init__.pyi explicitly re-exports every generated native type, followed by the hand-written veneer types; this keeps package exports equally visible to Mypy and Pyright while preserving the native classes' type identities.

Install

pip install nucleation

Quick start

import nucleation

schematic = nucleation.Schematic.create("demo")
schematic.set_block(1, 2, 3, "minecraft:stone")
print(schematic.get_block_name(1, 2, 3))  # "minecraft:stone"

schematic.save_to_file("demo.litematic")
loaded = nucleation.Schematic.load_from_file("demo.litematic")

Normalize imported content

Preview and apply the same versioned policy contract used by every language binding:

from nucleation import Schematic, TransformPlan, inspect_transform, apply_transform

schematic = Schematic.open("incoming.schem")
plan = TransformPlan.registry_safe()
preview = inspect_transform(schematic, plan)

if not preview.rejected and not preview.quarantined:
    report = apply_transform(schematic, plan)
    schematic.save("normalized.schem")

Inspection never mutates the schematic. Apply is atomic: a rejecting rule returns report.rejected == True and leaves the original unchanged. For only lossless palette cleanup, use TransformPlan.canonical().

Split disconnected builds

Keep every meaningful connected machine independent while attaching only tiny, nearby loose parts:

schematic = nucleation.Schematic.open("combined.schem")
pieces = schematic.split_connected_attach_nearby(
    16,  # components this large always remain standalone
    3,   # tiny parts may attach across at most three empty blocks
)

for index in range(pieces.len()):
    pieces.piece(index).save(f"machine-{index + 1}.schem")

Attachment is lossless and non-transitive: fragments cannot form a chain that recombines otherwise independent builds. Whole-world extraction, including the Python control plane and remote Store worker, is documented in the world-segmentation guide.

To emit every disconnected component literally, use a zero standalone threshold. Every component then becomes a core and the gap is ignored:

pieces = schematic.split_connected_attach_nearby(0, 0)

Curate a lossless corpus

Keep raw extraction lossless, then build registry and ranking views with an auditable policy. Every rejected ID and reason is retained:

from pathlib import Path
from nucleation import (
    CurationPolicy,
    curate_corpus,
    write_registry_archives,
    write_top_owner_archives,
)

policy = CurationPolicy.minima(
    min_blocks=2,          # reject standalone blocks
    min_palette_names=2,   # reject one-material schematics
    name="ore-sanity-v1",
)
corpus = curate_corpus(Path("/data/ore"), Path("/data/ore/curation/ore-sanity-v1"), policy)
write_registry_archives(corpus, Path("/data/ore/registry-import"))
write_top_owner_archives(corpus, Path("/data/ore/top-20-owner-archives"))

CurationPolicy also accepts declarative MetricRule entries over analyser or catalogue fields and named Python predicates. The policy receives a stable SHA-256 content ID which is embedded into package indexes and owner manifests. Changing a filter therefore cannot silently reuse an older curated result.

What is included

The published wheel contains the core feature set: schematic editing, all schematic formats, world import and export (including streaming), the schematic builder, the procedural building tool, definition regions, diff and fingerprinting, autostack, NBT helpers, SDF sampling, and the in-memory/filesystem store.

Redstone simulation, mesh generation, GPU rendering, and embedded scripting require building the package from source with the extra cargo features enabled (a Rust toolchain is required):

git clone https://github.com/Schem-at/Nucleation
cd Nucleation
pip install ./bindings/python

The source build defaults to the full feature set (bridge-full). Set the NUCLEATION_FEATURES environment variable to choose a different cargo feature list, for example NUCLEATION_FEATURES=bridge,simulation.

Documentation

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nucleation-0.10.16.tar.gz (2.9 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

nucleation-0.10.16-cp312-abi3-win_amd64.whl (12.0 MB view details)

Uploaded CPython 3.12+Windows x86-64

nucleation-0.10.16-cp312-abi3-manylinux_2_28_x86_64.whl (17.1 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.28+ x86-64

nucleation-0.10.16-cp312-abi3-macosx_11_0_arm64.whl (14.1 MB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

File details

Details for the file nucleation-0.10.16.tar.gz.

File metadata

  • Download URL: nucleation-0.10.16.tar.gz
  • Upload date:
  • Size: 2.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.14

File hashes

Hashes for nucleation-0.10.16.tar.gz
Algorithm Hash digest
SHA256 9cb7fba19678d0a59aa037c8fc4a960bd40b05d65f6b67956b5e66928944b6a2
MD5 36d53e04241a93d0cbf12fc8ac7da280
BLAKE2b-256 396d6c9cafdee1d835dd7a599e61f50398757b102b790baa735907cf1949f2c2

See more details on using hashes here.

File details

Details for the file nucleation-0.10.16-cp312-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for nucleation-0.10.16-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 6555d2f4eaa3f3499c6c54b1d1f9d197d8b6743d65479f3b5031b4853a99e01c
MD5 a1045dedbe6feeb305e0ab329710caaf
BLAKE2b-256 4b236397f4ae7da4369c5da51d1d5872b58d550527e8930400dd304f4afa964f

See more details on using hashes here.

File details

Details for the file nucleation-0.10.16-cp312-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nucleation-0.10.16-cp312-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4f27dd122d9bcff854c6e12eb9d3d903cdbe410d1d433686b21749ecb23111e2
MD5 8e0941f747383ba3360b282ec0af9119
BLAKE2b-256 fe5aa8ec428f51f5571a9ee8c48f895b4b9d7042eb54080d304d7efa8748264d

See more details on using hashes here.

File details

Details for the file nucleation-0.10.16-cp312-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for nucleation-0.10.16-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d91f48ea89f06386919ca3304d2f04131965987a0750767df1b23bb442a02c90
MD5 6194c90afaeface6a908b2c46a6879f6
BLAKE2b-256 acc30bb5a5544a4e5143641518b49817a7078e068a4bec6cde4a9e2959586b9c

See more details on using hashes here.

Release history Release notifications | RSS feed

0.10.24

4 files

0.10.23

4 files

0.10.22

4 files

0.10.21

4 files

0.10.20

4 files

0.10.19

4 files

0.10.18

4 files

This release

0.10.16 This release

4 files

0.10.15

4 files

0.10.14

4 files

0.10.13

4 files

0.10.12

4 files

0.10.9

4 files

0.10.8

4 files

0.10.7

4 files

0.10.4

4 files

0.10.1

4 files

0.10.0

4 files

0.9.2

4 files

0.9.1

4 files

0.8.0

4 files

0.7.0

4 files

0.6.0

4 files

0.5.1

4 files

0.5.0

4 files

0.4.1

4 files

0.4.0

4 files

0.3.19

4 files

0.3.18

3 files

0.3.17

3 files

0.3.16

3 files

0.3.15

3 files

0.3.14

3 files

0.3.13

3 files

0.3.12

3 files

0.3.11

3 files

0.3.10

3 files

0.3.9

3 files

0.3.8

3 files

0.3.7

3 files

0.3.6

3 files

0.3.5

3 files

0.3.4

3 files

0.3.3

3 files

0.3.2

3 files

0.3.1

3 files

0.3.0

3 files

0.2.18

6 files

0.2.15

6 files

0.2.13

6 files

0.2.12

6 files

0.2.11

6 files

0.2.10

6 files

0.2.7

6 files

0.2.6

6 files

0.2.5

6 files

0.2.4

6 files

0.2.3

6 files

0.2.2

6 files

0.2.1

6 files

0.1.184

6 files

0.1.183

6 files

0.1.182

2 files

0.1.181

2 files

0.1.179

2 files

0.1.172

2 files

0.1.171

2 files

0.1.170

2 files

0.1.169

2 files

0.1.168

2 files

0.1.167

2 files

0.1.166

2 files

0.1.163

2 files

0.1.156

2 files

0.1.155

2 files

0.1.154

2 files

0.1.153

2 files

0.1.152

2 files

0.1.151

2 files

0.1.150

2 files

0.1.149

2 files

0.1.148

2 files

0.1.147

2 files

0.1.146

2 files

0.1.145

2 files

0.1.144

2 files

0.1.143

2 files

0.1.142

2 files

0.1.141

2 files

0.1.140

2 files

0.1.138

2 files

0.1.136

2 files

0.1.135

2 files

0.1.134

2 files

0.1.133

2 files

0.1.132

2 files

0.1.130

2 files

0.1.129

2 files

0.1.128

2 files

0.1.127

2 files

0.1.126

2 files

0.1.125

2 files

0.1.124

2 files

0.1.123

2 files

0.1.122

2 files

0.1.120

2 files

0.1.119

2 files

0.1.118

2 files

0.1.117

2 files

0.1.116

2 files

0.1.115

2 files

0.1.114

2 files

0.1.113

2 files

0.1.112

2 files

0.1.111

2 files

0.1.110

2 files

0.1.109

2 files

0.1.108

2 files

0.1.106

2 files

0.1.105

2 files

0.1.104

2 files

0.1.103

2 files

0.1.102

2 files

0.1.101

2 files

0.1.100

2 files

0.1.99

2 files

0.1.98

2 files

0.1.97

2 files

0.1.95

2 files

0.1.94

2 files

0.1.93

2 files

0.1.92

2 files

0.1.90

2 files

0.1.89

2 files

0.1.87

2 files

0.1.85

2 files

0.1.84

2 files

0.1.83

2 files

0.1.82

2 files

0.1.81

2 files

0.1.80

2 files

0.1.79

2 files

0.1.78

2 files

0.1.77

2 files

0.1.75

2 files

0.1.72

2 files

0.1.71

2 files

0.1.69

2 files

0.1.68

2 files

0.1.67

2 files

0.1.62

2 files

0.1.58

2 files

0.1.48

2 files

0.1.45

2 files

0.1.44

2 files

0.1.43

2 files

0.1.42

2 files

0.1.39

2 files

0.1.38

2 files

0.1.32

2 files

0.1.31

2 files

0.1.25

2 files

0.1.21

2 files

0.1.20

2 files

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