skillfed

pyasn1

Pure-Python implementation of ASN.1 types and DER/BER/CER codecs (X.208)

pyasn1 Permissive license BSD-2-Clause Active 52 v0.6.4 released

Install

pyasn1 on PyPI

pip

pip install pyasn1

uv

uv add pyasn1

poetry

poetry add pyasn1

Package facts

License BSD-2-Clause (permissive)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 35 days since the last release
Last repo commit
First released
Popularity one of the 100 most-downloaded packages on PyPI (30-day window, as of 2026-08-13)
Known vulnerabilities none known (OSV.dev, checked 2026-08-13)

Evidence: pyasn1-0.6.4-py3-none-any.whl

Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersIntended Audience :: EducationIntended Audience :: Information TechnologyIntended Audience :: System AdministratorsIntended Audience :: Telecommunications IndustryNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: CommunicationsTopic :: Software Development :: Libraries :: Python Modules

About pyasn1

from the package's own PyPI description — quoted content, verbatim

ASN.1 library for Python

PyPI (image) Python Versions (image) Build status (image) Coverage Status (image) GitHub license (image)

This is a free and open source implementation of ASN.1 types and codecs as a Python package. It has been first written to support particular protocol (SNMP) but then generalized to be suitable for a wide range of protocols based on ASN.1 specification.

NOTE: The package is now maintained by Christian Heimes and Simon Pichugin in project https://github.com/pyasn1/pyasn1.

Features

  • Generic implementation of ASN.1...

Read as markdown · JSON record · Source repository · Homepage · Docs

AI interpretation — verify before relying

AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page

pyasn1 is a pure-Python implementation of ASN.1 types and codecs (BER, DER, CER) for encoding and decoding structured data used in network protocols and file formats.

Installation is straightforward with no runtime dependencies and a pure-Python wheel distribution. The package is actively maintained with a recent release 35 days ago and an active GitHub repository.

BSD-2-Clause is a permissive license allowing commercial and private use with minimal restrictions; you must retain copyright and license notices in distributed copies.

Usage

pip install pyasn1

from pyasn1.type import univ, namedtype
from pyasn1.codec.der import encoder, decoder

class Record(univ.Sequence):
    componentType = namedtype.NamedTypes(
        namedtype.NamedType('id', univ.Integer())
    )

record = Record()
record['id'] = 123
encoded = encoder.encode(record)
decoded, _ = decoder.decode(encoded, asn1Spec=Record())

Requires Python 3.8 or later; pure-Python implementation has no compiled dependencies.

Verdict: pyasn1 is a stable, actively maintained library with zero known vulnerabilities and low install friction. It is well-suited for applications requiring ASN.1 serialization across network protocols and file formats, with broad Python version support (3.8–3.14) and permissive licensing.

Needs verification

  • Performance characteristics and memory footprint for large or deeply nested ASN.1 structures compared to alternatives
  • Completeness of ASN.1 specification coverage beyond BER/DER/CER (e.g., PER support status mentioned as 'expected' in description)
ASN.1 encoding decodingBER DER CER codecnetwork protocol serializationSNMP data structuresX.208 ASN.1 typesbinary data serialization pythonstructured data encoding

Similar packages