{"id":27486,"library":"typedunits","title":"TypedUnits","description":"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.","status":"active","version":"0.0.2","language":"python","source_language":"en","source_url":"https://github.com/quantumlib/TypedUnits","tags":["units","dimensions","type-checking","protobuf","cython"],"install":[{"cmd":"pip install typedunits","lang":"bash","label":"PyPI"}],"dependencies":[{"reason":"Required for array operations","package":"numpy","optional":true},{"reason":"Required for protobuffer serialization","package":"protobuf","optional":true}],"imports":[{"note":"Main unit class","symbol":"Unit","correct":"from typedunits import Unit"}],"quickstart":{"code":"from typedunits import Unit\n\nu = Unit('m', 3.0)  # 3 meters\nprint(u)","lang":"python","description":"Create a simple unit value and print it."},"warnings":[{"fix":"Use explicit unit conversions via the library's conversion methods.","message":"Static dimensionality checking may break code that relies on duck typing or dynamic unit conversion. Ensure unit types are consistent.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Update type annotations to match stricter expectations.","message":"Version 0.0.2 introduced tighter static typing checks, which may cause new type errors in existing code.","severity":"breaking","affected_versions":"0.0.2"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'pip install typedunits' and ensure Python >=3.10.","cause":"Library not installed or Python environment mismatch.","error":"ModuleNotFoundError: No module named 'typedunits'"},{"fix":"Use 'from typedunits import Unit'. Upgrade to >=0.0.2.","cause":"Incorrect import path or library version too old.","error":"AttributeError: module 'typedunits' has no attribute 'Unit'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}