Skip to main content

Library for working with Picotron pods and userdata

Project description

Picopod

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 mainly intended for writing servers that efficiently interact with Picotron clients and working with data files for Picotron programs. 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. (TODO)

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.0b2.tar.gz (24.2 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.0b2-py3-none-any.whl (28.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: picopod-0.1.0b2.tar.gz
  • Upload date:
  • Size: 24.2 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.0b2.tar.gz
Algorithm Hash digest
SHA256 c722c3793d0a3ba4cbc6adcbc344ea2ffce77a2dd990747d53f5a36fa4d464e7
MD5 174baed94231ad1848c27642cbbb4c09
BLAKE2b-256 0495526527307e96c5a0e18c0289f1aabe1867b7cef323a289cd9222c3df1e75

See more details on using hashes here.

File details

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

File metadata

  • Download URL: picopod-0.1.0b2-py3-none-any.whl
  • Upload date:
  • Size: 28.2 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.0b2-py3-none-any.whl
Algorithm Hash digest
SHA256 af208232945dc10b3528b4069c66191ce54a2e6db98c77d20eeecd0cd69a884d
MD5 29f398be64ca07cf33e816494c8120e9
BLAKE2b-256 1263695a1d5b7ac4dfc3f444363e10eec9f64945f11a839dbd83ff5b5e0e6e40

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