Skip to main content

Release

Test

koozie

koozie is a light-weight wrapper around pint for unit conversions. The intent is to provide much of the functionality without worrying about the setup. It uses quantities internally, but its functions only return floats. This approach reflects the opinion that all calculations should be performed in Standard base SI units, and any conversions can happen via pre- or post-processing for usability. This minimizes additional operations in performance critical code.

koozie also defines a few convenient aliases for different units. See the source code for details. A list of other available units is defined in pint's default units definition file.

There are four public functions in koozie:

  • fr_u(value, from_units): Convert a value (or an iterable container of values) from given units to base SI units
  • to_u(value, to_units): Convert a value (or an iterable container of values) from base SI units to given units
  • convert(value, from_units, to_units): Convert a value (or an iterable container of values) from any units to another units of the same dimensionality
  • get_dimensionality(units): Get a dictionary-like representation of the dimensionality of units. This is useful for checking if two quantities can be converted to common units.

Example usage can be found in the test file.

koozie also provides a command line utility for unit conversions:

Usage: koozie [OPTIONS] VALUE FROM_UNITS [TO_UNITS]

  koozie: Convert VALUE from FROM_UNITS to TO_UNITS.

  If TO_UNITS is not specified, VALUE will be converted from FROM_UNITS into
  base SI units.

Options:
  -v, --version    Show the version and exit.
  -l, --list TEXT  Print a list of available units by dimension (e.g.,
                   "power"). Default: list all units.
  -h, --help       Show this message and exit.

Example usage:

$ koozie 1 inch meter
> 0.0254 m

$ koozie 0 degC degF
> 31.999999999999936 °F

$ koozie 0 degC
> 273.15 K

$ koozie -l flow
> [length] ** 3 / [time] ([volumetric_flow_rate])
  -----------------------------------------------
    - cubic_feet_per_minute (cfm)
    - gallons_per_minute (gpm)

Metadata

Release files for koozie 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for koozie 1.3.0
File Size Uploaded Provenance Actions
koozie-1.3.0.tar.gz 5.1 kB Without provenance Details for koozie-1.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for koozie 1.3.0
File Interpreter ABI Platform Actions
koozie-1.3.0-py3-none-any.whl Python 3 none any Details for koozie-1.3.0-py3-none-any.whl

Total release size: 11.5 kB

Release files / koozie-1.3.0.tar.gz

Download URL koozie-1.3.0.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
cd9b749482b7769a7b9c2c4965a48f4c1d23d8b9ecd8ae5b18f708f9822b7e92
BLAKE2b-256 checksum
How to use checksums
1dfa5b3f2561010396db239237c26ce48dfe07513dd60a7d80dcc9ce43e056c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.10.12 Linux/6.5.0-1025-azure

Release files / koozie-1.3.0-py3-none-any.whl

Download URL koozie-1.3.0-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2e0217f5a12a33a51ec755f21461f3926430f5b2426e53d38fc679554806dded
BLAKE2b-256 checksum
How to use checksums
861ef30954b7cb2dfa14d4e343ae95b5bc786a43042efb547af06c19f0a47789
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.10.12 Linux/6.5.0-1025-azure

Security for koozie 1.3.0

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page