--- id: types-pyasn1 version: "0.6.0.20260724" license: Apache-2.0 license_treatment: permissive maintenance: active --- # types-pyasn1 — Typing stubs for pyasn1 License: permissive · Maintenance: active · Downloads: 2.5M/mo ## What it is and what it does types-pyasn1 is a type stub package that provides type annotations for the pyasn1 library, which handles ASN.1 (Abstract Syntax Notation One) encoding and decoding. It is part of the typeshed project and enables static type checkers like mypy and pyright to understand and validate code that uses pyasn1, catching type errors at development time rather than runtime. The package contains no runtime code—it is purely metadata for type checkers. It targets pyasn1 version 0.6.* and has been tested with mypy 2.3.0 and pyright 1.1.411. Installation is lightweight with no dependencies, and it requires Python 3.10 or later. Updates and fixes are contributed upstream to typeshed, so this package tracks the main typeshed repository. Use it for: - Enable mypy or pyright to type-check code that imports and uses pyasn1 for ASN.1 serialization tasks. - Catch type errors in cryptographic or network protocol code that relies on pyasn1 before runtime. - Provide IDE autocomplete and type hints for pyasn1 APIs in editors that support type stubs. - Validate data structure definitions and encoding/decoding calls against pyasn1's type contracts. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides type stubs for the pyasn1 package, enabling static type checkers like mypy and pyright to validate code that uses pyasn1 for ASN.1 encoding and decoding. Yes, if you use pyasn1 and want static type checking. Install it alongside pyasn1 to enable mypy or pyright to validate your code. It has no runtime cost, is actively maintained, and carries a permissive license. If you do not use a type checker or do not use pyasn1, there is no reason to install it. ## Install pip install types-pyasn1 uv add types-pyasn1 poetry add types-pyasn1 ## Installing types-pyasn1 Before you install: Low install friction with no runtime dependencies. Actively maintained as part of typeshed, with a recent release (21 days old) and tested against mypy 2.3.0 and pyright 1.1.411. License in practice: Licensed under Apache-2.0 (permissive), allowing use in both open-source and proprietary projects with minimal restrictions. Quickstart: pip install types-pyasn1 # In your code, type checkers will now understand pyasn1 types: import pyasn1 # mypy or pyright will validate pyasn1 usage without errors Requires Python 3.10 or later; only provides type information, does not provide runtime functionality for pyasn1 itself. Verify before relying: - Whether coverage of pyasn1 0.6.* API is complete or if some modules lack type annotations. - Compatibility with pyasn1 versions outside the 0.6.* series. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 2.5M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags type stubs pyasn1, pyasn1 type hints, static type checking asn1, mypy pyasn1 annotations, pyright type stubs, python type checking cryptography, asn.1 type annotations, type-stubs, static-analysis [View on SkillFed](https://skillfed.io/packages/types-pyasn1) · [View on PyPI](https://pypi.org/project/types-pyasn1/)