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 Distributions

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

Built Distribution

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

pydefoldsdk_1_12_1b0-1.12.1b0-py3-none-any.whl (54.3 kB view details)

Uploaded Python 3

File details

Details for the file pydefoldsdk_1_12_1b0-1.12.1b0-py3-none-any.whl.

File metadata

File hashes

Hashes for pydefoldsdk_1_12_1b0-1.12.1b0-py3-none-any.whl
Algorithm Hash digest
SHA256 1946d0bcd4d11f7faafe42b6d4eac082b021c8ba0919aab4d87e781ff94831fb
MD5 5dce1c5137873b265524eff5032bec79
BLAKE2b-256 a21bfddb2662dfe193fdc71dc00eb2d7883b65fa8b4c5ec9bbc3fff50d82cdc2

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