Python Package made by Mhadhbi Issam.
Project description
pydefoldsdk
defold protobuffers messages ported to python
install :
pip install pydefoldsdk
usage :
from pydefoldsdk import sdk
from google.protobuf.json_format import MessageToJson
from google.protobuf.text_format import MessageToString, Parse
print(sdk)
content = '''
name: "menu"
scale_along_z: 0
embedded_instances {
id: "go"
data: "components {\\n"
" id: \\"menu\\"\\n"
" component: \\"/examples/collection/proxy/menu.gui\\"\\n"
" position {\\n"
" x: 0.0\\n"
" y: 0.0\\n"
" z: 0.0\\n"
" }\\n"
" rotation {\\n"
" x: 0.0\\n"
" y: 0.0\\n"
" z: 0.0\\n"
" w: 1.0\\n"
" }\\n"
"}\\n"
""
position {
x: 0.0
y: 0.0
z: 0.0
}
rotation {
x: 0.0
y: 0.0
z: 0.0
w: 1.0
}
scale3 {
x: 1.0
y: 1.0
z: 1.0
}
}
'''
collection = sdk.CollectionDesc()
Parse(content.encode('utf-8'), collection)
print(MessageToString(collection))
print(MessageToJson(collection,preserving_proto_field_name=True))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pydefoldsdk-1.12.1b0.tar.gz
(35.5 kB
view details)
File details
Details for the file pydefoldsdk-1.12.1b0.tar.gz.
File metadata
- Download URL: pydefoldsdk-1.12.1b0.tar.gz
- Upload date:
- Size: 35.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba18ef0fde65c1142ba92fa5ff5562cfa59ee292b6ba8f3829d01482d4f5e480
|
|
| MD5 |
19aa52b6d9446221e9165f9ad320caab
|
|
| BLAKE2b-256 |
c6ba85970d770bd818db85d1c09ec13f4d4a0597c9177ba56a7156867c4bb062
|