voltkit


Namevoltkit JSON
Version 1.1.0 PyPI version JSON
download
home_pagehttps://github.com/ShobhitBhardwaj763/voltkit
SummaryVoltKit: A Python toolkit for electrical and electronics engineering
upload_time2025-08-03 07:40:44
maintainerNone
docs_urlNone
authorShobhit Bhardwaj
requires_python>=3.7
licenseNone
keywords electrical engineering simulation education phasors fft bode streamlit
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# ⚡ VoltKit — The Open Toolkit for Electrical & Electronics Engineering

![VoltKit Logo](https://voltkit-web.streamlit.app/~/+/media/477830ff6188ca269246b3e68e345ddff24cd145ae266fc35b00f735.jpg)

VoltKit is an open-source Python library designed to make electrical and electronics engineering more practical, visual, and beginner-friendly.

From Ohm's Law to Phasor Diagrams, from FFTs to Streamlit-powered simulations — VoltKit helps students, educators, and makers bring theoretical concepts to life using code.

---

## 🚀 Why VoltKit?

Electrical engineering is filled with complex formulas and repetitive calculations. VoltKit simplifies this by:

- Providing clean and tested Python functions for core EE concepts
- Offering ready-made simulators and calculators
- Including beautiful interactive visualizations using Streamlit
- Helping students build real projects, faster

---

## 🧩 Features (So Far)

| Version | Highlights |
|---------|------------|
| v0.1    | Ohm’s Law, Series & Parallel Resistors, RLC impedance |
| v0.2    | AC Power: Real, Reactive, Apparent, Power Factor |
| v0.3    | Signal generation (sine, square, triangle, DC) |
| v0.4    | Filters (Low-pass, High-pass), Bode Plots |
| v0.5    | FFT Analysis, RC Step Response |
| v1.0    | Phasor Math, RL/RC/RLC Phasor Diagrams, Time-domain Signal
Generator
| v1.0.1  | Real Signal Importing in (csv, wav) formets, Harmonics,scaling, Signal Stats, Plotting Signal |
 

---

## ⚙️ Installation

```
pip install voltkit
```

Or you can also

Clone the repo and install in development mode:

```bash
git clone https://github.com/ShobhitBhardwaj763/voltkit.git
cd voltkit
pip install -e .
```

## Voltkit v1.0 Collab Notebook with examples

[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1gL6y9mrg4zuumT950I7BGJqbdwQnsePH)

---

## 🧪 Usage Examples

### Ohm's Law
```python
from voltkit.core import voltage, resistance, current
# voltage(i,r)
# resistance(v,i)
# current(v,r)
v = voltage(2, 5)           # 10 volts
r = resistance(10,2)       # 5 ohms
i = current(10,5)          # 2 amps
```

### RLC Impedance
```python
from voltkit.core import resistor, inductor, capacitor
z_r = resistor(100)                     # 100 Ω
z_l = inductor(10e-3, freq=1000)       # 62.8j Ω
z_c = capacitor(1e-6, freq=1000)       # -159.1j Ω
```

### Phasor Diagram for RL Circuit
```python
from voltkit.core import plot_rl_phasor_diagram
plot_rl_phasor_diagram(R=10, L=0.1, I=1, f=50)
```

### Generate a Sine Wave
```python
from voltkit.core import sine_wave
t, y = sine_wave(freq=50, duration=1, sample_rate=1000, amp=5)
```

## To Plot the sin wave
```python
from voltkit.core import sine_wave
import matplotlib.pyplot as plt
t, y = sine_wave(freq=50, duration=1, sample_rate=1000, amp=5)

plt.figure(figsize=(12, 8))
plt.plot(t, y, label='Sine Wave')
plt.ylabel('Voltage (V)')
plt.legend()
plt.grid()
plt.show()

```

## Real Signal Processing (v1.0.1)

# Load, analyze and visualize real-world signals easily:
```python
from voltkit.core import (load_csv_signal, add_harmonics, scale_signal, compute_rms, peak_to_peak, signal_energy, compute_thd, plot_signal)

# Load signal from CSV file and plot signal
t,y = load_csv_signal("signal.csv")
plot_signal(t,y, title="Sample Signal")

# Add Harmonics
# Base signal with harmonics
harmonics_dict = {3: 0.5, 5: 0.3}  # Add 3rd and 5th harmonics
t,y = sine_wave(freq=50, amp=5, duration=0.1, fs=5000 )
t,y_harmonic = add_harmonics(t,y, freq, harmonics_dict)
plot_signal(t,y_harmonic, title="Signal with Harmonics")

# Scale the harmonic signal
y_scaled = scale_signal(y_harmonic, factor=2.0)
plot_signal(t, y_scaled, title="Scaled Signal (x2)")

# Analyze the signal
print("RMS", compute_rms(y_scaled))
print("Total Harmonics Distortion": compute_thd(y_scaled))



```
---

## 🖥️ Explore Interactivily

```

Visit our live **VoltKit Simulation Website** built with Streamlit:
👉 [https://voltkit-web.streamlit.app](https://voltkit-web.streamlit.app)

No installation needed, just open in your browser and visualize concepts!

```


### 🧪 Available Simulations on Website

- Signal Generator  
- Bode Plot Explorer  
- FFT Analyzer  
- RC Circuit Visualizer  
- Phasor Diagram Tool  


---
## Example files to understand
- `basic_usage.py`
- `signal_genrator.py`
- `rc_response.py`
- `power_analysis.py`
- `phasor_diagram_example.py`
- `plot_bode_rlc.py`
- `phasor_demo.py`
- `lowpass_filter_demo.py`
- `fft_analysis.py`
- `ac_vs_dc_example.py`
- `signal_analysis_example.py`
- `signal_transform_example.py`
- `signal_stats_example.py`

## To run example files, use this method

```bash
cd voltkit
python examples/example_file_name.py
```

Or just open the rulebook google collab notebook


##  Who Is It For?

-  Students learning EE/ECE fundamentals
-  Teachers building visual classroom demos
-  Makers building small projects and simulations

---

## 🤝 Contributing

Want to contribute or request a feature?

- Submit a PR or open an issue
- Reach me directly at: `voltkit.dev@gmail.com`

---

## 📜 License

This project is licensed under the [MIT License](./LICENSE).

## Acknowledgements

> NumPy - numerical computing
> SciPy - scientific functions
> Pandas - data handling
> Streamlit - interactive web apps
> Matplotlib - plotting

Special thanks to the open-source community.

---

> VoltKit was started with one goal:  
> **To empower electrical engineers to learn and build faster with Python.**  
> If this helped you, feel free to ⭐ star the repo or share it with your peers.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ShobhitBhardwaj763/voltkit",
    "name": "voltkit",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "electrical engineering simulation education phasors fft bode streamlit",
    "author": "Shobhit Bhardwaj",
    "author_email": "voltkit.dev@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/1c/80/cb3079a5eebd87c055fbff3cc46c58398c3c73380d1806b871c2b5750202/voltkit-1.1.0.tar.gz",
    "platform": null,
    "description": "\r\n# \u26a1 VoltKit \u2014 The Open Toolkit for Electrical & Electronics Engineering\r\n\r\n![VoltKit Logo](https://voltkit-web.streamlit.app/~/+/media/477830ff6188ca269246b3e68e345ddff24cd145ae266fc35b00f735.jpg)\r\n\r\nVoltKit is an open-source Python library designed to make electrical and electronics engineering more practical, visual, and beginner-friendly.\r\n\r\nFrom Ohm's Law to Phasor Diagrams, from FFTs to Streamlit-powered simulations \u2014 VoltKit helps students, educators, and makers bring theoretical concepts to life using code.\r\n\r\n---\r\n\r\n## \ud83d\ude80 Why VoltKit?\r\n\r\nElectrical engineering is filled with complex formulas and repetitive calculations. VoltKit simplifies this by:\r\n\r\n- Providing clean and tested Python functions for core EE concepts\r\n- Offering ready-made simulators and calculators\r\n- Including beautiful interactive visualizations using Streamlit\r\n- Helping students build real projects, faster\r\n\r\n---\r\n\r\n## \ud83e\udde9 Features (So Far)\r\n\r\n| Version | Highlights |\r\n|---------|------------|\r\n| v0.1    | Ohm\u2019s Law, Series & Parallel Resistors, RLC impedance |\r\n| v0.2    | AC Power: Real, Reactive, Apparent, Power Factor |\r\n| v0.3    | Signal generation (sine, square, triangle, DC) |\r\n| v0.4    | Filters (Low-pass, High-pass), Bode Plots |\r\n| v0.5    | FFT Analysis, RC Step Response |\r\n| v1.0    | Phasor Math, RL/RC/RLC Phasor Diagrams, Time-domain Signal\r\nGenerator\r\n| v1.0.1  | Real Signal Importing in (csv, wav) formets, Harmonics,scaling, Signal Stats, Plotting Signal |\r\n \r\n\r\n---\r\n\r\n## \u2699\ufe0f Installation\r\n\r\n```\r\npip install voltkit\r\n```\r\n\r\nOr you can also\r\n\r\nClone the repo and install in development mode:\r\n\r\n```bash\r\ngit clone https://github.com/ShobhitBhardwaj763/voltkit.git\r\ncd voltkit\r\npip install -e .\r\n```\r\n\r\n## Voltkit v1.0 Collab Notebook with examples\r\n\r\n[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1gL6y9mrg4zuumT950I7BGJqbdwQnsePH)\r\n\r\n---\r\n\r\n## \ud83e\uddea Usage Examples\r\n\r\n### Ohm's Law\r\n```python\r\nfrom voltkit.core import voltage, resistance, current\r\n# voltage(i,r)\r\n# resistance(v,i)\r\n# current(v,r)\r\nv = voltage(2, 5)           # 10 volts\r\nr = resistance(10,2)       # 5 ohms\r\ni = current(10,5)          # 2 amps\r\n```\r\n\r\n### RLC Impedance\r\n```python\r\nfrom voltkit.core import resistor, inductor, capacitor\r\nz_r = resistor(100)                     # 100 \u03a9\r\nz_l = inductor(10e-3, freq=1000)       # 62.8j \u03a9\r\nz_c = capacitor(1e-6, freq=1000)       # -159.1j \u03a9\r\n```\r\n\r\n### Phasor Diagram for RL Circuit\r\n```python\r\nfrom voltkit.core import plot_rl_phasor_diagram\r\nplot_rl_phasor_diagram(R=10, L=0.1, I=1, f=50)\r\n```\r\n\r\n### Generate a Sine Wave\r\n```python\r\nfrom voltkit.core import sine_wave\r\nt, y = sine_wave(freq=50, duration=1, sample_rate=1000, amp=5)\r\n```\r\n\r\n## To Plot the sin wave\r\n```python\r\nfrom voltkit.core import sine_wave\r\nimport matplotlib.pyplot as plt\r\nt, y = sine_wave(freq=50, duration=1, sample_rate=1000, amp=5)\r\n\r\nplt.figure(figsize=(12, 8))\r\nplt.plot(t, y, label='Sine Wave')\r\nplt.ylabel('Voltage (V)')\r\nplt.legend()\r\nplt.grid()\r\nplt.show()\r\n\r\n```\r\n\r\n## Real Signal Processing (v1.0.1)\r\n\r\n# Load, analyze and visualize real-world signals easily:\r\n```python\r\nfrom voltkit.core import (load_csv_signal, add_harmonics, scale_signal, compute_rms, peak_to_peak, signal_energy, compute_thd, plot_signal)\r\n\r\n# Load signal from CSV file and plot signal\r\nt,y = load_csv_signal(\"signal.csv\")\r\nplot_signal(t,y, title=\"Sample Signal\")\r\n\r\n# Add Harmonics\r\n# Base signal with harmonics\r\nharmonics_dict = {3: 0.5, 5: 0.3}  # Add 3rd and 5th harmonics\r\nt,y = sine_wave(freq=50, amp=5, duration=0.1, fs=5000 )\r\nt,y_harmonic = add_harmonics(t,y, freq, harmonics_dict)\r\nplot_signal(t,y_harmonic, title=\"Signal with Harmonics\")\r\n\r\n# Scale the harmonic signal\r\ny_scaled = scale_signal(y_harmonic, factor=2.0)\r\nplot_signal(t, y_scaled, title=\"Scaled Signal (x2)\")\r\n\r\n# Analyze the signal\r\nprint(\"RMS\", compute_rms(y_scaled))\r\nprint(\"Total Harmonics Distortion\": compute_thd(y_scaled))\r\n\r\n\r\n\r\n```\r\n---\r\n\r\n## \ud83d\udda5\ufe0f Explore Interactivily\r\n\r\n```\r\n\r\nVisit our live **VoltKit Simulation Website** built with Streamlit:\r\n\ud83d\udc49 [https://voltkit-web.streamlit.app](https://voltkit-web.streamlit.app)\r\n\r\nNo installation needed, just open in your browser and visualize concepts!\r\n\r\n```\r\n\r\n\r\n### \ud83e\uddea Available Simulations on Website\r\n\r\n- Signal Generator  \r\n- Bode Plot Explorer  \r\n- FFT Analyzer  \r\n- RC Circuit Visualizer  \r\n- Phasor Diagram Tool  \r\n\r\n\r\n---\r\n## Example files to understand\r\n- `basic_usage.py`\r\n- `signal_genrator.py`\r\n- `rc_response.py`\r\n- `power_analysis.py`\r\n- `phasor_diagram_example.py`\r\n- `plot_bode_rlc.py`\r\n- `phasor_demo.py`\r\n- `lowpass_filter_demo.py`\r\n- `fft_analysis.py`\r\n- `ac_vs_dc_example.py`\r\n- `signal_analysis_example.py`\r\n- `signal_transform_example.py`\r\n- `signal_stats_example.py`\r\n\r\n## To run example files, use this method\r\n\r\n```bash\r\ncd voltkit\r\npython examples/example_file_name.py\r\n```\r\n\r\nOr just open the rulebook google collab notebook\r\n\r\n\r\n##  Who Is It For?\r\n\r\n-  Students learning EE/ECE fundamentals\r\n-  Teachers building visual classroom demos\r\n-  Makers building small projects and simulations\r\n\r\n---\r\n\r\n## \ud83e\udd1d Contributing\r\n\r\nWant to contribute or request a feature?\r\n\r\n- Submit a PR or open an issue\r\n- Reach me directly at: `voltkit.dev@gmail.com`\r\n\r\n---\r\n\r\n## \ud83d\udcdc License\r\n\r\nThis project is licensed under the [MIT License](./LICENSE).\r\n\r\n## Acknowledgements\r\n\r\n> NumPy - numerical computing\r\n> SciPy - scientific functions\r\n> Pandas - data handling\r\n> Streamlit - interactive web apps\r\n> Matplotlib - plotting\r\n\r\nSpecial thanks to the open-source community.\r\n\r\n---\r\n\r\n> VoltKit was started with one goal:  \r\n> **To empower electrical engineers to learn and build faster with Python.**  \r\n> If this helped you, feel free to \u2b50 star the repo or share it with your peers.\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "VoltKit: A Python toolkit for electrical and electronics engineering",
    "version": "1.1.0",
    "project_urls": {
        "Homepage": "https://github.com/ShobhitBhardwaj763/voltkit"
    },
    "split_keywords": [
        "electrical",
        "engineering",
        "simulation",
        "education",
        "phasors",
        "fft",
        "bode",
        "streamlit"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "063d8bb21fce5d7a24218d23d5b703da479389dbd41d565264ce90d631da5aba",
                "md5": "f90d8c8ba15161dfd963b52e06a4bb5a",
                "sha256": "1e65f811206a58ebee952b67aded8ee64292c8645f9be72dbf01238c2f4ee97b"
            },
            "downloads": -1,
            "filename": "voltkit-1.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f90d8c8ba15161dfd963b52e06a4bb5a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 18020,
            "upload_time": "2025-08-03T07:40:43",
            "upload_time_iso_8601": "2025-08-03T07:40:43.285107Z",
            "url": "https://files.pythonhosted.org/packages/06/3d/8bb21fce5d7a24218d23d5b703da479389dbd41d565264ce90d631da5aba/voltkit-1.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "1c80cb3079a5eebd87c055fbff3cc46c58398c3c73380d1806b871c2b5750202",
                "md5": "0ccf52616ef3c784f56f45e2a86f1dd4",
                "sha256": "258351620b06c44cd3e990beb5284d97e959b15eb4192fe0080078bfa2fa3857"
            },
            "downloads": -1,
            "filename": "voltkit-1.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "0ccf52616ef3c784f56f45e2a86f1dd4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 16486,
            "upload_time": "2025-08-03T07:40:44",
            "upload_time_iso_8601": "2025-08-03T07:40:44.763228Z",
            "url": "https://files.pythonhosted.org/packages/1c/80/cb3079a5eebd87c055fbff3cc46c58398c3c73380d1806b871c2b5750202/voltkit-1.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-03 07:40:44",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ShobhitBhardwaj763",
    "github_project": "voltkit",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "voltkit"
}
        
Elapsed time: 1.74204s