Skip to main content

Python Package made by Mhadhbi Issam .

Project description

PyDefold

Getting started

Install :

pip install  PyDefold

Example

from PyDefold.gameobject import *
from google.protobuf.json_format import MessageToJson
from google.protobuf.text_format import MessageToString, Parse

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
  }
}
'''

if __name__ == "__main__" : 
    collection = CollectionDesc()
    Parse(content.encode('utf-8'), collection)
    print(MessageToString(collection))
    print(MessageToJson(collection))

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

pydefold-1.1.6.tar.gz (35.0 kB view details)

Uploaded Source

Built Distribution

pydefold-1.1.6-py3-none-any.whl (54.7 kB view details)

Uploaded Python 3

File details

Details for the file pydefold-1.1.6.tar.gz.

File metadata

  • Download URL: pydefold-1.1.6.tar.gz
  • Upload date:
  • Size: 35.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for pydefold-1.1.6.tar.gz
Algorithm Hash digest
SHA256 35aedd8c20a679f411231c2dabecf21095c25cca59eac81ff3acd0b7d4c58067
MD5 da4b54c3f4a71173553d1317e056f0e6
BLAKE2b-256 f67ade540fe0b6dc4661061161b46f680534b5c4518ddc2b4b68a89cb96ec842

See more details on using hashes here.

File details

Details for the file pydefold-1.1.6-py3-none-any.whl.

File metadata

  • Download URL: pydefold-1.1.6-py3-none-any.whl
  • Upload date:
  • Size: 54.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for pydefold-1.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 787a6b15097bf85d8a684f6efa88c2b9cba6c1857d6c738038fbfc3bb67c8da9
MD5 c9e67a5edc1b8dfa5ca2a31791d78ae1
BLAKE2b-256 5d8791123f215caa741308b6fb4a35e8a439feb58729b099325987761f953d2a

See more details on using hashes here.

Supported by

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