skillfed

typish

Functionality for types

typish v1.9.3 1.7M downloads/30d#3,627 on PyPI25
Permissive license MIT Abandoned released

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 typish

uv

uv add typish

poetry

poetry add typish

Installing 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

Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

generic type checkingruntime type validationtyping introspectioninstance checking with genericsduck typing validationtype hints inspectioncallable type hints
type-checkingtyping-introspectionduck-typing

More Software Development packages