Skip to main content

x690

PyPI version Supported Python versions CI status Documentation

Encode and decode ASN.1 data in BER (ITU-T X.690) with pure Python. x690 turns every encoded value into a typed Python object, decodes documents of a million values in a few megabytes of memory, and takes new types with a few lines of code. It is the encoding layer of puresnmp.

Documentation: https://exhuma.github.io/x690/

Installation

x690 needs Python 3.11 or newer:

pip install x690

Example

>>> from x690 import decode
>>> from x690.types import Integer, OctetString, Sequence
>>> data = bytes(Sequence([Integer(42), OctetString(b"hello")]))
>>> data
b'0\n\x02\x01*\x04\x05hello'
>>> decode(data)
(Sequence([Integer(42), OctetString(b'hello')]), 12)

The documentation covers how to encode and decode values, how to add custom types and which types convert to which Python values.

Project status

The API is stable. Context-specific tags resolve per enclosing type, so structures that reuse a tag such as [0], as X.509 and LDAP do, can be described. Work continues on declaring types by position and on Python values for more universal types. Choosing x690 compares x690 with other ASN.1 libraries and lists its current limitations.

x690 follows Semantic Versioning. The compatibility policy defines what counts as a breaking change and how deprecation works.

Metadata

Release files for x690 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for x690 2.0.0
File Size Uploaded Provenance Actions
x690-2.0.0.tar.gz 70.2 kB With provenance Details for x690-2.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for x690 2.0.0
File Interpreter ABI Platform Actions
x690-2.0.0-py3-none-any.whl Python 3 none any Details for x690-2.0.0-py3-none-any.whl

Total release size: 99.2 kB

Release files / x690-2.0.0.tar.gz

Download URL x690-2.0.0.tar.gz
Size 70.2 kB
Tags Source
SHA-256 checksum
How to use checksums
c9b80c1cd15e3492f007ec1232b0abb05bf61ce32648b06572d27063c863f3b9
BLAKE2b-256 checksum
How to use checksums
4b6020db0e49b39a0d64b4e213ef8b79cd4ec71f2ea6d3402365b060708f14d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Release files / x690-2.0.0-py3-none-any.whl

Download URL x690-2.0.0-py3-none-any.whl
Size 29.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1c21bf10c6e96bcba2ea6fd3e2ceb0210c9ad7ccf08ebf4a7e1e51bbc57bace2
BLAKE2b-256 checksum
How to use checksums
53d4a874812fc08dc2855141932d5ee197cd9c9815d15f8c4e89c28e5b7757c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Security for x690 2.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for x690-2.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page