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.0b5.tar.gz (24.0 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.0b5-py3-none-any.whl (28.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: picopod-0.1.0b5.tar.gz
  • Upload date:
  • Size: 24.0 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.0b5.tar.gz
Algorithm Hash digest
SHA256 abedc3a9097cc3968effb45e8b6ce04045b73b7c9ae301390abe9ffa9aa43720
MD5 63d2a9dad2e6b972c84bdcc7f75b4788
BLAKE2b-256 aafd42a031fdf2b5cb7f5a9e51dfe5165e31ceaba8e1e3580c91d7c462c95855

See more details on using hashes here.

File details

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

File metadata

  • Download URL: picopod-0.1.0b5-py3-none-any.whl
  • Upload date:
  • Size: 28.0 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.0b5-py3-none-any.whl
Algorithm Hash digest
SHA256 19e2e04da9078b5aabbf3f87647f02fda4c62c5ae69f6aa1c3ec6b893b02f7a4
MD5 21e0868a4bbba5133fb8de0d61490bab
BLAKE2b-256 3b03a70f01da8140e9e6b8c85668ed774c13301e81245bd12652087a29aaa5ce

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