Skip to main content

eda-netlist-parser

A pure-Python parser for SPICE-family netlist files: .spi, .cir, .cdl, .scs, .spf, .sp, .hsp.

CI Python License: MIT

Installation

pip install eda-netlist-parser
# optional colored terminal output:
pip install eda-netlist-parser[color]

PyPI Python

Quick start

from netlist_parser import NetlistParser, NetlistError

parser = NetlistParser()

try:
    netlist = parser.parse("design.spi")
except NetlistError as e:
    print(f"Error: {e}")

for cell in netlist.cells:
    print(cell.name, cell.ports)
    for inst in cell.instances:
        print("  ", inst.name, inst.code, inst.device_name)

Importing

from netlist_parser import NetlistParser
from netlist_parser import NetlistParser, Netlist, NetlistCell, DeviceInstance

API

NetlistParser(internal=False)

Method Returns Description
parse(filename) Netlist Parse a single file
read(path, data=None) varies Parse file or directory

read() data modes:

data= Returns
None Netlist
'cells' Set[str]
'ports' Dict[str, List[str]]
'devices' Dict[str, Set[str]]
'device-params' Dict[str, Dict]
'resistors' Dict[str, List]
'capacitors' Dict[str, List]

Classes

  • Netlist — full file data: .cells, .version, .resistance, .capacitance, .layer_map
  • NetlistCell — one subckt: .name, .ports, .instances, .substitute
  • DeviceInstance — one line: .name, .code, .nodes, .device_name, .number, .parameters
  • NetlistError — raised on file errors

CLI

netlist-parser sample.spi                   # summary
netlist-parser sample.spi --cells           # list cell names
netlist-parser sample.spi --ports           # cell → ports
netlist-parser sample.spi --devices         # cell → device names
netlist-parser sample.spi --cell inv_x1     # one cell detail
netlist-parser --version

License

MIT

Metadata

Release files for eda-netlist-parser 0.1.2

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

Source distribution (sdist)

Source distribution for eda-netlist-parser 0.1.2
File Size Uploaded Provenance
eda_netlist_parser-0.1.2.tar.gz 12.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for eda-netlist-parser 0.1.2
File Interpreter ABI Platform
eda_netlist_parser-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 23.7 kB

Release files / eda_netlist_parser-0.1.2.tar.gz

Download URL eda_netlist_parser-0.1.2.tar.gz
Size 12.6 kB
Tags Source
SHA-256 checksum
How to use checksums
47165cc3a0753fb8b63d689b8cf84e107b99e24d7037ad3b7e83c4857bdb1b9a
BLAKE2b-256 checksum
How to use checksums
869181b5e1e3139ce519549061a40664431c6cd4028374edd0fa65e2c032aefa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / eda_netlist_parser-0.1.2-py3-none-any.whl

Download URL eda_netlist_parser-0.1.2-py3-none-any.whl
Size 11.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fe910198853c123bbb60760e2605cc0fb0019a2a99233ee19dcaae8dc498ccaf
BLAKE2b-256 checksum
How to use checksums
a2b70261d71c5e6b09328ef6be73c0dae442d522a6b1408bd03598e18d59558d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Security for eda-netlist-parser 0.1.2

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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