Skip to main content

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)  # 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


Download files

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

Source Distribution

pyunit_neo-1.0.0.tar.gz (17.9 kB view details)

Uploaded Source

Built Distribution

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

pyunit_neo-1.0.0-py3-none-any.whl (20.9 kB view details)

Uploaded Python 3

File details

Details for the file pyunit_neo-1.0.0.tar.gz.

File metadata

  • Download URL: pyunit_neo-1.0.0.tar.gz
  • Upload date:
  • Size: 17.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for pyunit_neo-1.0.0.tar.gz
Algorithm Hash digest
SHA256 23103c65054460f684e0c5c24424c79efee564a0e5e8299fb807d9b2f8ae3002
MD5 fb7d974d310265326ebe745cdd6695a6
BLAKE2b-256 a4685fd428cc8baf3e2cb096d3c4447a30025d96d66c28578bf41f07cf2c91ac

See more details on using hashes here.

File details

Details for the file pyunit_neo-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: pyunit_neo-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 20.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for pyunit_neo-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c887a94f4576c63f84c33ece3776455341724a02e3cee9b8f7beb1ce2790f637
MD5 8e507797ada38938cb80ad1002e06ae6
BLAKE2b-256 f953454633c47db03bf3053de6813a0148069a44d9190ef44c41967b6999f6c2

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