Skip to main content

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


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.1.tar.gz (35.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pydefoldsdk-1.12.1-py3-none-any.whl (54.2 kB view details)

Uploaded Python 3

File details

Details for the file pydefoldsdk-1.12.1.tar.gz.

File metadata

  • Download URL: pydefoldsdk-1.12.1.tar.gz
  • Upload date:
  • Size: 35.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.8

File hashes

Hashes for pydefoldsdk-1.12.1.tar.gz
Algorithm Hash digest
SHA256 7b43ac5d2511c0322357666e84c0a5b0f290ba116f87fa6c39ea16fdd51c8653
MD5 1d4e247d9b14fa58280b90af9af84b7d
BLAKE2b-256 f23bec3e9043e20b0d628d5815401a281766954d3510c05ddc533765647b4f66

See more details on using hashes here.

File details

Details for the file pydefoldsdk-1.12.1-py3-none-any.whl.

File metadata

  • Download URL: pydefoldsdk-1.12.1-py3-none-any.whl
  • Upload date:
  • Size: 54.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.8

File hashes

Hashes for pydefoldsdk-1.12.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a523b89463b07f1e95b5b46950d2308fa67d74a691eb04d64443a636782d2377
MD5 bef4bd0700d987c780dfaf2f8ef6cef8
BLAKE2b-256 f62c09eacb6995d6856e7e99d7f2675729b3b97db050ec15a5aea9830c67f673

See more details on using hashes here.

Supported by

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