Stateful variables in Python, a new way to calculate
Project description
Pyliven
Pronounced /ˈpaɪlʌɪvɛn/
Pyliven is an initiative to add stateful computation in the Python programming language. With this package, your python variables with automatically update if a dependency variable is updated. It's a new way to calculate in python.
Use
Pyliven can be leveraged in multiple ways. One use-case can be to write formulae in python. Let's try with the classic Electrostatic force formula:
from pyliven.liven import LiveNum
k = 9e9
q1 = LiveNum(2e-3)
q2 = LiveNum(3e-3)
r = LiveNum(1)
Force = k*q1*q2/r**2
Now we can directly update any of q1
, q2
, and r
, and the value of Force
will update.
r.update(5)
print(Force)
You can find the complete documentation at https://keymii.github.io/pyliven
Project details
Release history Release notifications | RSS feed
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 pyliven-0.1.1.tar.gz
.
File metadata
- Download URL: pyliven-0.1.1.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7fa04f55e218a9967f45f37d7787563b4fc055f6173374933eb6a27a9c220d87 |
|
MD5 | 29078c1c0388038332712405ed931ed2 |
|
BLAKE2b-256 | e0ea2cfd1172427d4261a807da446bb6bd7edf89bbdc730628909f8899a877d3 |
File details
Details for the file pyliven-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: pyliven-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed5d466f876c636e4f3029eee52a4944d71a72605c34b2aadeefd90d87013c88 |
|
MD5 | 8c8a38829b050a7e3aa511f348e69472 |
|
BLAKE2b-256 | e3205a072e9ee8392e152c3669a5ac2cdd0714f33feee4856cab9fa4f295a72e |