# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= python-pyasn1 VERSION= 0.6.1 KEYWORDS= python VARIANTS= v12 v13 SDESC[v12]= ASN.1 types and codecs (3.12) SDESC[v13]= ASN.1 types and codecs (3.13) HOMEPAGE= https://github.com/pyasn1/pyasn1 CONTACT= Python_Automaton[python@ironwolf.systems] DOWNLOAD_GROUPS= main SITES[main]= PYPIWHL/c8/f1/d6a797abb14f6283c0ddff96bbdd46937f64122b8c925cab503dd37f8214 DISTFILE[1]= pyasn1-0.6.1-py3-none-any.whl:main DIST_SUBDIR= python-src DF_INDEX= 1 SPKGS[v12]= single SPKGS[v13]= single OPTIONS_AVAILABLE= PY312 PY313 OPTIONS_STANDARD= none VOPTS[v12]= PY312=ON PY313=OFF VOPTS[v13]= PY312=OFF PY313=ON DISTNAME= pyasn1-0.6.1.dist-info GENERATED= yes [PY312].USES_ON= python:v12,wheel [PY313].USES_ON= python:v13,wheel [FILE:2965:descriptions/desc.single] ASN.1 library for Python ------------------------ [PyPI] [Python Versions] [Build status] [Coverage Status] [GitHub license] 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 types (X.208) * Standards compliant BER/CER/DER codecs * Can operate on streams of serialized data * Dumps/loads ASN.1 structures from Python types * 100% Python, works with Python 3.8+ * MT-safe * Contributed ASN.1 compiler [Asn1ate] Why using pyasn1 ---------------- ASN.1 solves the data serialisation problem. This solution was designed long ago by the wise Ancients. Back then, they did not have the luxury of wasting bits. That is why ASN.1 is designed to serialise data structures of unbounded complexity into something compact and efficient when it comes to processing the data. That probably explains why many network protocols and file formats still rely on the 30+ years old technology. Including a number of high-profile Internet protocols and file formats. Quite a number of books cover the topic of ASN.1. [Communication between heterogeneous systems] by Olivier Dubuisson is one of those high quality books freely available on the Internet. The pyasn1 package is designed to help Python programmers tackling network protocols and file formats at the comfort of their Python prompt. The tool struggles to capture all aspects of a rather complicated ASN.1 system and to represent it on the Python terms. How to use pyasn1 ----------------- With pyasn1 you can build Python objects from ASN.1 data structures. For example, the following ASN.1 data structure: ```bash Record ::= SEQUENCE { id INTEGER, room [0] INTEGER OPTIONAL, house [1] INTEGER DEFAULT 0 } ``` Could be expressed in pyasn1 like this: ```python class Record(Sequence): componentType = NamedTypes( NamedType('id', Integer()), OptionalNamedType( 'room', Integer().subtype( implicitTag=Tag(tagClassContext, tagFormatSimple, 0) ) ), DefaultedNamedType( 'house', Integer(0).subtype( implicitTag=Tag(tagClassContext, tagFormatSimple, 1) ) ) ) ``` It is in the spirit of ASN.1 to take abstract data description and turn it into a programming language specific form. Once you have your ASN.1 data structure expressed in Python, you can use it along the lines of similar Python type (e.g. ASN.1 `SET` is similar to Python `dict`, `SET OF` to `list`): ```python >>> record = Record() >>> record['id'] = 123 >>> record['room'] = 321 >>> str(record) Record: id=123 room=321 [FILE:119:distinfo] 0d632f46f2ba09143da3a8afe9e33fb6f92fa2320ab7e886e2d0f7672af84629 83135 python-src/pyasn1-0.6.1-py3-none-any.whl