Skip to main content

High quality Minecraft world editor

Project description

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 con

# Load our favorite TAG_COMPOUND
W = con.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
con.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.

Project details


Download files

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

Source Distribution

PyCraft-1403230.tar.bz2 (26.2 kB view details)

Uploaded Source

File details

Details for the file PyCraft-1403230.tar.bz2.

File metadata

  • Download URL: PyCraft-1403230.tar.bz2
  • Upload date:
  • Size: 26.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for PyCraft-1403230.tar.bz2
Algorithm Hash digest
SHA256 89bad4c86f1070a10810114d34a9b7902aa9f8a7b4a67f4d16860a7dd29bef72
MD5 e82c45108c4d832f6a8d19b83231ce26
BLAKE2b-256 118cb6de8d6521bb3554babb624e0cdd6fc327dc9baf814b787ca291e468e8da

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page