Spice toolbox
Project description
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 cicspi-0.1.4.tar.gz.
File metadata
- Download URL: cicspi-0.1.4.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45fbbc8ffdf27a241332e74f0683cc9ca0d930f15f2be70f5caf6433e39a24dd
|
|
| MD5 |
c919e26e1fa1f913335ffd25230e8686
|
|
| BLAKE2b-256 |
5d9d07e02f4c28a14d518215d896c9461aa4f01b6d7c3776d425eb24f6074e1a
|
Provenance
The following attestation bundles were made for cicspi-0.1.4.tar.gz:
Publisher:
release.yml on wulffern/cicspi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cicspi-0.1.4.tar.gz -
Subject digest:
45fbbc8ffdf27a241332e74f0683cc9ca0d930f15f2be70f5caf6433e39a24dd - Sigstore transparency entry: 1297958150
- Sigstore integration time:
-
Permalink:
wulffern/cicspi@460e2ccc90fe3d6a8e015fef0d6be48a14ed15c7 -
Branch / Tag:
refs/tags/0.1.4 - Owner: https://github.com/wulffern
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@460e2ccc90fe3d6a8e015fef0d6be48a14ed15c7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file cicspi-0.1.4-py3-none-any.whl.
File metadata
- Download URL: cicspi-0.1.4-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
405e81285eea5f14df469fa6448199467b0f725c94be90ddbdb98ae70643a073
|
|
| MD5 |
9f984abeb9db1f95739562c82094380d
|
|
| BLAKE2b-256 |
a4b36d33e3e78d52b8ba7e580c96946a0bfda029897846adf5e56c12b6d7288d
|
Provenance
The following attestation bundles were made for cicspi-0.1.4-py3-none-any.whl:
Publisher:
release.yml on wulffern/cicspi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cicspi-0.1.4-py3-none-any.whl -
Subject digest:
405e81285eea5f14df469fa6448199467b0f725c94be90ddbdb98ae70643a073 - Sigstore transparency entry: 1297958225
- Sigstore integration time:
-
Permalink:
wulffern/cicspi@460e2ccc90fe3d6a8e015fef0d6be48a14ed15c7 -
Branch / Tag:
refs/tags/0.1.4 - Owner: https://github.com/wulffern
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@460e2ccc90fe3d6a8e015fef0d6be48a14ed15c7 -
Trigger Event:
push
-
Statement type: