Skip to main content

python3 library for Ohms law.

Project description

ohmslaw

PyPI - Downloads PyPI - License Documentation Status GitHub Tag

Ohms law is an important and fundamental rule to remember when working with resistors and electronics in general. It defines the relationship between the components’ current I in amps (A), voltage V in volts (V) and resistance R in ohms (Ω). Ohm’s law consists of three mathematical equations that explain the relationship between current, voltage and resistance. If you know two of these values.

Quickstart:

install

pip install ohmslaw

import

from ohmslaw import Ohms

current multiplied by resistance = voltage

o = Ohms()
results = o.volts(2, 4)

print(results)

voltage Divided by resistance = current

o = Ohms()
results = o.current(12, 4)

print(results)

voltage divided by current = resistance

o = Ohms()
results = o.resistance(48, 4)

print(results)

find the resistance value to limit the electrical voltage of a circuit

o = Ohms()
results = o.find_resistor(source=48, component_voltage=12)# Led

print(results)

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

ohmslaw-1.0rc13.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

ohmslaw-1.0rc13-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file ohmslaw-1.0rc13.tar.gz.

File metadata

  • Download URL: ohmslaw-1.0rc13.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.6

File hashes

Hashes for ohmslaw-1.0rc13.tar.gz
Algorithm Hash digest
SHA256 745b10d4f4f9a0bd0bcdfcb0f3473cbc7a8fe958599709f48a36a0b449ff8172
MD5 52cd5a3b9477710d4aafcbd7f1aaf87d
BLAKE2b-256 9acc061211826dd4b7caa70cef63e28d426ea2a65d34cf20b3ddab745091c0a0

See more details on using hashes here.

File details

Details for the file ohmslaw-1.0rc13-py3-none-any.whl.

File metadata

  • Download URL: ohmslaw-1.0rc13-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.6

File hashes

Hashes for ohmslaw-1.0rc13-py3-none-any.whl
Algorithm Hash digest
SHA256 e717e9d9dcff517e84944d3122e32d4d14cf95048a6b7482e36a979cfefb6f9a
MD5 a5c82a6f674831483a10a7c2c907823a
BLAKE2b-256 cbb7aca1802ae13a34986307e0bad5f252625152558c31d82f201f5fe1bc2bb6

See more details on using hashes here.

Supported by

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