skillfed

measurement

Easily use and manipulate unit-aware measurements in Python.

measurement v3.2.2 1.1M downloads/30d#4,323 on PyPI116
Permissive license DORMANT released

What it is and what it does

Measurement provides unit-aware objects for common physical quantities—distance, weight, temperature, energy, speed, volume, time, and area—inspired by Django's Distance class. You create a measurement by specifying a value in any supported unit, then convert, compare, or combine measurements across different units. Internally, values are stored as floating-point numbers in a standard SI unit, which means conversions are fast but subject to the precision limits of floating-point arithmetic.

The package is useful when you need to work with physical quantities in code and want to avoid manual unit conversion or unit-mismatch bugs. It depends only on sympy and installs with low friction. The codebase is dormant (last release January 2023, last commit February 2024) but marked Production/Stable and supports Python 3.7+, making it suitable for applications that don't require active maintenance or new features.

Use it for:

  • Convert between units in scientific or engineering calculations without manual conversion factors.
  • Store and manipulate physical measurements in web applications or APIs that need to accept input in different units.
  • Perform arithmetic on measurements (adding weights, combining distances) while preserving unit awareness.
  • Build domain-specific tools for fields like GIS, chemistry, or physics that work with standardized unit objects.
  • Validate and normalize user input that specifies quantities in mixed or non-standard units.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides unit-aware measurement objects for Python that support conversion between different units and arithmetic operations across multiple measurement types including distance, weight, temperature, energy, speed, volume, time, and area.

Yes, if you need straightforward unit conversion and arithmetic for common physical quantities in a stable, low-dependency package. The MIT license and low install friction make it a safe choice. No, if you require active maintenance, high-precision floating-point calculations, or support for exotic measurement types—the dormant status and floating-point precision caveat suggest it is not evolving to meet new demands.

Install

measurement on PyPI

pip

pip install measurement

uv

uv add measurement

poetry

poetry add measurement

Installing measurement

Before you install

Low install friction with a single dependency on sympy. The package is dormant (last commit 2024-02-19, no release for 1312 days), but remains marked Production/Stable and supports current Python versions (3.7+). Suitable for stable, non-evolving use cases.

License in practice

MIT license (permissive) means you can use, modify, and distribute this package freely in both open-source and commercial projects with minimal restrictions.

Quickstart

pip install measurement

from measurement.measures import Weight
weight_1 = Weight(lb=125)
weight_2 = Weight(kg=40)
added = weight_1 + weight_2
print(added.kg)

Verify before relying

  • Whether floating-point precision limitations documented in the description materially affect typical use cases beyond the extraterrestrial navigation example.
  • Current test coverage and whether dormant status reflects stability or abandonment risk for edge cases.

Package facts

License not declared (permissive)
Python support supports the current Python release (>=3.7)
Install friction low — pure-Python wheel
Runtime dependencies 1 — sympy
Maintenance dormant — 1,312 days since the last release
Last repo commit
First released
Downloads 1,128,574/month — #4,323 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: measurement-3.2.2-py3-none-any.whl

Keywords: measurement

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: JavaScriptProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Scientific/EngineeringTopic :: Scientific/Engineering :: AstronomyTopic :: Scientific/Engineering :: Atmospheric ScienceTopic :: Scientific/Engineering :: ChemistryTopic :: Scientific/Engineering :: GISTopic :: Scientific/Engineering :: MathematicsTopic :: Scientific/Engineering :: PhysicsTopic :: Software DevelopmentTopic :: Software Development :: LocalizationTopic :: Utilities

Tags

unit conversion librarymeasurement objects pythondistance weight temperature conversionunit-aware calculationsscientific measurement unitsphysical quantity arithmeticSI unit conversion
unit-conversionscientific-computing

More Software Development packages