r/Python • u/AutoModerator • Apr 04 '26
Showcase Showcase Thread
Post all of your code/projects/showcases/AI slop here.
Recycles once a month.
43
Upvotes
r/Python • u/AutoModerator • Apr 04 '26
Post all of your code/projects/showcases/AI slop here.
Recycles once a month.
1
u/FieldBus_AI Apr 19 '26
PyTeslaCoil: A Python-Native Tesla coil design calculator (NiceGUI + Pydantic)
I've been building PyTeslaCoil, an open-source, Python-native alternative to JavaTC, the closed-source tool by Bart Anderson that the Tesla coil hobbyist community has relied on for years.
GitHub Repo, Live Demo, PyPI:
pip install pyteslacoilWhat My Project Does
PyTeslaCoil computes the physics needed to design a working Tesla coil before you wind any wire. Given inputs like wire gauge, coil dimensions, transformer ratings, and topload geometry, it returns the electrical parameters that determine whether the coil will resonate and produce sparks.
It handles:
Secondary: inductance, self-capacitance, resonant frequency, Q, impedance (Medhurst coefficients included)
Primary: flat spiral, helical, and conical geometries
Topload: toroid and sphere capacitance
Tuning: coupling coefficient (k) with auto-adjust and frequency matching
Misc: transformer sizing, spark length estimation, static/rotary gap math
The UI is built with NiceGUI; data models use Pydantic. Run it locally via pip, or try the hosted demo.
Target Audience
It's an open-source, Python-native alternative to JavaTC, which is the closed-source JavaScript tool by Bart Anderson that the Tesla coil hobbyist community has relied on for years.
Comparison
vs. JavaTC: The de facto standard, but closed-source freeware with no repo, license, or contribution path. PyTeslaCoil is MIT-licensed, pip-installable, and usable as a library or standalone app.
Why NiceGUI over Streamlit: Streamlit's rerun model fights you when inputs are deeply interdependent (change the secondary, primary must retune; topload must re-solve). NiceGUI's event-driven model handles this cleanly.
Feedback wanted
Python-side: architecture, packaging, anything that'd make it easier to contribute to or use as a library
UX: Could the NiceGUI interface be improved?
Also happy to hear what you'd want added.