sedes
Parallel ngspice SPICE simulation from Python. LTspice-friendly, with built-in MOSFET LUT generation and gm/Id sizing.
- Cross-platform: prebuilt wheels for Linux, macOS, and Windows (x86_64, plus arm64 on macOS). Python 3.10+.
- No system ngspice required: libngspice is bundled inside the wheel.
- No GIL bottleneck: simulations run in parallel ngspice worker subprocesses, dispatched by an internal tokio runtime.
- Typed surface: ships
py.typedand a hand-written.pyiso Pyright, Pylance, and mypy give you full autocomplete out of the box.
Install
pip install sedes
That's it — no Rust toolchain, no SPICE install, no DLL hunt.
Quickstart — run a netlist, sweep a value
import numpy as np
import sedes
# Build a circuit programmatically …
ckt = (sedes.Circuit("RC filter")
.V("v1", "in", "0", "ac 1")
.R("r1", "in", "out", "1k")
.C("c1", "out", "0", "100n")
.ac("dec", 100, 1, 1e6))
# … or load one exported from LTspice (View → SPICE Netlist):
# ckt = sedes.Circuit.from_file("filter.cir")
pool = sedes.SimulationPool(workers=8)
# One run
result = ckt.run(pool)
print(result.frequency.shape, result.vector("v(out)").shape)
# Multi-value sweep — Cartesian product, run in parallel.
results = sedes.sweep(ckt, pool, {"r1": ["1k", "2.2k", "10k"]})
for R, r in zip(["1k", "2.2k", "10k"], results):
mag = r.mag("v(out)")
f_3db = r.frequency[np.argmin(np.abs(mag - 1/np.sqrt(2)))]
print(f"R={R:>4} → f_-3dB ≈ {f_3db:.0f} Hz")
A runnable version of this lives at examples/rc_sweep.py.
What's in the package
| Import | Role |
|---|---|
sedes.Circuit |
Programmatic SPICE netlist builder. Load with Circuit.from_file(...), mutate with .set_value(), .replace(), .remove(), attach analyses with .op() / .tran() / .dc() / .ac() / .noise(). |
sedes.parse_file, parse_string |
Standalone netlist parsers. |
sedes.SimulationPool |
Worker-pool dispatcher. pool.run_simulation(netlist, ["run"]), pool.run_simulations_batch(jobs), pool.generate_lut(cfg). |
sedes.sweep |
Cartesian-product parameter sweep over component values, returns typed result list. |
sedes.LutConfig / sedes.Lut |
MOSFET characterisation (Id, gm, gds, capacitances, ft) and gm/Id transistor sizing. |
sedes.OpResult / TranResult / DCResult / ACResult / NoiseResult / … |
Typed result wrappers with .plot() helpers. |
sedes.PsfFile / sedes.NgpsfFile |
Cadence PSF / PSFXL waveform readers (pure Rust, no libpsf). |
Coming from LTspice?
Read docs/ltspice_migration.md for the
export workflow and the syntax differences that matter (the big one: in
ngspice, M is mega, m is milli — LTspice is more forgiving).
For sweep recipes (1-axis, 2-axis corner grids, MOSFET parameter sweeps) see
docs/sweeps.md.
Supported platforms
| OS | Architecture | Python |
|---|---|---|
| Linux | x86_64 (manylinux_2_28) | 3.10–3.13 |
| macOS | x86_64, aarch64 | 3.10–3.13 |
| Windows | x86_64 | 3.10–3.13 |
Development
# Build once, populate the bundled libngspice into python/sedes/_libs:
bash ../.github/scripts/fetch_ngspice.sh macos python/sedes/_libs
# Build the extension and install it editable into a venv:
uv venv && uv pip install maturin numpy
uv run maturin develop --release
uv run python examples/rc_sweep.py
When you change the #[pyclass] / #[pyfunction] surface under src/python/
or src/psf/python.rs, also update python/sedes/sedes.pyi so IDE
autocomplete remains accurate.
License
MIT — see LICENSE.
Metadata
Release files for sedes 0.1.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sedes-0.1.10.tar.gz | 2.7 MB | With provenance | Details for sedes-0.1.10.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| sedes-0.1.10-cp310-abi3-win_amd64.whl | CPython 3.10 | abi3 | Windows x86-64 | Details for sedes-0.1.10-cp310-abi3-win_amd64.whl |
| sedes-0.1.10-cp310-abi3-manylinux_2_28_x86_64.whl | CPython 3.10 | abi3 | Linux glibc 2.28+ x86-64 | Details for sedes-0.1.10-cp310-abi3-manylinux_2_28_x86_64.whl |
| sedes-0.1.10-cp310-abi3-macosx_11_0_arm64.whl | CPython 3.10 | abi3 | macOS 11.0+ ARM64 | Details for sedes-0.1.10-cp310-abi3-macosx_11_0_arm64.whl |
| sedes-0.1.10-cp310-abi3-macosx_10_12_x86_64.whl | CPython 3.10 | abi3 | macOS 10.12+ x86-64 | Details for sedes-0.1.10-cp310-abi3-macosx_10_12_x86_64.whl |
Total release size: 21.6 MB
Release files / sedes-0.1.10.tar.gz
| Download URL | sedes-0.1.10.tar.gz |
|---|---|
| Size | 2.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
60326e24cc5fa5e9eff26a7f72ad106d0fc9b2a5e3f3c33217d1b3191131921b
|
|
BLAKE2b-256 checksum How to use checksums |
39fe1be1d4b4953fdc906f448ad6c2c3e2c3987369814f82a7d694fca3fcf58b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 16, 2026.
Transparency logRelease files / sedes-0.1.10-cp310-abi3-win_amd64.whl
| Download URL | sedes-0.1.10-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 5.2 MB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
cf1baf7510a0a894b7011836491e907912406c39a88fdc6f5cd078303381e095
|
|
BLAKE2b-256 checksum How to use checksums |
d6706fbbba587769a52edf6c3a21c58beacdaf6928088bedb3d1f0684a62d590
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 16, 2026.
Transparency logRelease files / sedes-0.1.10-cp310-abi3-manylinux_2_28_x86_64.whl
| Download URL | sedes-0.1.10-cp310-abi3-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 5.4 MB |
| Tags | CPython 3.10 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
8f12113f4a7c24f95346d2d64f307ef714a23b58808583fb71901a7a29f036c5
|
|
BLAKE2b-256 checksum How to use checksums |
e4a979ffb5385de38f8e4cd03d5ce399f6f91e910775d6172d88f74d45e36cb1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 16, 2026.
Transparency logRelease files / sedes-0.1.10-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | sedes-0.1.10-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 3.9 MB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
71784f15f173d8a001774dc4989f3f41b46979b1c67b61be0aa6d30c5b9cbdec
|
|
BLAKE2b-256 checksum How to use checksums |
b7e89304972adaff2edd17c3346c137bcfaa9d034d98bb133890a47bbb74eede
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 16, 2026.
Transparency logRelease files / sedes-0.1.10-cp310-abi3-macosx_10_12_x86_64.whl
| Download URL | sedes-0.1.10-cp310-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 4.4 MB |
| Tags | CPython 3.10 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
7b35de353386e04ab1554c53bba208868ca59d2de1abcdefe3f90a5ad321cb54
|
|
BLAKE2b-256 checksum How to use checksums |
7f97b2fbe4f84f0a967c964dbb937bd05283409ed538b8815c5e2b18b88bbbe2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 16, 2026.
Transparency logSecurity for sedes 0.1.10
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.
Full provenance
All 5 files in this release have been uploaded with provenance metadata.
Attestation for sedes-0.1.10.tar.gz
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 Jun 16, 2026.
Transparency logA 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.