Metadata-Version: 2.4
Name: optype
Version: 0.17.1
Summary: Building Blocks for Precise & Flexible Type Hints
Keywords: annotations,basedpyright,checker,checking,hinting,hints,mypy,numpy,numpy-typing-compat,pyright,protocols,stubs,type,typechecking,typehinting,typehints,typing
Author: Joren Hammudoglu
Author-email: Joren Hammudoglu <jhammudoglu@gmail.com>
License-Expression: BSD-3-Clause
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Software Development
Classifier: Typing :: Typed
Requires-Dist: typing-extensions>=4.10 ; python_full_version < '3.13'
Requires-Dist: numpy>=1.26,<2.7 ; extra == 'numpy'
Requires-Dist: numpy-typing-compat>=20250818.1.25,<20251207 ; extra == 'numpy'
Requires-Python: >=3.11
Project-URL: Repository, https://github.com/jorenham/optype/
Project-URL: Documentation, https://jorenham.github.io/optype/
Project-URL: Issues, https://github.com/jorenham/optype/issues
Project-URL: Changelog, https://github.com/jorenham/optype/releases
Project-URL: Funding, https://github.com/sponsors/jorenham
Provides-Extra: numpy
Description-Content-Type: text/markdown

<h1 align="center">optype</h1>

<p align="center"><strong>Building blocks for precise type hints</strong></p>

<p align="center">
<a href="https://github.com/jorenham/optype"><img alt="GitHub License" src="https://img.shields.io/github/license/jorenham/optype?style=flat-square&color=121d2f&labelColor=3d444d"></a>
<a href="https://pypi.org/project/optype"><img alt="PyPI Version" src="https://img.shields.io/pypi/v/optype?style=flat-square&color=121d2f&labelColor=3d444d"></a>
<a href="https://anaconda.org/conda-forge/optype"><img alt="Conda Version" src="https://img.shields.io/conda/vn/conda-forge/optype?style=flat-square&color=121d2f&labelColor=3d444d"></a>
<a href="https://github.com/jorenham/optype"><img alt="Python Versions" src="https://img.shields.io/pypi/pyversions/optype?style=flat-square&color=121d2f&labelColor=3d444d"></a>
<a href="https://pypi.org/project/optype"><img alt="PyPI Downloads" src="https://img.shields.io/pypi/dm/optype?style=flat-square&color=121d2f&labelColor=3d444d&cacheSeconds=86400"></a>
</p>

<p align="center">
<a href="https://github.com/numpy/numpy"><img alt="ruff" src="https://img.shields.io/badge/numpy-262c36?style=flat-square&logo=numpy"></a>
<a href="https://detachhead.github.io/basedpyright"><img alt="basedpyright" src="https://img.shields.io/endpoint?url=https://docs.basedpyright.com/latest/badge.json&style=flat-square&color=262c36&labelColor=262c36"></a>
<a href="https://github.com/python/mypy"><img alt="mypy" src="https://img.shields.io/badge/mypy-262c36?style=flat-square&logo=python"></a>
<a href="https://github.com/facebook/pyrefly"><img alt="pyrefly" src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/facebook/pyrefly/refs/heads/main/website/static/badge.json&style=flat-square&color=262c36&labelColor=262c36"></a>
<a href="https://github.com/astral-sh/ty"><img alt="ruff" src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ty/main/assets/badge/v0.json&style=flat-square&color=262c36&labelColor=262c36"></a>
<a href="https://github.com/astral-sh/ruff"><img alt="ruff" src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json&style=flat-square&color=262c36&labelColor=262c36"></a>
</p>

<p align="center">
  <a href="https://github.com/jorenham/optype"><strong>GitHub</strong></a>
  &middot;
  <a href="https://jorenham.github.io/optype/installation/"><strong>Installation</strong></a>
  &middot;
  <a href="https://jorenham.github.io/optype/getting-started/"><strong>Getting Started</strong></a>
  &middot;
  <a href="https://jorenham.github.io/optype/reference/"><strong>API Reference</strong></a>
  &middot;
  <a href="https://github.com/jorenham/optype/releases"><strong>Changelog</strong></a>
</p>

<p align="center">
  Stop fighting your type checker &mdash; work <em>with</em> it.<br>
  <code>optype</code> gives you single-method protocols for every dunder,
  exact types that reject sneaky subtypes, and typed operators that actually
  make sense &mdash; so you can express what your code <em>really</em> accepts.<br>
</p>
<p align="center">
  Zero dependencies. Works with every modern type checker. Optional NumPy support included. Battle tested.
</p>

<p align="center">
  <em>
    Visit the documentation at
    <a href="https://jorenham.github.io/optype/">jorenham.github.io/optype</a>.
  </em>
</p>
