Skip to main content

Python module to modify Defold files

Project description

https://travis-ci.org/Jerakin/DefTree.svg?branch=master https://img.shields.io/github/release/jerakin/deftree.svg

DefTree is a python module for modifying Defold documents.

Install

pip install deftree

Dependencies

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

API

You can find the API on readthedocs.

Contributing

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

More information

Around the web, the initial post on forum.defold.com, 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.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

deftree-2.1.4-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file deftree-2.1.4-py3-none-any.whl.

File metadata

  • Download URL: deftree-2.1.4-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

File hashes

Hashes for deftree-2.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 35cd6e65093ed1d59332ba718563c3bf20a654b20535c5742876206ad337edb6
MD5 fdd80b1619ce784027618c94d0d7cc0f
BLAKE2b-256 048c7e0fa114348ef602c4fbc08ec934429e11ae608caeb757f2e8d00b06511a

See more details on using hashes here.

Supported by

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