Skip to main content

Python interface to Ngspice and Xyce circuit simulators (forked from InSpice)

Project description

InSpice

This repository has been forked from it's original repository PySpice.

About

InSpice is a Python interface to the Ngspice and Xyce circuit simulators. It provides a Python API to describe electronic circuits and to run analog simulations.

Installation

You can install InSpice from PyPI:

pip install inspice

For development installation:

git clone https://github.com/Innovoltive/InSpice.git
cd InSpice
pip install -e .

Dependencies

  • Python >= 3.12
  • Ngspice (as shared library)
  • matplotlib (for plotting)
  • numpy (for numerical computation)

Usage

See the examples directory for various examples of using InSpice.

Basic example:

import InSpice
from InSpice.Unit import *

circuit = InSpice.Circuit('Simple RC Circuit')
circuit.R('1', 'input', 'output', 1@kΩ)
circuit.C('1', 'output', circuit.gnd, 1@µF)

Documentation

For detailed documentation, please refer to the examples and docstrings.

License

InSpice is licensed under the GNU General Public License v3.0 (GPL-3.0), the same license as the original PySpice project.

GNU GPL v3.0

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Acknowledgments

Original project (PySpice) by Fabrice Salvaire

Copyright (C) 2025 Innovoltive

Modified by Innovoltive on April 18, 2025.

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

inspice-1.7.0.3.tar.gz (263.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

inspice-1.7.0.3-py3-none-any.whl (253.7 kB view details)

Uploaded Python 3

File details

Details for the file inspice-1.7.0.3.tar.gz.

File metadata

  • Download URL: inspice-1.7.0.3.tar.gz
  • Upload date:
  • Size: 263.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for inspice-1.7.0.3.tar.gz
Algorithm Hash digest
SHA256 695f08018083d2214e5a37a7fe3ab15d28f308dfe3d6e8ac4b7d43a6f4f09ba1
MD5 fb6914644abd2885848ecd11fa8befec
BLAKE2b-256 0d7b4d5ef64922b7b9c2d3fe6d3c9955920f3da39f177e3b6f03397bfe666d05

See more details on using hashes here.

Provenance

The following attestation bundles were made for inspice-1.7.0.3.tar.gz:

Publisher: python-publish.yml on insim-ai/InSpice

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file inspice-1.7.0.3-py3-none-any.whl.

File metadata

  • Download URL: inspice-1.7.0.3-py3-none-any.whl
  • Upload date:
  • Size: 253.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for inspice-1.7.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6614268a78d7c77cf15eca112c34f3377d40e8062c5173fe50e575706a7b7fd1
MD5 5d90bf9c6343901060d29699c1823dd7
BLAKE2b-256 ac0dccb74e6a435ff23dfdab0bbdaf174b729054ac81758b96fea12b478d50a6

See more details on using hashes here.

Provenance

The following attestation bundles were made for inspice-1.7.0.3-py3-none-any.whl:

Publisher: python-publish.yml on insim-ai/InSpice

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page