asn1tools
ASN.1 parsing, encoding and decoding.
Decision gist · record as of 2026-08-14
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.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires an ASN.1 specification file (.asn) to compile before encoding/decoding.
- High install friction may require build tools or system libraries.
- 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.
License · maintenance · safety
MIT (permissive) — 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.
last release 2024-07-13 (762 days) · last repo commit 2024-07-13 · 335 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 557,056 downloads/mo, #6,015 on PyPI
Alternatives
Verify before relying
import asn1tools
foo = asn1tools.compile_files('foo.asn')
encoded = foo.encode('Question', {'id': 1, 'question': 'Is 1+1=3?'})
decoded = foo.decode('Question', encoded)- 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.
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 on this page. Verify before relying on it.
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
asn1tools on PyPI
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.
Requires an ASN.1 specification file (.asn) to compile before encoding/decoding. High install friction may require build tools or system libraries.
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)
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 | Not specified |
| Install friction | High. Source build required |
| Runtime dependencies | None |
| Maintenance | Dormant 762 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 557,056 / month, #6,015 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 2Programming Language :: Python :: 3 |
Evidence: asn1tools-0.167.0.tar.gz
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “ASN.1 parsing encoding decoding”
- asn1toolsParses, encodes, and decodes ASN.1 messages using multiple codec…
- x690Encodes and decodes data using the X.690 BER standard, a pure Python…
- pyasn1Pyasn1 encodes and decodes ASN.1 data structures using BER, CER, DER,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also asn1 · pyasn1 · x690 · asn1crypto · pyasn1-modules · mbstrdecoder · pysmi-lextudio · scalecodec · pysmi