pyslang
Python bindings for slang, a library for compiling SystemVerilog
Decision gist · record as of 2026-08-14
Yes, if you work with SystemVerilog and need programmatic access to parsing and analysis. The package is actively maintained, has no known vulnerabilities, carries a permissive MIT license, and offers precompiled wheels for modern Python on major platforms. Medium install friction is acceptable given the complexity of compiling a C++ SystemVerilog parser. Not necessary if you only need command-line compilation or linting.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires a SystemVerilog source file to parse.
- Medium friction: precompiled wheels available for multiple Python versions on macOS (arm64, universal2), Linux (aarch64, x86_64), and Windows (amd64).
- Maintenance is active with recent releases and steady repository activity.
License · maintenance · safety
permissive license (permissive) — MIT license permits commercial and private use, modification, and distribution with minimal restrictions—only requiring preservation of copyright and license notices. No notable constraints for most use cases.
last release 2026-05-15 (91 days) · last repo commit 2026-08-12 · 1,115 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 455,517 downloads/mo, #6,556 on PyPI
Alternatives
Verify before relying
pip install pyslang
import pyslang
tree = pyslang.SyntaxTree.fromFile('design.sv')
mod = tree.root.members[0]
print(mod.header.name.value)- Exact minimum Python version not specified in metadata; wheels available but earliest version unclear.
- Performance characteristics and memory usage on large projects not quantified in the fact sheet.
- Completeness of SystemVerilog feature coverage beyond the reference to sv-lang.com/language-support.html.
What it is and what it does
pyslang is a Python interface to the slang SystemVerilog compiler, a high-performance front end for hardware design language processing. It allows you to load and inspect the syntax tree of SystemVerilog files, evaluate expressions in a scripting context, and access detailed information about modules, ports, declarations, and types. The underlying slang library handles lexing, parsing, type checking, and elaboration of SystemVerilog code with emphasis on compliance and robustness.
You use pyslang when you need to programmatically analyze or transform SystemVerilog designs—for example, extracting module hierarchies, validating code structure, generating reports, or building custom linting and refactoring tools. It has no runtime dependencies and is distributed as precompiled wheels for common platforms, making installation straightforward on supported Python versions.
Use it for
- Extract and inspect module hierarchies, port lists, and signal declarations from existing SystemVerilog designs.
- Build custom linting or code-quality tools that need to understand SystemVerilog syntax and semantics.
- Generate SystemVerilog code or documentation by traversing and analyzing the parsed syntax tree.
- Evaluate SystemVerilog expressions and constraints in a scripting context without a full simulator.
- Integrate SystemVerilog parsing into editor plugins or language servers for real-time syntax checking.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you work with SystemVerilog and need programmatic access to parsing and analysis.
The package is actively maintained, has no known vulnerabilities, carries a permissive MIT license, and offers precompiled wheels for modern Python on major platforms. Medium install friction is acceptable given the complexity of compiling a C++ SystemVerilog parser. Not necessary if you only need command-line compilation or linting.
Install
pyslang on PyPI
Before you install
Medium friction: precompiled wheels available for multiple Python versions on macOS (arm64, universal2), Linux (aarch64, x86_64), and Windows (amd64). Maintenance is active with recent releases and steady repository activity.
Requires a SystemVerilog source file to parse.
License in practice
MIT license permits commercial and private use, modification, and distribution with minimal restrictions—only requiring preservation of copyright and license notices. No notable constraints for most use cases.
Quickstart
pip install pyslang
import pyslang
tree = pyslang.SyntaxTree.fromFile('design.sv')
mod = tree.root.members[0]
print(mod.header.name.value)
Verify before relying
- Exact minimum Python version not specified in metadata; wheels available but earliest version unclear.
- Performance characteristics and memory usage on large projects not quantified in the fact sheet.
- Completeness of SystemVerilog feature coverage beyond the reference to sv-lang.com/language-support.html.
Package facts
| License | permissive license permissive |
| Python support | Not specified |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 91 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 455,517 / month, #6,556 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIX :: LinuxOperating System :: UnixProgramming Language :: C++Programming Language :: Python :: 3Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)Topic :: Software Development :: CompilersTopic :: Software Development :: Libraries :: Python Modules |
Evidence: pyslang-11.0.0-cp310-cp310-macosx_11_0_arm64.whl; pyslang-11.0.0-cp310-cp310-macosx_11_0_universal2.whl; pyslang-11.0.0-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl; pyslang-11.0.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; pyslang-11.0.0-cp310-cp310-win_amd64.whl; pyslang-11.0.0-cp311-cp311-macosx_11_0_arm64.whl; pyslang-11.0.0-cp311-cp311-macosx_11_0_universal2.whl; pyslang-11.0.0-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl; pyslang-11.0.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; pyslang-11.0.0-cp311-cp311-win_amd64.whl; pyslang-11.0.0-cp312-cp312-macosx_11_0_arm64.whl; pyslang-11.0.0-cp312-cp312-macosx_11_0_universal2.whl; pyslang-11.0.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl; pyslang-11.0.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; pyslang-11.0.0-cp312-cp312-win_amd64.whl; pyslang-11.0.0-cp313-cp313-macosx_11_0_arm64.whl; pyslang-11.0.0-cp313-cp313-macosx_11_0_universal2.whl; pyslang-11.0.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl; pyslang-11.0.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; pyslang-11.0.0-cp313-cp313-win_amd64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “systemverilog parser python”
- pyslangpyslang provides Python bindings to parse, analyze, and elaborate…
- tree-sitter-verilogProvides a SystemVerilog grammar parser for tree-sitter, enabling…
- svqlParses SystemVerilog modules and exposes their parameters, ports, and…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also svql · tree-sitter-verilog · amalgam-lang · pydevicetree · peakrdl-regblock · systemrdl-compiler · siliconcompiler · peakrdl-cli · dvsim · peakrdl