eda-netlist-parser
A pure-Python parser for SPICE-family netlist files: .spi, .cir, .cdl, .scs, .spf, .sp, .hsp.
Installation
pip install eda-netlist-parser
# optional colored terminal output:
pip install eda-netlist-parser[color]
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_mapNetlistCell— one subckt:.name,.ports,.instances,.substituteDeviceInstance— one line:.name,.code,.nodes,.device_name,.number,.parametersNetlistError— 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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
eda_netlist_parser-0.1.2.tar.gz
(12.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file eda_netlist_parser-0.1.2.tar.gz.
File metadata
- Download URL: eda_netlist_parser-0.1.2.tar.gz
- Upload date:
- Size: 12.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
47165cc3a0753fb8b63d689b8cf84e107b99e24d7037ad3b7e83c4857bdb1b9a
|
|
| MD5 |
c7eb4284331c25eac6062552045aa2cb
|
|
| BLAKE2b-256 |
869181b5e1e3139ce519549061a40664431c6cd4028374edd0fa65e2c032aefa
|
File details
Details for the file eda_netlist_parser-0.1.2-py3-none-any.whl.
File metadata
- Download URL: eda_netlist_parser-0.1.2-py3-none-any.whl
- Upload date:
- Size: 11.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe910198853c123bbb60760e2605cc0fb0019a2a99233ee19dcaae8dc498ccaf
|
|
| MD5 |
6defc1d79c786bea7d752b7cfd8b8056
|
|
| BLAKE2b-256 |
a2b70261d71c5e6b09328ef6be73c0dae442d522a6b1408bd03598e18d59558d
|