Registry / serialization / typedunits

typedunits

JSON →
library0.0.2pypypi✓ verified 85d ago

TypedUnits is a fast units and dimensions library with support for static dimensionality checking and protobuffer serialization, written in Cython. Current version is 0.0.2, requires Python >=3.10. Release cadence is irregular.

pip install typedunits
INSTALL
IMPORT
SIG · TYPEDUNITS
T
typedunits
serializationpythonv0.0.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

A
✓ from tunits import A
✗ from typedunits import Unit
Acceleration
✓ from tunits import Acceleration
✗ from typedunits import Unit
Angle
✓ from tunits import Angle
✗ from typedunits import Unit

Create a simple unit value and print it.

from typedunits import Unit u = Unit('m', 3.0) # 3 meters print(u)
Debug
Known issues
gotchaStatic dimensionality checking may break code that relies on duck typing or dynamic unit conversion. Ensure unit types are consistent.
fix
Use explicit unit conversions via the library's conversion methods.
affects: >=0.0.1
breakingVersion 0.0.2 introduced tighter static typing checks, which may cause new type errors in existing code.
fix
Update type annotations to match stricter expectations.
affects: 0.0.2
Upgrade
Version history
0.0.2latest on PyPI · released Apr 13, 2026
Audit
Dependencies
numpyoptionalRequired for array operations
protobufoptionalRequired for protobuffer serialization
Agent activity
15 hits · last 30 days
node
12
OpenAI (training)
1
Resources
typedunits — pip install typedunits · libregistry