Metadata-Version: 2.1
Name: pynarist
Version: 0.1.1
Summary: A Python library for parsing and building binary data.
License: Apache-2.0
Author: Temps233
Author-email: temps233@outlook.com
Requires-Python: >=3.11,<4.0
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Description-Content-Type: text/markdown

# Pynarist
![GitHub last commit](https://img.shields.io/github/last-commit/temps233/pynarist) ![Codecov](https://img.shields.io/codecov/c/github/temps233/pynarist) ![GitHub License](https://img.shields.io/github/license/temps233/pynarist) ![PyPI - Version](https://img.shields.io/pypi/v/pynarist)



A Python library for parsing and building binary data.

## Usage

```python
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](https://www.apache.org/licenses/LICENSE-2.0.html).
