--- id: useful-types version: "0.2.1" license: unclear license_treatment: unclear maintenance: active --- # useful-types — A collection of useful types. License: unclear · Maintenance: active · Downloads: 306.7K/mo ## 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 above — 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 pip install useful-types uv add useful-types 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_current - Install friction: low - Maintenance: active - Downloads: 306.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags python type protocols, reusable type aliases, common type definitions, typing utilities, protocol library, type hints library, shared type stubs, type-hints, typing-utilities [View on SkillFed](https://skillfed.io/packages/useful-types) · [View on PyPI](https://pypi.org/project/useful-types/)