unitty
Unitty (pronounced 'unity') provides units when you need them, not when you don't. It's based on a phiolosophy that:
- Units are useful for inputs
- Units are useful for outputs (e.g. reports, plots)
- Calculations are done in SI units, so units are not needed unless checking.
- Unittests are used to encompass dimensional checks. Dimensional checks themselves are insufficient.
- Quantities are named adequately in the code (e.g. 'area', 'length', 'mass'). The kind of quantity they represent is clear from their names, and so representing it elsewhere is typically redundant.
Unitty provides a flexible, lightweight package to:
- Convert numbers to and from different units
- Create derivative units
- Automatically switch outputs to a different unit system, without changing any code.
- Bundle values together with units for downstream use (e.g. reports, plots).
It is built on the idea that units provide scale factors to convert numbers to and from values in SI base units. Since SI base units all have magnitudes of 1.0, unit information need not be in the calculations themselves.
Quick start
Alternatives
Several other packages might be better suited to your particular needs. Here are some to consider:
- numericalunits: Units and dimensional analysis compatible with everything
- pint: Define, operate and manipulate physical quantities.
- quantiphy: Pairs numbers and units.
- astropy.units
- Buckingham
- DimPy
- Magnitude
- Python-quantities
- Scalar
- Scientific.Physics.PhysicalQuantities
- SciMath
- sympy.physics.units
- udunitspy
- Units
- Unum
Metadata
Release files for unitty 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| unitty-0.0.1.tar.gz | 5.5 kB | Without provenance | Details for unitty-0.0.1.tar.gz |
Release files / unitty-0.0.1.tar.gz
| Download URL | unitty-0.0.1.tar.gz |
|---|---|
| Size | 5.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
82a0bcf41a6fce9e229787a80c62a6a004456934304d6a82df21d1bf77e89d52
|
|
BLAKE2b-256 checksum How to use checksums |
5bd2e5f41bb2eada07a78bd4bdd8a15d23a4dbd2b8fe5be961e4b21559e3756e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.4
|
Security for unitty 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.