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
- Host: GitHub
- URL: https://github.com/jorenham/optype
- Owner: jorenham
- License: bsd-3-clause
- Created: 2024-02-22T03:07:03.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2026-03-03T23:07:52.000Z (13 days ago)
- Last Synced: 2026-03-04T03:25:40.530Z (13 days ago)
- Topics: numpy, pep484, python, python-types, python-typing
- Language: Python
- Homepage: https://jorenham.github.io/optype/
- Size: 3.08 MB
- Stars: 77
- Watchers: 1
- Forks: 6
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
- awesome-python-typing - optype - Opinionated `collections.abc` and `operators` alternative: Flexible single-method protocols and typed operators with predictable names. (Additional types)
README
optype
Building blocks for precise type hints
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.