Skip to main content
https://travis-ci.org/seventh/PyCraft.svg?branch=master

PyCraft

PyCraft is a high-quality Python library for offline edition of Minecraft worlds. High-quality, because it respects the spirit of the Python programming language (i.e. it is pythonic), and because it also takes care of memory consumption, which can be a huge problem during Minecraft world edition. PyCraft complies with Python 3.3 specifications.

PyCraft is governed by the CeCILL-C license under French law and abiding by the rules of distribution of free software.

Quick and dirty: edit a NBT-formatted file

Here is an example of modifications that can be operated with PyCraft on a file stored with NBT encoding format. NBT encoding is widely used in Minecraft.

from pycraft import nbt

# Load our favorite TAG_COMPOUND
W = nbt.load("entry.nbt")

# Add some meaningful information :)
W[u"author"] = "Me, myself and I"
W[u"date"] = "2014-02-26"

# By default, ints are of kind TAG_LONG. Nobody likes show-offs
W[u"nb_of_followers"] = 42
W.set_kind(u"nb_of_followers", con.TAG_BYTE)

# Save it back
nbt.save("entry.nbt", W)

Nota: The Python 2 u"" notation for unicode litteral constants, which had been removed by first releases of Python 3, had been added back by Python 3.3, in order to ease portability between the two Python flavours.

Known limitations of using PyCraft with a Python 2.7 interpreter

The current section lists the packages of PyCraft that are known to be incompatible of a Python 2.7 interpretation:

  • Not a single one.

Release files for PyCraft 1503040

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for PyCraft 1503040
File Size Uploaded
PyCraft-1503040.tar.bz2 24.5 kB Details

Release files / PyCraft-1503040.tar.bz2

Download URL PyCraft-1503040.tar.bz2
Size 24.5 kB
Tags Source
SHA-256 checksum
How to use checksums
4a5e210aff02931c38c39c3ff414bc8ff9a3d4a3445286dbb295dcd27657bd5e
BLAKE2b-256 checksum
How to use checksums
707debad9f0ed61b2120edbcbbb7baa48b5399cb306ded7e82ab77e5280d8c05
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1503040 This release

1 release file

1403230

1 release file

1403100

1 release file

1402240

1 release file

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