An open API service indexing awesome lists of open source software.

https://github.com/jorenham/optype

Opinionated typing package for precise type hints in Python
https://github.com/jorenham/optype

numpy pep484 python python-types python-typing

Last synced: 8 days ago
JSON representation

Opinionated typing package for precise type hints in Python

Awesome Lists containing this project

README

          

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.