Typed engineering quantities with SI-default storage, built on pint
Project description
engunits
Typed engineering quantities with SI-default storage, built on pint.
Install
pip install engunits
Quick start
from engunits import Mass, Length, Velocity
# Create quantities — SI units by default
m = Mass(1000, "lb") # stored internally as kg
l = Length(5, "ft") # stored internally as m
# Convert on demand
print(m("kg")) # 453.592 kg
print(l("m")) # 1.524 m
# Callable syntax for conversion
v = Velocity(100, "m/s")
print(v("ft/s")) # 328.084 ft/s
# Arithmetic
total = Mass(10, "kg") + Mass(5, "kg")
scaled = Length(3, "m") * 2
ratio = Mass(30, "kg") / Mass(10, "kg") # returns float: 3.0
Supported quantities
| Class | SI Unit |
|---|---|
Mass |
kg |
Length |
m |
Time |
s |
Temperature |
K |
Velocity |
m/s |
Force |
N |
Moment |
N·m |
Power |
W |
Energy |
J |
Area |
m² |
Volume |
m³ |
Density |
kg/m³ |
Pressure |
Pa |
AngularVelocity |
rad/s |
Voltage |
V |
Current |
A |
Capacity |
A·h |
License
MIT
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 engunits-0.1.0.tar.gz.
File metadata
- Download URL: engunits-0.1.0.tar.gz
- Upload date:
- Size: 11.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc4a0c89b375f12fdec858a9c71d86942dd9d4272e2a0028324c552404283ab0
|
|
| MD5 |
08e6988786e5d49ff946824f6ee75c00
|
|
| BLAKE2b-256 |
f823ea9979d371606d9fc88c4095512ef49c9328ab5c24c2c349b3b68e97587f
|
Provenance
The following attestation bundles were made for engunits-0.1.0.tar.gz:
Publisher:
release.yml on matuscvengros/engunits
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
engunits-0.1.0.tar.gz -
Subject digest:
cc4a0c89b375f12fdec858a9c71d86942dd9d4272e2a0028324c552404283ab0 - Sigstore transparency entry: 982431272
- Sigstore integration time:
-
Permalink:
matuscvengros/engunits@4e34e8d165692e83bb6067bfffe53d7f6432bff7 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/matuscvengros
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4e34e8d165692e83bb6067bfffe53d7f6432bff7 -
Trigger Event:
release
-
Statement type:
File details
Details for the file engunits-0.1.0-py3-none-any.whl.
File metadata
- Download URL: engunits-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ac64a88a76a1f74263842338de8ab9c83bd0718d7ec87bd47121ce422adb60e
|
|
| MD5 |
7c01e0bec124a13bafc6f45415ce7143
|
|
| BLAKE2b-256 |
8b15cb93b48870060000022244b0fe29960b2b9b68fa284529cc7de85447dcd7
|
Provenance
The following attestation bundles were made for engunits-0.1.0-py3-none-any.whl:
Publisher:
release.yml on matuscvengros/engunits
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
engunits-0.1.0-py3-none-any.whl -
Subject digest:
1ac64a88a76a1f74263842338de8ab9c83bd0718d7ec87bd47121ce422adb60e - Sigstore transparency entry: 982431331
- Sigstore integration time:
-
Permalink:
matuscvengros/engunits@4e34e8d165692e83bb6067bfffe53d7f6432bff7 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/matuscvengros
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4e34e8d165692e83bb6067bfffe53d7f6432bff7 -
Trigger Event:
release
-
Statement type: