skillfed

borsh-construct

Python implementation of Borsh serialization, built on the Construct library.

borsh-construct v0.1.0 162.9K downloads/30d#10,582 on PyPI32
Permissive license MIT Abandoned released

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-construct

uv

uv add borsh-construct

poetry

poetry add borsh-construct

Installing 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

License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.9

Tags

borsh serialization pythonbinary object representation serializercryptographic data serializationborsh encoding decodingsecurity-critical serialization format
serializationcryptographyabandoned

More Cryptography packages