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

Uploaded Python 3

File details

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

File metadata

  • Download URL: picopod-0.1.0b4.tar.gz
  • Upload date:
  • Size: 24.1 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.0b4.tar.gz
Algorithm Hash digest
SHA256 34f38c84c9a782b129e201258e3d9ca7e21b84b50e6408aac8a4da40aa2ee576
MD5 4a71bc9ea485f6b988cb053da73d98aa
BLAKE2b-256 e415f2b21f8c870bc02e5c12ce5676243df19e14a1d48f24d284dba7fdb5958d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: picopod-0.1.0b4-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.0b4-py3-none-any.whl
Algorithm Hash digest
SHA256 912f1c7222b5946cb3c7ce705b83c55334be2fcc2ca133dceb00478837b65310
MD5 f6cc5fe79060f6d36e1618bade329613
BLAKE2b-256 adf7b3fe05b66459fbebceca13aedc4c99faa19e33347191f69b61e402d18b3e

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