Skip to main content

A library to speed up physics work

Project description

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyfys-0.2.12.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyfys-0.2.12-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file pyfys-0.2.12.tar.gz.

File metadata

  • Download URL: pyfys-0.2.12.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for pyfys-0.2.12.tar.gz
Algorithm Hash digest
SHA256 942e1119baa54bfb4193073baa9af637281dcb1c16ea4325d1990578844cc095
MD5 2336b59be7c27a675880f8cf48b50698
BLAKE2b-256 0ca71ab50bdb359d983570886cc5c4f3d12d2cf8907723c17dd8924c6ad3926f

See more details on using hashes here.

File details

Details for the file pyfys-0.2.12-py3-none-any.whl.

File metadata

  • Download URL: pyfys-0.2.12-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for pyfys-0.2.12-py3-none-any.whl
Algorithm Hash digest
SHA256 86b37b1906ffea5823c323216bd24833f662fe60ca97690c9f4e348dd793bef3
MD5 617ce94c353b29ba1c0f282cb85c6472
BLAKE2b-256 5e99c7a0d4b8b48042b380d5f57167e998d602f9b509e029046339af856e1ac9

See more details on using hashes here.

Supported by

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