Tools for readable unit types, geometry, and trigonometric utilities.
Project description
PyUnit
PyUnit is a lightweight Python library for creating, manipulating, and comparing units in a readable and performant way.
It provides trigonometric, geometric, and arithmetic utilities, enabling clean and understandable code for unit-based calculations.
Features
- Create unit types like
Distance,Weight,Angle,Time,Temperature, etc. - Perform arithmetic operations and comparisons on units.
- Access trigonometric and geometric functions for calculations.
- Lightweight and readable syntax without heavy dependencies.
- Supports Python 3.10+ on Windows.
Installation
pip install PyUnit
(Note: This package is currently in early development. Some features may be unstable.)
Usage Example
from pyunit import Distance, Angle, Char, new_char
# Create a distance unit
d1 = Distance(10)
d2 = Distance(5)
# Perform arithmetic
total = d1 + d2
# Create a character
a = new_char("A") # type: Char["A"]
# Angle calculation
from pyunit import UnitMath as um
angle = um.alpha(3, 4).radians # returns angle in radians
Licence
This project is licensed under the MIT License – see the LICENCE file for details.
Contributing
Contributions, bug reports, and feature requests are welcome! Visit the repository: PyUnit on GitHub
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 pyunit_neo-1.0.2.tar.gz.
File metadata
- Download URL: pyunit_neo-1.0.2.tar.gz
- Upload date:
- Size: 18.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c8b668bc085fe1c59845309f79a538d96ef8d2d206ca4dbe78e8d632c44ace2
|
|
| MD5 |
55887696d49603038f0ce3bd29c53490
|
|
| BLAKE2b-256 |
f0156a0e006bec0b344c9e695484b5a5a1ee7894fdf9ba04d69efbd9fe758e2e
|
File details
Details for the file pyunit_neo-1.0.2-py3-none-any.whl.
File metadata
- Download URL: pyunit_neo-1.0.2-py3-none-any.whl
- Upload date:
- Size: 21.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5fbe47d25b90483bbfbdc1189d67cd8c402d8128a5882e04ba05a90ff26c69eb
|
|
| MD5 |
56cbc1fd8b1aa86e2002c049e9f350f7
|
|
| BLAKE2b-256 |
1fab36bceed16506bf1363a2d5935b69b1a7501310ce4b028e979784b1798734
|