$npx skillfedfor your agent

typedunits

A fast units and dimensions library with support for static dimensionality checking and protobuffer serialization.

With conditionsPyPI MathematicsReleased Apr 202693.0K downloads / moApache 2Platform wheel

Decision gist · record as of 2026-08-14

platform wheels — typedunits-0.0.2-cp310-cp310-macosx_11_0_arm64.whl · typedunits-0.0.2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl · typedunits-0.0.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
v0.0.2 · released 2026-04-13 · Python >=3.10.0 · 5 runtime deps: attrs, cython, numpy, protobuf, pyparsing

Yes, if you work with physical quantities and want compile-time dimensional safety. The active maintenance, permissive license, and precompiled wheels make it low-friction to adopt. No known vulnerabilities. Start with the caveat that protobuffer support is limited to selected units—verify your units are covered before relying on serialization.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.10 or later; precompiled wheels available for common platforms, but building from source requires Cython.
  • Medium install friction due to compiled Cython wheels; precompiled binaries available for Python 3.10–3.13 on macOS, Linux, and Windows.
  • Active maintenance with recent commits and a permissive Apache 2 license.

License · maintenance · safety

Apache 2 (permissive) — Apache 2 is permissive; you can use, modify, and distribute typedunits freely in commercial and private projects, provided you include the license notice.

last release 2026-04-13 (123 days) · last repo commit 2026-08-07 · 10 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 93,034 downloads/mo, #13,406 on PyPI

Verify before relying

pip install typedunits

from typedunits.units import meter, km, MHz

print(5 * meter + km)
print(3 * MHz)
  • Whether protobuffer serialization covers the units you need (documentation notes only selected units are supported).
  • Performance characteristics compared to other units libraries in your use case.
  • Whether mypy integration works reliably with your type checker configuration.
Same gist for agents: .md · .json

What it is and what it does

TypedUnits is a Cython-based library that adds dimensional analysis to Python arithmetic. It lets you attach units to numbers and enforces that only compatible units can be combined—adding meters to kilometers works, but adding meters to seconds fails at runtime or, with static type hints, at type-check time. The library ships precompiled wheels for modern Python versions and supports protobuffer serialization for a selected set of units.

The core use case is scientific and engineering code where dimensional consistency matters: you can write functions that accept only specific unit types, and mypy will catch type mismatches. It also provides array support via numpy integration and can convert values to base SI units for inspection or comparison.

Use it for

  • Physics simulations where dimensional consistency prevents unit-conversion bugs.
  • Type-safe function signatures that reject incompatible unit types at type-check time.
  • Serializing and deserializing physical quantities via protobuffer for inter-process communication.
  • Scientific data pipelines where unit tracking and validation reduce calculation errors.
  • Array-based computations on quantities with consistent dimensionality.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you work with physical quantities and want compile-time dimensional safety.

The active maintenance, permissive license, and precompiled wheels make it low-friction to adopt. No known vulnerabilities. Start with the caveat that protobuffer support is limited to selected units—verify your units are covered before relying on serialization.

Install

typedunits on PyPI

Before you install

Medium install friction due to compiled Cython wheels; precompiled binaries available for Python 3.10–3.13 on macOS, Linux, and Windows. Active maintenance with recent commits and a permissive Apache 2 license.

Requires Python 3.10 or later; precompiled wheels available for common platforms, but building from source requires Cython.

License in practice

Apache 2 is permissive; you can use, modify, and distribute typedunits freely in commercial and private projects, provided you include the license notice.

Quickstart

pip install typedunits

from typedunits.units import meter, km, MHz

print(5 * meter + km)
print(3 * MHz)

Verify before relying

  • Whether protobuffer serialization covers the units you need (documentation notes only selected units are supported).
  • Performance characteristics compared to other units libraries in your use case.
  • Whether mypy integration works reliably with your type checker configuration.

Package facts

LicenseApache 2 permissive
Python supportSupports the current Python release >=3.10.0
Install frictionMedium. Platform-specific wheel
Runtime dependencies
5 packages
attrscythonnumpyprotobufpyparsing
MaintenanceActively maintained 123 days since the last release
Last repo commit
First released
Downloads93,034 / month, #13,406 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14

Evidence: typedunits-0.0.2-cp310-cp310-macosx_11_0_arm64.whl; typedunits-0.0.2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; typedunits-0.0.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; typedunits-0.0.2-cp310-cp310-win32.whl; typedunits-0.0.2-cp310-cp310-win_amd64.whl; typedunits-0.0.2-cp311-cp311-macosx_11_0_arm64.whl; typedunits-0.0.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; typedunits-0.0.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; typedunits-0.0.2-cp311-cp311-win32.whl; typedunits-0.0.2-cp311-cp311-win_amd64.whl; typedunits-0.0.2-cp312-cp312-macosx_11_0_arm64.whl; typedunits-0.0.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; typedunits-0.0.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; typedunits-0.0.2-cp312-cp312-win32.whl; typedunits-0.0.2-cp312-cp312-win_amd64.whl; typedunits-0.0.2-cp313-cp313-macosx_11_0_arm64.whl; typedunits-0.0.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; typedunits-0.0.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; typedunits-0.0.2-cp313-cp313-win32.whl; typedunits-0.0.2-cp313-cp313-win_amd64.whl

Tags

Capabilities
unit of measurement arithmeticdimensional analysis pythonstatic type checking unitsphysical quantities libraryunit conversion and arithmeticprotobuffer serialization unitsdimensionality checking
Topics
dimensional-analysistype-safe-unitsscientific-computing

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 › “static type checking units”

  • typedunitsImplements unit of measurement arithmetic with static type checking…
  • isqxisqx provides type-annotation-friendly metadata objects for physical…
  • basedpyrightBasedpyright is a static type checker for Python that forks and…

Give your agent the search over MCP, or paste the wish link into any chat.

More Mathematics packages

networkx Worth it
PyPI · Python Modules · released Dec 2025

NetworkX provides data structures and algorithms for creating, analyzing, and manipulating graphs and networks, supporting everything from simple undirected graphs to complex directed and weighted networks.

BSD-3-Clausepure Python
290.9Mdownloads / mo
kiwisolver Worth it
PyPI · Mathematics · released Mar 2026

kiwisolver is a Python binding to a fast C++ implementation of the Cassowary constraint solver, enabling you to solve systems of linear constraints and inequalities.

Install it if you need to solve constraint systems; skip it if you only need simple linear algebra.

BSD-3-Clausecompiled wheel · 3.10+
205.5Mdownloads / mo
sympy Worth it
PyPI · Scientific/Engineering · released Apr 2025

SymPy is a Python library for symbolic mathematics, performing algebraic manipulation, calculus, equation solving, and mathematical expression simplification without numerical approximation.

BSD-3-Clausepure Python · 3.9+
196.4Mdownloads / mo
contourpy Worth it
PyPI · Information Analysis · released Jul 2025

ContourPy calculates contours of 2D quadrilateral grids using C++11 algorithms wrapped in Python, offering serial and multithreaded implementations without requiring Matplotlib as a dependency.

BSD-3-Clausecompiled wheel · 3.11+
191.2Mdownloads / mo
torch With conditions
PyPI · Software Development · released Jul 2026

PyTorch provides GPU-accelerated tensor computation and automatic differentiation for building and training deep neural networks in Python.

Apache-2.0 AND Apache-2.0 WITH LLVM-exception AND BSD-2-Clause AND BSD-3-Clause AND BSL-1.0 AND MITcompiled wheel · 3.10+
102.5Mdownloads / mo
onnxruntime Worth it
PyPI · Software Development · released Jul 2026

onnxruntime loads and executes Open Neural Network Exchange (ONNX) models with a focus on inference performance across CPUs and accelerators.

Install it if you have ONNX models to run in production or development.

MITcompiled wheel · 3.11+
89.3Mdownloads / mo

See also Pint · quantities · measurement · unyt · isqx · pint-xarray · Pint-Pandas · ansys-units · hepunits · python-flint