cicspi
cicspi is a small SPICE parsing toolbox that reads .subckt definitions into a Python object hierarchy and exposes a simple CLI.
Install
python3 -m pip install cicspi
CLI
Print the node list for a subckt in a SPICE file:
cicspi nodes path/to/netlist.spi my_subckt
Python usage
import cicspi
parser = cicspi.SpiceParser()
parser.parseFile("path/to/netlist.spi")
# SpiceParser is a dict: subckt name → Subckt object
ckt = parser["my_subckt"]
print(ckt.nodes) # list of port node names
print(ckt.instances) # list of SubcktInstance objects
# Collapse bus signals (e.g. A[0], A[1] → A[0:1])
print(ckt.nodesWithBus())
# Iterate instances
for inst in ckt.instances:
print(inst.name, inst.subcktName, inst.nodes)
# Emit SPICE text
print(ckt.tospice())
# JSON round-trip
import json
print(json.dumps(ckt.toJson(), indent=2))
Object model
| Class | Description |
|---|---|
SpiceParser |
dict subclass; maps subckt name → Subckt. Also tracks all instance types in .allinst. |
Subckt |
One .subckt/.ends block. Has .name, .nodes, .instances (list of SubcktInstance), .devices. |
SubcktInstance |
One X-line. Has .name, .subcktName, .nodes, .groupName. |
Device |
Primitive device (future use). |
SpiceObject |
Base class for all objects; provides .properties dict, JSON serialisation, and .nodesWithBus(). |
Release flow
PyPI publishing is handled by GitHub Actions in .github/workflows/release.yml.
Push a tag to trigger a release:
git tag 0.x.y && git push origin 0.x.y
The workflow builds the package, publishes to PyPI via OIDC trusted publishing, and creates a GitHub release with the distribution artifacts attached.
Release files for cicspi 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cicspi-0.1.5.tar.gz | 9.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cicspi-0.1.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.3 kB
Release files / cicspi-0.1.5.tar.gz
| Download URL | cicspi-0.1.5.tar.gz |
|---|---|
| Size | 9.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ccffe0eb6b7e95842f800c133a1d7a57463290d1c4afcd903e92198cbdcc7211
|
|
BLAKE2b-256 checksum How to use checksums |
e62c492ffbbde133093284b051b03a41b9d5d5d68c8e8262d1b058564422b10f
|
| 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 Aug 25, 2026.
Transparency logRelease files / cicspi-0.1.5-py3-none-any.whl
| Download URL | cicspi-0.1.5-py3-none-any.whl |
|---|---|
| Size | 11.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9b3a4341547de1ebc229091817bc9a2b366142a4076a12c52fa26c11ba2d21f9
|
|
BLAKE2b-256 checksum How to use checksums |
4f02555af1e0ee0f9c43208cb4bdaa792c69d83f8d007238de23baf66c8e74c9
|
| 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 Aug 25, 2026.
Transparency log