Skip to main content

asnkit-gen-python

A plugin for asnkitcc that generates Python code from ASN.1. The generated module imports asnkitrt and embeds the compiled specification as bytes. It has a data class for each SEQUENCE and SET, an enumeration for each ENUMERATED and a class for each alternative of a CHOICE, all with methods to encode and decode.

$ pip install asnkit-gen-python
$ asnkitcc generate --plugin python -o out foo.asn    # Writes out/foo.py.
>>> from foo import Question
>>> encoded = Question(id=1, question='Is 1+1=3?').encode('uper')
>>> Question.decode(encoded, 'uper')
Question(id=1, question='Is 1+1=3?')

Options, given with --plugin-opt KEY=VALUE:

name

The name of the module, without .py. Default: the name of the first ASN.1 file.

codec

The codec used when none is given. Default: ber.

Names are converted to Python style: fooBar becomes foo_bar and a type Foo-Bar becomes FooBar. If two names end up the same in Python, generation fails with an error.

License

Apache License 2.0 (LICENSE-COMPILER). The generated code, with the helper code copied into it, is yours to use under terms of your choice, as the header of each file it writes says. The generated code depends on asnkitrt, which is MIT licensed.

Metadata

Release files for asnkit-gen-python 1.0.1

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

Source distribution (sdist)

Source distribution for asnkit-gen-python 1.0.1
File Size Uploaded Provenance
asnkit_gen_python-1.0.1.tar.gz 13.2 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for asnkit-gen-python 1.0.1
File Interpreter ABI Platform
asnkit_gen_python-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 28.6 kB

Release files / asnkit_gen_python-1.0.1.tar.gz

Download URL asnkit_gen_python-1.0.1.tar.gz
Size 13.2 kB
Tags Source
SHA-256 checksum
How to use checksums
851427d8bf8483df6d6e91605f3828412fb1d8a555344e0d5e3e0cb37673f50f
BLAKE2b-256 checksum
How to use checksums
0f21bfd3fd79bd5ca142724470cede94a08e46c545ca82eb2bda9b1239185223
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 15, 2026.

Transparency log

Release files / asnkit_gen_python-1.0.1-py3-none-any.whl

Download URL asnkit_gen_python-1.0.1-py3-none-any.whl
Size 15.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b01c3d89b9c10c8a67560eadb35c37caa3f3085bfc5910dd793c65143faa7e30
BLAKE2b-256 checksum
How to use checksums
0e8a11487bda06ab8c1bd84df181a2c5059a62a48ae83a1a84864c0447880e3f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 15, 2026.

Transparency log

Security for asnkit-gen-python 1.0.1

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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for asnkit_gen_python-1.0.1.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 15, 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.

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