--- id: canoser version: "0.8.2" license: unclear license_treatment: permissive maintenance: abandoned --- # canoser — A python implementation of the LCS(Libra Canonical Serialization) for the Libra network. License: permissive · Maintenance: abandoned · Downloads: 76.3K/mo ## What it is and what it does Canoser is a Python library that implements canonical serialization (LCS) for the Libra blockchain network. It allows you to define data structures by inheriting from base classes like Struct, RustEnum, and RustOptional, then automatically serialize and deserialize them in a deterministic byte format. This is essential in blockchain consensus where independent validators need to compute identical hashes of the same logical data, even when running different implementations. The library supports complex nested structures including arrays, maps, tuples, enums with variants, and optional types—all mirroring Rust/Libra semantics. Once you define a structure's fields, serialization and deserialization happen automatically without manual encoding logic. However, the package has been abandoned since 2020-04-02 and its repository is archived, meaning it receives no updates, security patches, or compatibility fixes for newer Python releases. Use it for: - Building Libra network clients or validators that need to serialize transaction arguments and account state in the canonical format. - Comparing data structures across independent Libra implementations by hashing their canonical serializations. - Defining and exchanging complex nested data types (enums, optional fields, arrays) that must serialize identically across different languages. - Testing or prototyping Libra consensus logic in Python where canonical byte representation must match reference implementations. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Canoser implements canonical serialization for Libra network data structures, enabling byte-consistent encoding and decoding of Python objects that can be safely compared across independent implementations. No, unless you are maintaining legacy Libra integration code written before 2020. The package is abandoned with no active maintenance, no security updates, and no guarantee of compatibility with modern Python versions or current Libra ecosystem evolution. For new projects, seek an actively maintained canonical serialization library. ## Install pip install canoser uv add canoser poetry add canoser ## Installing canoser Before you install: Installation is straightforward with no runtime dependencies. However, the package is abandoned—last release was 2020-04-02 and the repository was archived. No active maintenance means no security updates or compatibility fixes for modern Python versions beyond what was last tested. License in practice: Licensed under MIT (permissive), so you may use, modify, and distribute the package freely in commercial or private projects with minimal restrictions. Quickstart: from canoser import Struct, Uint8, Uint64 class MyData(Struct): _fields = [ ('id', Uint64), ('bytes_field', [Uint8]) ] obj = MyData(id=1, bytes_field=[1, 2, 3]) serialized = obj.serialize() deserialized = MyData.deserialize(serialized) Requires Python 3.6 or above; package is no longer maintained, so compatibility with Python versions released after 2020 is not guaranteed. Verify before relying: - Whether the package works reliably with Python versions beyond those tested before 2020. - Whether serialized output remains compatible with current Libra network validators or if the spec has evolved since 2020. ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: abandoned - Downloads: 76.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags libra canonical serialization, deterministic data structure encoding, cross-validator data comparison, rust enum serialization python, blockchain consensus serialization, lcs libra serialization, canonical serialize deserialize, blockchain, serialization, libra [View on SkillFed](https://skillfed.io/packages/canoser) · [View on PyPI](https://pypi.org/project/canoser/)