svg schematics
Project description
- Author:
Ken Kundert
- Version:
1.2.0
- Released:
2022-06-03
This package allows you to create simple SVG schematics and block diagrams without a mouse. Instead, you build the schematic using Python to instantiate and place the symbols and wires.
Simple Example
Here is a simple example that demonstrates the package. It generates the schematic of a shunt RLC circuit:
from svg_schematic import Schematic, Resistor, Capacitor, Inductor, Wire
from inform import Error, error, os_error
try:
with Schematic(filename='rlc.svg'):
r = Resistor(name='R', orient='v')
c = Capacitor(W=r.E, name='C', orient='v')
l = Inductor(W=c.E, name='L', orient='v|')
Wire([r.p, l.p])
Wire([r.n, l.n])
except Error as e:
e.report()
except OSError as e:
error(os_error(e))
When run, it produces the following schematic:
Installation
Requires Python3. Works best with Python3.6 or newer.
You can download and install the latest stable version of the code from PyPI using:
pip3 install --user svg_schematic
You can find the latest development version of the source code on Github.
Documentation
You can find documentation at ReadTheDocs.
Issues
Please ask questions or report problems on Github Issues.
Contributions
Contributions in the form of pull requests are welcome.
I tend to create symbols as I need them. If you create missing symbols, please consider contributing them back to the project.
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
File details
Details for the file svg_schematic-1.2.0.tar.gz
.
File metadata
- Download URL: svg_schematic-1.2.0.tar.gz
- Upload date:
- Size: 26.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a3c9f3ad618075149b8089ee23d4433a7f33325f1a4c382589c3841d829c3c81 |
|
MD5 | 6c5d4f228f697b8a66575359d080e46c |
|
BLAKE2b-256 | f83bb717385646854cdb0fd4ff46c13b2c6b138eb319e6cf0179ef100c658a89 |
File details
Details for the file svg_schematic-1.2.0-py3-none-any.whl
.
File metadata
- Download URL: svg_schematic-1.2.0-py3-none-any.whl
- Upload date:
- Size: 27.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8db594ef60696555ab8d75740c40bc1cc004b9e760d4a963f4f50f936f997b9 |
|
MD5 | 77b4c1cc157c84b9222445ff7d67ee7d |
|
BLAKE2b-256 | 78fdf156199c60155b686affa3ce621da953b61eb6c13927dec46c99d4145107 |