--- id: measurement version: "3.2.2" license: unclear license_treatment: permissive maintenance: dormant --- # measurement — Easily use and manipulate unit-aware measurements in Python. License: permissive · Maintenance: dormant · Downloads: 1.1M/mo ## 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 above — 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 pip install measurement uv add measurement 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_current - Install friction: low - Maintenance: dormant - Downloads: 1.1M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags unit conversion library, measurement objects python, distance weight temperature conversion, unit-aware calculations, scientific measurement units, physical quantity arithmetic, SI unit conversion, unit-conversion, scientific-computing [View on SkillFed](https://skillfed.io/packages/measurement) · [View on PyPI](https://pypi.org/project/measurement/)