Skip to main content

Library for working with Picotron pods and userdata

Project description

Picopod

🐍 PyPI     📘 Documentation     🧑‍🎓 Examples     🔧 Contributing

Picopod is a Python library for working with Picotron pods, serialized objects which resemble Lua and also support embedded binary data. All pod features as of Picotron 0.3.0d are supported, including userdata and compression.

It's useful for working with data files for Picotron programs and writing servers that efficiently interact with Picotron clients. It is not a generic serialization library for arbitrary Python objects.

Python 3.12 or above is required, and full type annotations for type checkers are included. The only external dependency is the lz4 library needed to handle compressed pods.

Make sure to read the contribution guide before submitting issues or pull requests.

Basic Usage

You can install Picopod from PyPI using pip or another package manager:

pip install picopod

Then, use the pod() function to serialize values:

>>> from picopod import pod
>>> pod(1234)
b'1234'
>>> pod("Hello, world!")
b'"Hello, world!"'
>>> pod([1, 2, 3])
b'{1,2,3}'
>>> pod({"fullscreen": False, "pixel_scale": 3})
b'{fullscreen=false,pixel_scale=3}'

And use unpod() to deserialize them:

>>> from picopod import unpod
>>> unpod("1234")
1234
>>> unpod('"Hello, world!"')
'Hello, world!'
>>> unpod("{1,2,3}")
[1, 2, 3]
>>> unpod("{fullscreen=false,pixel_scale=3}")
{'fullscreen': False, 'pixel_scale': 3}

Refer to the documentation for more details.

License

Picopod is licensed under the terms of the MIT license.

Picopod is a community project. It is not affiliated with Lexaloffle.

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

picopod-0.1.0b3.tar.gz (24.3 kB view details)

Uploaded Source

Built Distribution

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

picopod-0.1.0b3-py3-none-any.whl (28.3 kB view details)

Uploaded Python 3

File details

Details for the file picopod-0.1.0b3.tar.gz.

File metadata

  • Download URL: picopod-0.1.0b3.tar.gz
  • Upload date:
  • Size: 24.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"CachyOS Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for picopod-0.1.0b3.tar.gz
Algorithm Hash digest
SHA256 8aa7e0bb2088409a42a6ec00f4407069e1d516baac6476a0f0178631be528eb3
MD5 39173caec24f9defa275e6ad7aced1a4
BLAKE2b-256 ed59a5889bc0a345169bc10e4db0e47a7ac01f9f78c6686bd1eb74bb8247a8ac

See more details on using hashes here.

File details

Details for the file picopod-0.1.0b3-py3-none-any.whl.

File metadata

  • Download URL: picopod-0.1.0b3-py3-none-any.whl
  • Upload date:
  • Size: 28.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"CachyOS Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for picopod-0.1.0b3-py3-none-any.whl
Algorithm Hash digest
SHA256 98cdde09112cba7099d71e86ddb9cf5112d9bf4c84fee14e09e8a05c2eeb39ca
MD5 baddf1ded774befa0a0ff3ad7b757573
BLAKE2b-256 341fcbd61c94f3987ec481fff3aae93a9a47dab38b4a3037f783b850f79b4c01

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