https://github.com/near/borsh-construct-py
Python implementation of Binary Object Representation Serializer for Hashing
https://github.com/near/borsh-construct-py
binary-serialization borsh python serialization
Last synced: 6 months ago
JSON representation
Python implementation of Binary Object Representation Serializer for Hashing
- Host: GitHub
- URL: https://github.com/near/borsh-construct-py
- Owner: near
- License: mit
- Created: 2020-12-14T08:49:48.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-10-19T16:33:09.000Z (over 4 years ago)
- Last Synced: 2025-08-01T20:39:57.201Z (6 months ago)
- Topics: binary-serialization, borsh, python, serialization
- Language: Python
- Homepage: https://borsh.io/
- Size: 543 KB
- Stars: 32
- Watchers: 12
- Forks: 8
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# borsh-construct
[](https://github.com/near/borsh-construct-py/actions?workflow=Tests)
[](https://near.github.io/borsh-construct-py/)
`borsh-construct` is an implementation of the [Borsh](https://borsh.io/) binary serialization format for Python projects.
Borsh stands for Binary Object Representation Serializer for Hashing. It is meant to be used in security-critical projects as it prioritizes consistency, safety, speed, and comes with a strict specification.
Read the [Documentation](https://near.github.io/borsh-construct-py/).
## Installation
```sh
pip install borsh-construct
```
### Development Setup
1. Install [poetry](https://python-poetry.org/docs/#installation)
2. Install dev dependencies:
```sh
poetry install
```
3. Install [nox-poetry](https://github.com/cjolowicz/nox-poetry) (note: do not use Poetry to install this, see [here](https://medium.com/@cjolowicz/nox-is-a-part-of-your-global-developer-environment-like-poetry-pre-commit-pyenv-or-pipx-1cdeba9198bd))
4. Activate the poetry shell:
```sh
poetry shell
```
### Quick Tests
```sh
pytest
```
### Full Tests
```sh
nox
```