This release is a pre-release and may not be stable for production use.
Litemapy
Litemapy's goal is to provide an easy to use way to read and edit Litematica's schematic file format in python. Litematica is Minecraft mod by maruohon.Installation
Litemapy is available on pypi:
pip install litemapy
Features:
- Read and write .litematic files
- Full support for litematics' regions concept
- Full block storage support
- Full support for basic metadata handling (author, name, description, block count and total volume)
- Partial support for entities
- Partial support for tile entities
- Partial support for pending block updates
- Partial support for preview images
Documentation
Documentation is available on ReadTheDocs: litemapy.rtfd.io.
Example
Here is a basic example of creating a schematic, and of reading one:
from litemapy import Schematic, Region, BlockState
# Shortcut to create a schematic with a single region
reg = Region(0, 0, 0, 21, 21, 21)
schem = reg.as_schematic(name="Planet", author="SmylerMC", description="Made with litemapy")
# Create the block state we are going to use
block = BlockState("minecraft:light_blue_concrete")
# Build the planet
for x, y, z in reg.block_positions():
if round(((x-10)**2 + (y-10)**2 + (z-10)**2)**.5) <= 10:
reg[x, y, z] = block
# Save the schematic
schem.save("planet.litematic")
# Load the schematic and get its first region
schem = Schematic.load("planet.litematic")
reg = list(schem.regions.values())[0]
# Print out the basic shape
for x in reg.xrange():
for z in reg.zrange():
b = reg[x, 10, z]
if b.id == "minecraft:air":
print(" ", end="")
else:
print("#", end='')
print()
When ran, we get the expected output:
#######
###########
#############
###############
#################
###################
###################
#####################
#####################
#####################
#####################
#####################
#####################
#####################
###################
###################
#################
###############
#############
###########
#######
Metadata
Release files for litemapy 0.11.0b0
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 |
|---|---|---|---|---|
| litemapy-0.11.0b0.tar.gz | 34.8 kB | Without provenance | Details for litemapy-0.11.0b0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| litemapy-0.11.0b0-py3-none-any.whl | Python 3 | none | any | Details for litemapy-0.11.0b0-py3-none-any.whl |
Total release size: 65.8 kB
Release files / litemapy-0.11.0b0.tar.gz
| Download URL | litemapy-0.11.0b0.tar.gz |
|---|---|
| Size | 34.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2d9e1c93b58d048de1bda18ff8c5ec34d580753aa5f5c712e03ecbf02cf7ad56
|
|
BLAKE2b-256 checksum How to use checksums |
8f62300bcc82e3520394b9f98fb4390f139460bf46a01e89f61b52e5cbd469d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.4
|
Release files / litemapy-0.11.0b0-py3-none-any.whl
| Download URL | litemapy-0.11.0b0-py3-none-any.whl |
|---|---|
| Size | 31.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
18af0f847037413b9300b01c8a3179583bab25ca5a17853552abebc665545eb2
|
|
BLAKE2b-256 checksum How to use checksums |
76f954e3e36d1906e272505305fdc40fc3050ba67f3c7ffad3552ec673ab400b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.4
|
Security for litemapy 0.11.0b0
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.