skillfed

useful-types

A collection of useful types.

useful-types v0.2.1 306.7K downloads/30d#7,784 on PyPI152
License unclear Active released

What it is and what it does

useful_types is a collection of reusable Python type protocols and type aliases designed to eliminate repetitive type definitions across projects. It provides common type patterns that developers find themselves writing repeatedly, packaged as a lightweight library with a single dependency on typing_extensions.

The package is explicitly designed to be optional—the description notes that types can be vendored directly into your project if you prefer to avoid the dependency. It requires Python 3.8 or higher and guarantees support on mypy 1.4 and pyright 1.1.314 or higher, though it may work with other recent type checkers. The package is actively maintained with no known security vulnerabilities.

Use it for:

  • Standardize protocol definitions across multiple projects in an organization.
  • Reduce boilerplate in library code by importing pre-defined type aliases.
  • Vendor types into a single project to avoid a runtime dependency while still benefiting from the curated type definitions.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides reusable type protocols and aliases for Python projects to avoid repetitive type definition across codebases.

Yes, if you maintain multiple Python projects and want to standardize type definitions across them. The low install friction, active maintenance, and explicit vendoring option make it a low-risk addition. If you only need types in a single project or prefer to avoid external dependencies, vendoring the types directly is a viable alternative the maintainers explicitly support.

Install

useful-types on PyPI

pip

pip install useful-types

uv

uv add useful-types

poetry

poetry add useful-types

Installing useful-types

Before you install

Low install friction with a single lightweight dependency on typing_extensions. The package is actively maintained with a recent commit history and no known vulnerabilities.

Quickstart

pip install useful-types

from useful_types import SomeProtocol  # import a protocol or type alias
# Use the imported type in your annotations

Requires Python 3.8 or higher; mypy 1.4 or pyright 1.1.314 or higher for full type-checker support of all types in the package.

Verify before relying

  • Whether the specific protocols and type aliases provided match your project's needs (the fact sheet does not enumerate them)
  • Performance impact of importing the package versus vendoring types directly, as the description suggests both approaches are viable

Package facts

License not declared (unclear)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies 1 — typing_extensions
Maintenance actively maintained — 846 days since the last release
Last repo commit
First released
Downloads 306,722/month — #7,784 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: useful_types-0.2.1-py3-none-any.whl

Tags

python type protocolsreusable type aliasescommon type definitionstyping utilitiesprotocol librarytype hints libraryshared type stubs
type-hintstyping-utilities

More Software Development packages