Pint
Physical quantities module
Decision gist · record as of 2026-08-14
Yes. Pint is a mature, actively maintained library with no known vulnerabilities, low install friction, and permissive licensing. It solves a real problem—tracking and converting units in calculations—cleanly and without forcing heavy dependencies. Install it if you work with physical quantities, scientific data, or any calculation where mixing units is a concern.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.11 or later.
- Low friction: pure Python wheel with only four lightweight runtime dependencies (flexcache, flexparser, platformdirs, typing-extensions).
- Active maintenance with a recent release 148 days ago and ongoing commits; well-established project since 2012 with 2769 repository stars.
License · maintenance · safety
BSD (permissive) — BSD permissive license allows free use, modification, and distribution in both open-source and proprietary projects with minimal restrictions.
last release 2026-03-19 (148 days) · last repo commit 2026-08-05 · 2,769 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 6,136,479 downloads/mo, #1,965 on PyPI
Alternatives
Verify before relying
pip install pint
import pint
ureg = pint.UnitRegistry()
result = 3 * ureg.meter + 4 * ureg.cm
print(result) # <Quantity(3.04, 'meter')>- Performance characteristics when handling very large arrays or complex unit hierarchies.
- Completeness and accuracy of the default unit definitions relative to domain-specific standards.
What it is and what it does
Pint is a Python library for working with physical quantities—numbers paired with units of measurement. It lets you perform arithmetic on quantities (adding meters to centimeters, for example), convert between units, and work with a built-in library of physical units, prefixes, and constants. The library is designed to be modular, so you can extend or replace the unit definitions without touching the source code.
The package integrates cleanly with NumPy arrays and supports NumPy mathematical operations without monkey-patching, meaning you can work with arrays of quantities directly. It also integrates with Pandas DataFrames and the uncertainties package when installed. Pint is dependency-free at its core—it runs on Python 3.11+ with only the standard library—making it lightweight and easy to add to any project.
Use it for
- Scientific calculations where you need to track units automatically and catch dimensional mismatches (e.g., physics simulations, engineering computations).
- Data analysis pipelines that mix different measurement units and need automatic conversion and validation.
- Building command-line tools or applications that accept user input in various units and normalize them internally.
- NumPy-based numerical work where array operations must preserve and transform units correctly.
- Pandas workflows where columns represent measured quantities with different units that need unit-aware operations.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Pint is a mature, actively maintained library with no known vulnerabilities, low install friction, and permissive licensing. It solves a real problem—tracking and converting units in calculations—cleanly and without forcing heavy dependencies. Install it if you work with physical quantities, scientific data, or any calculation where mixing units is a concern.
Install
pint on PyPI
Before you install
Low friction: pure Python wheel with only four lightweight runtime dependencies (flexcache, flexparser, platformdirs, typing-extensions). Active maintenance with a recent release 148 days ago and ongoing commits; well-established project since 2012 with 2769 repository stars.
Requires Python 3.11 or later.
License in practice
BSD permissive license allows free use, modification, and distribution in both open-source and proprietary projects with minimal restrictions.
Quickstart
pip install pint
import pint
ureg = pint.UnitRegistry()
result = 3 * ureg.meter + 4 * ureg.cm
print(result) # <Quantity(3.04, 'meter')>
Verify before relying
- Performance characteristics when handling very large arrays or complex unit hierarchies.
- Completeness and accuracy of the default unit definitions relative to domain-specific standards.
Package facts
| License | BSD permissive |
| Python support | Supports the current Python release >=3.11 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 4 packagesflexcacheflexparserplatformdirstyping-extensions |
| Maintenance | Actively maintained 148 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 6,136,479 / month, #1,965 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: BSD LicenseOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIXProgramming Language :: PythonProgramming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Topic :: Scientific/EngineeringTopic :: Software Development :: Libraries |
Evidence: pint-0.25.3-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “measurement unit system”
- PintPint defines, operates on, and converts between physical…
- measurementProvides unit-aware measurement objects for Python that support…
- pint-xarrayAdds physical units support to xarray datasets and data variables…
Give your agent the search over MCP, or paste the wish link into any chat.
More Libraries packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Provides parsing, arithmetic, and recurrence rule computation for dates and times, with timezone support and iCalendar RFC compliance.
Install it if you need to parse flexible date strings, compute relative dates, handle timezones, or work with recurrence rules—it's the de facto choice for these tasks.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
See also ansys-units · hepunits · Pint-Pandas · pint-xarray · quantities · typedunits · ucumvert · measurement · isqx · unyt