Skip to main content

spice3

pip install spice3 → import spice.

Circuit simulation for Python, powered by Dune — a Rust engine derived from Berkeley SPICE3f5 (with BSIM3v3.3, .sp, .measure and several revised routines derived from ngspice-47) and validated circuit-by-circuit against ngspice as numerical oracle.

Status: pre-alpha. This release reserves the package name while the engine's first public version is being finished. The API below works today but may still change.

from pathlib import Path
import spice

result = spice.simulate(Path("rc.cir"))
plot = result.plot("tran")   # or "Transient Analysis"
df = plot.df()               # polars DataFrame, scale column first
df = plot.df("2")            # only v(2): a bare node is its voltage
v2 = plot.column("v(2)")     # zero-copy, read-only numpy array
  • Every SPICE3f5 analysis: .op, .dc, .tran, .ac, .pz, .noise, .disto, .tf, .sens — plus the periodic steady state of driven circuits (.pss, shooting–Newton; spice.pss()).
  • All SPICE3f5 devices, including BJT (Gummel–Poon), MOS levels 1/2/3/6, BSIM1/BSIM2, JFET, MESFET, switches and both transmission lines.
  • Results as polars DataFrames (pandas optional) and zero-copy NumPy arrays; complete type annotations (py.typed).
  • Schematics as decks: spice.pic.extract() reads the netlist of an rpic figure drawn with the dune prelude, spice.simulate() runs it and spice.pic.render() draws it as SVG (with typeset $...$ labels).
  • Faithful netlist semantics: decks that run under spice3 -b or ngspice -b run here, with structured, span-carrying errors.

How a simulation runs: the deck is parsed and built into a circuit; for every point of an analysis the devices are linearized, the linear system is solved and convergence is tested, iterating until it holds; an accepted point goes to the results.

The same engine sits under the R package, the JavaScript package, the C library and the command line; a deck gives the same numbers in all of them.

Architecture of Dune: a pic figure goes through dune-pic and a SPICE deck through dune-netlist into dune-core, the engine; dune-raw writes rawfiles; the command line and the Python, R, JavaScript and C interfaces all sit on that one engine.

Site: milkway.github.io/dune. Dune repository.

Credits and license

The engine is a derived work: it is translated from SPICE3f5 (© 1985–1991 The Regents of the University of California; Thomas L. Quarles and many others at UC Berkeley) and, for BSIM3v3.3, the .sp analysis, the operating-point fallback chain, .measure, the transient noise sources and the revisions of several device routines, from ngspice-47 (the ngspice team and contributors; BSIM3v3.3.0 by the UC Berkeley BSIM Research Group). The NOTICE file shipped with this package (online) lists the upstream files and reproduces their copyright and licence notices.

Dune is an independent project: it is not affiliated with, sponsored by or endorsed by the University of California, Berkeley, the UC Berkeley BSIM Research Group or the ngspice project. The names "SPICE", "SPICE3" and "ngspice" are used only descriptively, to identify the programs whose netlist language and behaviour Dune implements.

BSD-3-Clause, © André Leite; portions © The Regents of the University of California and the ngspice contributors.

Metadata

Release files for spice3 0.7.1

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

Source distribution (sdist)

Source distribution for spice3 0.7.1
File Size Uploaded Provenance Actions
spice3-0.7.1.tar.gz 802.5 kB With provenance Details for spice3-0.7.1.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for spice3 0.7.1
File Actions
spice3-0.7.1-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details for spice3-0.7.1-cp310-abi3-win_amd64.whl
spice3-0.7.1-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details for spice3-0.7.1-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
spice3-0.7.1-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details for spice3-0.7.1-cp310-abi3-macosx_11_0_arm64.whl
spice3-0.7.1-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details for spice3-0.7.1-cp310-abi3-macosx_10_12_x86_64.whl

Total release size: 16.0 MB

Release files / spice3-0.7.1.tar.gz

Download URL spice3-0.7.1.tar.gz
Size 802.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f3e3627b021b4555cbfe865076736bf488c74a1828c8a036887ed81f3dff0a0f
BLAKE2b-256 checksum
How to use checksums
6bfaffd9e76ffcf032aa4accb242da1a59dd3e580f710adb4ca28234ac8aede3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 13, 2026.

Transparency log

Release files / spice3-0.7.1-cp310-abi3-win_amd64.whl

Download URL spice3-0.7.1-cp310-abi3-win_amd64.whl
Size 4.0 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
ebabe5f71af0a9baffb17a6668379a58c555b112e0ac0da7b00be2170f6248bb
BLAKE2b-256 checksum
How to use checksums
bedbf5fc74dc455f46cc2923006d66e57546b5d713b7308f8a38a2aa28fa923c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 13, 2026.

Transparency log

Release files / spice3-0.7.1-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL spice3-0.7.1-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 4.1 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
fc39e680a99b60c447c253cc42980e61866840e9d80601d935fcf1f0fe6814f0
BLAKE2b-256 checksum
How to use checksums
45d1f9d51fc55f079166de9cbed394f6b82ee59dcbf426fb1e83932e197c52c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 13, 2026.

Transparency log

Release files / spice3-0.7.1-cp310-abi3-macosx_11_0_arm64.whl

Download URL spice3-0.7.1-cp310-abi3-macosx_11_0_arm64.whl
Size 3.3 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
0135ce0498de5807f6a1af9cab86b61d029469d7a3212046bec19662b2e85747
BLAKE2b-256 checksum
How to use checksums
e379e8a80a0610beb7bfd6e197e194d5f19eed7c978f63a18bfca2c2d413ce59
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 13, 2026.

Transparency log

Release files / spice3-0.7.1-cp310-abi3-macosx_10_12_x86_64.whl

Download URL spice3-0.7.1-cp310-abi3-macosx_10_12_x86_64.whl
Size 3.8 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
7d533f454914249ff77b9bddd11fa38bc3d36a3eebcad65559040562cee28823
BLAKE2b-256 checksum
How to use checksums
9d679f128d9f721c02df5bebc5e601040d3babe3f57e5bc47a4bcad804f7046c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 13, 2026.

Transparency log

Security for spice3 0.7.1

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.

Select from 5 files

Attestation for spice3-0.7.1.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 Nov 13, 2026.

Transparency log

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