Skip to main content

A Python library for parsing and building binary data.

Project description

Pynarist

GitHub last commit Codecov GitHub License PyPI - Version

A Python library for parsing and building binary data.

Usage

from pynarist import Model, varchar

class Person(Model):
    name: varchar
    age: int

john = Person(name=varchar('John'), age=25)

# Output determined by the endianness of the system

assert john.build() == b'\x04John\x19\x00\x00\x00'

parsed = Person.parse(b'\x04John\x19\x00\x00\x00')

assert parsed.name == 'John'
assert parsed.age == 25

License

Copyright (c) 2024 M. Yan Distributed under the Apache 2.0 License.

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

pynarist-0.1.1.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

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

pynarist-0.1.1-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file pynarist-0.1.1.tar.gz.

File metadata

  • Download URL: pynarist-0.1.1.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.5 Windows/11

File hashes

Hashes for pynarist-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3db5c8108c972f0f10490529091593cebf7252b33143c5f953a81598669be9f6
MD5 f3a0256975e9d515bf03bd851449b93e
BLAKE2b-256 9fa075d71ef083b9fb5b92b31e8c96e60aae00be064f4c9a9a6dfef0d01e480d

See more details on using hashes here.

File details

Details for the file pynarist-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pynarist-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.5 Windows/11

File hashes

Hashes for pynarist-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2be2abe604d18526e1abf4e9834d5f2a6e2a7d5a0e1496e41d5871cf0aad84df
MD5 463a37378b962a306685d06f362ac1ff
BLAKE2b-256 a0268b00593e710a3aba6ea73079aa5b5892e32e26d94c354e6d670a4e70a865

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