typish
Functionality for types
What it is and what it does
Typish extends Python's built-in type checking to work with generic types at runtime. It lets you check whether an object is an instance of a parameterized type like `List[int]` or `Callable[[str], int]`, which the standard `isinstance()` cannot do. It also provides utility functions to extract type information (origin, arguments, hints) from type annotations and supports structural typing through a `Something` interface that validates duck-typed objects.
The package includes decorators like `@hintable` to capture type hints from call sites, metaclasses like `SubscriptableType` to make custom types subscriptable, and helper classes like `ClsDict` and `ClsFunction` for type-based dispatch. It has no external dependencies and works as a pure Python module, but development stopped in August 2021 and the package is no longer maintained.
Use it for:
- Validate that a function argument is a list of integers or other parameterized generic type at runtime
- Extract type arguments from a generic type hint to implement type-aware logic in your code
- Implement structural typing by defining interfaces with Something and checking objects against them
- Dispatch function calls based on the runtime type of an argument using ClsDict or ClsFunction
- Introspect callable type hints to extract parameter and return types for reflection-based frameworks
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Typish provides runtime type checking and introspection functions for Python's typing system, including generic type instance checks, type origin/argument extraction, and duck-typing validation.
Yes, if you need runtime generic type checking and have no requirement for ongoing maintenance. The package is stable and has no known vulnerabilities, but its abandonment since 2021 means it will not receive updates for newer Python semantics or typing module changes. Consider it only for legacy codebases or projects where you can maintain a local fork if needed.
Install
typish on PyPI
pip
pip install typishuv
uv add typishpoetry
poetry add typishInstalling typish
Before you install
Package has no runtime dependencies and installs as a pure Python wheel with low friction. However, it has been abandoned since August 2021 with no commits or maintenance, so expect no bug fixes or compatibility updates.
License in practice
MIT license is permissive and poses no restrictions on use, modification, or distribution in commercial or private projects.
Quickstart
pip install typish
from typing import Iterable
from typish import instance_of
result = instance_of([1, 2, 3], Iterable[int])
print(result) # True
Verify before relying
- Whether the package remains compatible with Python versions released after 2021
- Whether generic type checking behavior aligns with modern typing module semantics
- Performance characteristics compared to alternatives for large-scale type validation
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | abandoned — 1,835 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,709,938/month — #3,627 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: typish-1.9.3-py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
typing-inspectProvides runtime inspection utilities for…
permissive · top 1,000 on PyPI
typing-utilsProvides utilities to inspect and validate…
permissive · top 5,000 on PyPI
aws-lambda-contextProvides the AWS Lambda Context class for type…
permissive · top 15,000 on PyPI
typing-validationRuntime validation of Python objects against…
copyleft · top 15,000 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
simplegenericProvides a lightweight decorator-based system…
unclear · top 15,000 on PyPI
typeapiProvides a unified API for reflecting and…
permissive · top 15,000 on PyPI
funcsigsProvides Python function signature…
permissive · top 5,000 on PyPI
flake8-annotationsA Flake8 plugin that enforces PEP 3107-style…
permissive · top 15,000 on PyPI
beartypeBeartype is a runtime type checker that…
permissive · top 1,000 on PyPI