Skip to main content
Help the Python Software Foundation raise $60,000 USD by December 31st!  Building the PSF Q4 Fundraiser

Python module to modify Defold files

Project description

DefTree is a python module for modifying Defold documents.


pip install deftree


You need to install the backport of the standard library typing module if you are running Python versions older than 3.5

pip install typing

Example Usage

Changing an atlas extrude border setting

import deftree
tree = deftree.parse(path)                  # parse the document into a DefTree
root = tree.get_root()                      # returns the root from the tree
root.set_attribute("extrude_borders", 2)    # sets the attribute "extrude_boarders" to 2
tree.write()                                # writes the file to the parsed files path


You can find the API on readthedocs.


Please take a look at the contributing guidelines if you’re interested in helping!

More information

Around the web, the initial post on, the package on PyPi and of course the repo on github.

Project details

Download files

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

Files for deftree, version 2.1.4
Filename, size File type Python version Upload date Hashes
Filename, size deftree-2.1.4-py3-none-any.whl (8.0 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page