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.11.1.tar.gz
(37.6 kB
view details)
File details
Details for the file pydefoldsdk-1.11.1.tar.gz.
File metadata
- Download URL: pydefoldsdk-1.11.1.tar.gz
- Upload date:
- Size: 37.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5fc03806ce55020f5cf2ad1e02fbd77848030b81572adc0e28627dbd1ae941a
|
|
| MD5 |
b8faf6a550f14d2b354954e3e899e9ea
|
|
| BLAKE2b-256 |
b3e5cbbb8a366318b579f0db1fd4b3048ef8af2d25c09e8b2aa7ad1251ee9a6c
|