A library to speed up physics work
Project description
PyFys
An opinionated physics library.
pip install pyfys
PyFys is a Python library designed to simplify physics calculations and visualizations. It provides tools for computing common physics quantities and creating graphs.
The philosophy of the project is speed and simplicity. Physics is challenging enough as it is, so PyFys aims to make the programming side of things as easy as possible.
Features
- Calculate physical quantities like kinetic energy, force, and relativistic momentum. (More equations coming soon!)
- Generate and visualize graphs for functions and data.
- Supports scalar and vector inputs for maximum flexibility and speed.
Installation
To install PyFys, run the following command:
pip install pyfys
Quickstart
Import the Library
Here's an example of how to use PyFys to calculate kinetic energy:
import pyfys
# Example: Calculate kinetic energy
fys = pyfys.fys()
mass = 10
velocity = [5, 10, 15]
energy = fys.kinetic_energy(mass=mass, velocity=velocity)
print(energy) # Output: [125.0, 500.0, 1125.0]
Generate a Graph
This example demonstrates how to plot multiple functions:
fys.graph((math.sin, math.cos), stop=5)
Plot Data
This example demonstrates how to plot data:
mass = 10
velocity = [5, 10, 15]
fys.plot(fys.kinetic_energy(mass, velocity), velocity)
Bar Chart
This example demonstrates how to create a bar chart from a list of data:
data = ["cat", "dog", "bird", "cat", "dog", "fish", "dog"]
fys.bar(data)
Documentation
TODO: Add documentation "For detailed usage and examples, visit the official documentation."
Contributing
Contributions are welcome!
License
This project is licensed under the MIT License. See the LICENSE file for details.
TODO
- Add more equations
- Add more constants
- Add more unit conversions
- Create documentation
- Create a documentation website, where you can search for equations (like the Tailwind documentation)
- Add integralcalculations for e.g. inertia
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyfys-0.2.15.tar.gz.
File metadata
- Download URL: pyfys-0.2.15.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50a8168765d3ac004fcf4b010efa804eeaa95490fb0779e2450f16263071d2ab
|
|
| MD5 |
c3a6c813cbf8e200b216c9523e80cd4e
|
|
| BLAKE2b-256 |
17a6a11ab7b905b62e5c7e055e6121cc95b109d6b052b9549dd5a0bf4bde82da
|
File details
Details for the file pyfys-0.2.15-py3-none-any.whl.
File metadata
- Download URL: pyfys-0.2.15-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2f32cf7fbd1f4216ef4b47bc3bfb1b8983294fea5043ca9646c0aa89b63d403
|
|
| MD5 |
cc630ed3ed4a2468864e90e017e863f1
|
|
| BLAKE2b-256 |
b7e245f700eab6014e98d686aaaad7fb47496a6f9e8274a1130847609aac79c3
|