Skip to main content
Pre-release

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.

PyPI - Python Version PyPI PyPI - Downloads Commits since latest release Documentation Status

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)

Source distribution for litemapy 0.11.0b0
File Size Uploaded
litemapy-0.11.0b0.tar.gz 34.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for litemapy 0.11.0b0
File Interpreter ABI Platform
litemapy-0.11.0b0-py3-none-any.whl Python 3 none any Details

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
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