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.
Metadata
Release files for deftree 2.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| deftree-2.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Release files / deftree-2.1.4-py3-none-any.whl
| Download URL | deftree-2.1.4-py3-none-any.whl |
|---|---|
| Size | 8.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
35cd6e65093ed1d59332ba718563c3bf20a654b20535c5742876206ad337edb6
|
|
BLAKE2b-256 checksum How to use checksums |
048c7e0fa114348ef602c4fbc08ec934429e11ae608caeb757f2e8d00b06511a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|