Skip to main content

Easy to use binary packer that doesn't require struct's specifications

Project description

pyparcel

Build Status Downloads

pyparcel is the simple and secure way to convert python objects to bytestrings. pyparcel extends the usage of struct and provides a simpler way to pack classes and built-in types.

Installation

Use the package manager pip to install pyparcel:

pip install pyparcel

or using pipenv:

pipenv install pyparcel

Usage

import pyparcel

foo: Foo = Foo(8, 5.7, "Hello World") # Foo(int, float, str)
data: bytes = pyparcel.pack(foo) # b'\x08\x00\x00\x00ff\xb6@\x0b\x00\x00\x00Hello World'

# ...

bar: Foo = Foo()
pyparcel.unpack(data, bar) # foo == bar
# or
baz: Foo = pyparcel.unpack(data, Foo()) # foo == baz

Contributing

This repository follows a "fork-and-pull" workflow. If you would like to contribute perform the following:

  1. Fork the repostiory to your Github.
  2. Clone your fork to your local machine.
  3. Checkout a new branch with a meaningful name.
  4. Commit your changes to your fork.
  5. Submit a pull request with a description of changes and enhancements made for further review.

Check out some issues to work on in the issues section.

Documentation is available at https://najaco.github.io/pyparcel/

License

MIT

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

pyparcel-0.9.1.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

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

pyparcel-0.9.1-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file pyparcel-0.9.1.tar.gz.

File metadata

  • Download URL: pyparcel-0.9.1.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.3.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.1

File hashes

Hashes for pyparcel-0.9.1.tar.gz
Algorithm Hash digest
SHA256 02aca2d5ac5f6378f39cb8ed0149b729eac150a143bdffef6c7c130b3f18d095
MD5 f56b7c9cebf573d23ddf2ce507d1fc30
BLAKE2b-256 563f04f2783dbd3b85868d83ce6aba6e1531c0675974f3016fa5399128945b05

See more details on using hashes here.

File details

Details for the file pyparcel-0.9.1-py3-none-any.whl.

File metadata

  • Download URL: pyparcel-0.9.1-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.3.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.1

File hashes

Hashes for pyparcel-0.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 30db049cdf12c77533294e3b0c8a1098149231dadeaf17c2bcfde9713a857a6d
MD5 b138906de105fc3bdb0aeeb9a6d79be0
BLAKE2b-256 939567fdc6265acf690bfe53ac74112b3589b4d00f94ea3c72da895125de4013

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