borsh-construct
Python implementation of Borsh serialization, built on the Construct library.
What it is and what it does
borsh-construct provides a Python implementation of the Borsh binary serialization format, which is designed for security-critical applications where consistency, safety, and speed matter. It is built on top of the Construct library and uses construct-typing and sumtypes to define and work with binary-serialized data structures.
The package prioritizes strict specification compliance and is intended for use cases where deterministic serialization is required—particularly in cryptographic and hashing contexts. However, the package has been abandoned since its initial release in October 2021, with no subsequent updates or maintenance.
Use it for:
- Serialize data structures for cryptographic hashing in blockchain or security-critical applications
- Ensure deterministic binary representation of objects across different systems or languages
- Integrate with NEAR Protocol or other systems that mandate Borsh serialization
- Decode Borsh-serialized data received from external security-critical systems
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Implements the Borsh binary serialization format for Python, enabling secure and consistent serialization of data structures for hashing and cryptographic applications.
No, unless you are already committed to this exact version or cannot migrate. The package is abandoned (last release October 2021, no commits since), and its dependencies may not be compatible with modern Python environments. For new projects, evaluate actively maintained Borsh implementations or alternative serialization formats.
Install
borsh-construct on PyPI
pip
pip install borsh-constructuv
uv add borsh-constructpoetry
poetry add borsh-constructInstalling borsh-construct
Before you install
Low install friction with only two runtime dependencies (construct-typing and sumtypes). However, the package is archived and abandoned—last release was 2021-10-20 with no updates since, and the repository shows no recent commits. Use only if you are locked to this specific version or cannot migrate.
License in practice
MIT license permits free use, modification, and distribution with minimal restrictions, making it legally safe to adopt from a licensing perspective.
Quickstart
pip install borsh-construct
from borsh_construct import BorshConstruct
# Use construct-typing and sumtypes to define and serialize data structures
Requires Python >=3.8.3,<4.0.0; package is abandoned and may not work with Python versions released after 2021-10-20
Verify before relying
- Whether construct-typing and sumtypes remain actively maintained and compatible with current Python versions
- Whether the Borsh specification has evolved since the package's last release and if this implementation remains compliant
- Real-world security audit status or known limitations in the implementation
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.8.3,<4.0.0) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — construct-typing, sumtypes |
| Maintenance | abandoned — 1,759 days since the last release |
| Last repo commit | (repository archived) |
| First released | |
| Downloads | 162,887/month — #10,582 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: borsh_construct-0.1.0-py3-none-any.whl
Tags
More Cryptography packages
Certifi provides Mozilla's curated collection…
copyleft · top 100 on PyPI
cryptographycryptography provides cryptographic recipes and…
permissive · top 100 on PyPI
rsaPure-Python RSA encryption, decryption,…
permissive · top 1,000 on PyPI
pyOpenSSLpyOpenSSL wraps OpenSSL's SSL/TLS functionality…
permissive · top 1,000 on PyPI
azure-identityProvides Microsoft Entra ID token-based…
unclear · top 1,000 on PyPI
PyNaClPyNaCl provides Python bindings to libsodium…
permissive · top 1,000 on PyPI
cbor2Encodes and decodes CBOR (Concise Binary Object…
permissive · top 1,000 on PyPI
oslo.serializationoslo.serialization provides serialization and…
permissive · top 5,000 on PyPI
cborSerializes and deserializes data in CBOR…
permissive · top 5,000 on PyPI
binapyBinaPy wraps Python's binary-handling libraries…
permissive · top 5,000 on PyPI
shamir-mnemonicImplements SLIP-0039 Shamir's Secret Sharing to…
permissive · top 15,000 on PyPI
eth-rlpProvides RLP (Recursive Length Prefix) encoding…
permissive · top 5,000 on PyPI
polars-hashPolars-hash adds cryptographic and…
unclear · top 15,000 on PyPI
asn1cryptoA pure Python library for parsing and…
permissive · top 1,000 on PyPI
based58Encodes and decodes data using Base58 and…
unclear · top 15,000 on PyPI
py-multihashEncodes and decodes multihash digests,…
permissive · top 15,000 on PyPI