optype

Building Blocks for Precise & Flexible Type Hints

36 个版本 Python >=3.12
Joren Hammudoglu <Joren Hammudoglu <jhammudoglu@gmail.com>>
安装
pip install optype
poetry add optype
pipenv install optype
conda install optype
描述

optype

Building blocks for precise type hints

GitHub License PyPI Version Conda Version Python Versions PyPI Downloads

ruff basedpyright mypy pyrefly ruff ruff

GitHub · Installation · Getting Started · API Reference · Changelog

Stop fighting your type checker — work with it.
optype gives you single-method protocols for every dunder, exact types that reject sneaky subtypes, and typed operators that actually make sense — so you can express what your code really accepts.

Zero dependencies. Works with every modern type checker. Optional NumPy support included. Battle tested.

Visit the documentation at jorenham.github.io/optype.

版本列表
0.18.0 2026-06-07
0.17.1 2026-05-17
0.17.0 2026-03-08
0.16.0 2026-02-19
0.15.0 2025-12-08
0.14.0 2025-10-01
0.13.4 2025-08-19
0.13.3 2025-08-17
0.13.2 2025-08-15
0.13.1 2025-07-30
0.13.0 2025-07-30
0.12.2 2025-07-20
0.12.1 2025-07-20
0.12.0 2025-07-16
0.11.0 2025-07-09
0.10.0 2025-05-28
0.9.3 2025-03-31
0.9.2 2025-03-12
0.9.1 2025-02-05
0.9.0 2025-01-21
0.8.0 2024-12-28
0.7.3 2024-11-30
0.7.2 2024-11-24
0.7.1 2024-11-19
0.7.0 2024-11-19
0.6.1 2024-08-19
0.6.0 2024-08-17
0.5.0 2024-06-23
0.4.0 2024-04-15
0.3.1 2024-04-01
0.3.0 2024-03-21
0.2.2 2024-03-16
0.2.1 2024-03-14
0.2.0 2024-03-09
0.1.0 2024-02-25
0.0.0 2024-02-22