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_11_1-1.11.1-py3-none-any.whl (56.9 kB view details)

Uploaded Python 3

File details

Details for the file pydefoldsdk_1_11_1-1.11.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pydefoldsdk_1_11_1-1.11.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a3de049b531914a3c0ae67a522e50c29b48e88a9a282b5ffdf53baa33c2e3609
MD5 99bcc43fcf2cbfe797bcd8a41fae7b5d
BLAKE2b-256 525665c5d6e7acfdd9f1113d594996a82a9cea8f3f412e307ac562af65c2d9ea

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