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.1.tar.gz (18.0 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.1-py3-none-any.whl (21.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyunit_neo-1.0.1.tar.gz
  • Upload date:
  • Size: 18.0 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.1.tar.gz
Algorithm Hash digest
SHA256 dcd369acce62fe1073d4594046d6786be6ce0e156162577e2956b556ffd3ebe2
MD5 fd9be65a87bd9f361bc68792525f0c98
BLAKE2b-256 95cf19fdd10f9cd61ffc45192daf698fff342ef6342b512b1734fcf362332f58

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyunit_neo-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 21.0 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a6ecb623b2706354950d9dd6ce008a472cd8ef14b4c09b2021d1078e629810e1
MD5 b5a9750b36edacd69a2387fd1ded8fb6
BLAKE2b-256 8055cbe2a29e1bade2d31f98f3a7ee8012954962eee51d41b7f99da1e22de5d2

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