--- id: asn1tools version: "0.167.0" license: MIT license_treatment: permissive maintenance: dormant --- # asn1tools — ASN.1 parsing, encoding and decoding. License: permissive · Maintenance: dormant · Downloads: 557.1K/mo ## What it is and what it does asn1tools is a Python library for working with ASN.1 (Abstract Syntax Notation One), a standard format for defining structured data used in telecommunications, cryptography, and network protocols. It compiles ASN.1 specification files and provides encode/decode operations across eight codec standards—BER, DER, PER, UPER, OER, XER, JER, and GSER—allowing you to serialize Python dictionaries into binary or text formats and deserialize them back. It also includes command-line tools for converting between formats and a C source code generator for OER and UPER codecs when you need compiled performance. The library supports a subset of the ASN.1 specification; it does not yet handle CLASS keywords, parametrization, EMBEDDED PDV, ANY types, or DURATION types. The C generator requires all types to have known maximum sizes and works only with a limited set of ASN.1 primitives. Installation is high-friction due to the source-only distribution, and maintenance is dormant—the last release was 762 days ago, though the repository remains accessible. Use it for: - Decode binary protocol messages from telecom standards that use ASN.1 encoding. - Convert between ASN.1 codecs (e.g., BER to human-readable GSER or JSON) for debugging and protocol analysis. - Encode structured data into OER or UPER for bandwidth-constrained or real-time network applications. - Generate C source code for embedded systems or performance-critical ASN.1 encoding/decoding. - Parse and validate ASN.1 specifications as part of a protocol implementation or code generation pipeline. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Parses, encodes, and decodes ASN.1 messages using multiple codec standards including BER, DER, PER, UPER, OER, XER, JER, and GSER, plus generates C source code for OER and UPER encoding. Yes, if you work with ASN.1 protocols and can tolerate high install friction and dormant maintenance. The library covers a broad range of codecs and includes useful command-line tools. No, if you need active maintenance, recent bug fixes, or support for the full ASN.1 specification—consider alternatives or fork the repository if your use case is critical. ## Install pip install asn1tools uv add asn1tools poetry add asn1tools ## Installing asn1tools Before you install: High install friction: the package is a source distribution (asn1tools-0.167.0.tar.gz) with no runtime dependencies listed, suggesting it may require compilation or system-level dependencies not declared in the metadata. Maintenance is dormant—last release was 762 days ago, though the repository remains active with a recent commit on 2024-07-13. License in practice: MIT license is permissive and places minimal restrictions on use, modification, and distribution. You may use this package in commercial and proprietary projects with only attribution required. Quickstart: import asn1tools foo = asn1tools.compile_files('foo.asn') encoded = foo.encode('Question', {'id': 1, 'question': 'Is 1+1=3?'}) decoded = foo.decode('Question', encoded) Requires an ASN.1 specification file (.asn) to compile before encoding/decoding. High install friction may require build tools or system libraries. Verify before relying: - Whether the source distribution requires a C compiler or other system-level build dependencies beyond what pip normally provides. - Current stability and whether the dormant maintenance status affects production readiness for new ASN.1 specifications. - Support coverage for the full ASN.1 specification beyond the documented subset of supported types and features. ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: high - Maintenance: dormant - Downloads: 557.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags ASN.1 parsing encoding decoding, BER DER PER codec, ASN.1 message serialization, binary protocol encoding, ASN.1 C code generation, structured data encoding, telecommunication protocol parsing, asn1-codec, binary-protocol, telecom-standards [View on SkillFed](https://skillfed.io/packages/asn1tools) · [View on PyPI](https://pypi.org/project/asn1tools/)