PyLACC
Python Linear Analog Circuit Caclulator
API
from pylacc.circuit import *
Components
-
Voltage Source:
E(E, F, **)
-
Current Source:
I(I, F, **)
-
Resistor:
R(R, F, **)
-
Capacitor:
C(C, **)XC(XC, **)
-
Inductor:
L(L, **)XL(XL, **)
-
**EVoltage (complex, phasor)ICurrent (complex, phasor)ZImpedence (complex, phasor) (aliasR)CCapacitance (positive, real)LInductance (positive, real)XCCapacitive Reactance (positive, real)XLInductive Reactance (positive, real)FFrequency (positive, real)PTTrue Power (positive, real) (aliasP)PRReactive Power (positive, real)PAApparent Power (positive, real)
-
All names can be lower case for fast calculator input
-
All arguments are optional
Complex Values
1.0 + 1.0j(complex)(radius, angle)(phasor, degrees)
Units
k10^3M10^6G10^9T10^12m10^-3u10^-6n10^-9p10^-12
Series Circuits +
e(12) + r(100) + r(300)
+(12V 30mA)
+-S[12V](30mA 360mW)
+-R[100Ω](3V 30mA)
+-R[300Ω](9V 30mA)
Parallel Circuits /
e(12, 60) + xl(100) / xc(200) / r(300)
+(12V 72.1∠-56.3°mA)
+-S[12V 60Hz](72.1∠-56.3°mA 865mVA)
+-/(12V 72.1∠-56.3°mA)
+ /-L[100Ω](12V 120∠-90°mA 265mH)
+ /-C[200Ω](12V 60∠90°mA 13.3μF)
+ /-R[300Ω](12V 40mA)
Solving
.solve() recursively solves for all unknowns. Printing or representing a component / circuit implicitly triggers the solver.
Filtering
_.z- Only show inferred impedence_.p- Only show inferred power_('e', 'z')- Custom output filter_('e,z')- Calculator shorthand
Grouping
Components can be grouped to prevent further concatenation.
FILTER = (l(1e-3) + c(0.0022e-6)).g
C = e(10, 107e3) + FILTER + r(100)
C.solve()
FILTER
+(380∠-87.8°mV 99.9∠2.18°mA)
+-L[1mH](67.2∠92.2°V 99.9∠2.18°mA 672Ω)
+-C[2.2nF](67.6∠-87.8°V 99.9∠2.18°mA 676Ω)
TODO
- Support multiple sources
Metadata
Release files for pylacc 0.0.3
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 | |
|---|---|---|---|---|
| pylacc-0.0.3.tar.gz | 7.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pylacc-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.2 kB
Release files / pylacc-0.0.3.tar.gz
| Download URL | pylacc-0.0.3.tar.gz |
|---|---|
| Size | 7.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
65dead6586067c58865b6e969180516acc6e741521df328c908becb320b3fde0
|
|
BLAKE2b-256 checksum How to use checksums |
3ad74df0c6b53c86065df3cba76298e00637fecd118598a910c69b87d6b8a905
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Release files / pylacc-0.0.3-py3-none-any.whl
| Download URL | pylacc-0.0.3-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7cd7d3f63c5f74c60a1734a659da4feec9c521706575c1220e893db9a2966f22
|
|
BLAKE2b-256 checksum How to use checksums |
d61d8976a297eac02fbafb46ecebd85306bcc2a4c097a4c729279ca455fd2802
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Security for pylacc 0.0.3
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.