</>PackageGraphPackageGraph

annotated-types

PyPIv0.8.0

Reusable constraint types to use with typing.Annotated

Not recommended for new projects

No — annotated-types should not be adopted for new projects. No license declared — you have no explicit right to use this code.

  • ?Adoption: grade ?, Not reported by this registry.

    No download data reported for this package yet.

  • AMaintenance: grade A, Excellent.

    Last published 48 days ago.

  • AWeight: grade A, Excellent.

    Zero runtime dependencies, about 13 KB installed.

  • BSupply chain: grade B, Good.

    This package lists no maintainer.

  • FLicense: grade F, Failing.

    No license declared — you have no explicit right to use this code.

Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.

Install cost

What you actually take on by adding annotated-types to a project.

0
Direct dependencies

Runtime packages this one declares itself.

0
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

13 KB
Install size

Unpacked size of this package plus its entire runtime tree.

Tree depth

Longest resolved dependency chain below this package.

Compatibility

Python
python >=3.10

Quick start

A usage example from the annotated-types README.

from typing import Annotated
from annotated_types import Gt, Len, Predicate

class MyClass:
    age: Annotated[int, Gt(18)]                         # Valid: 19, 20, ...
                                                        # Invalid: 17, 18, "19", 19.0, ...
    factors: list[Annotated[int, Predicate(is_prime)]]  # Valid: 2, 3, 5, 7, 11, ...
                                                        # Invalid: 4, 8, -2, 5.0, "prime", ...

    my_list: Annotated[list[int], Len(0, 10)]           # Valid: [], [10, 20, 30, 40, 50]
                                                        # Invalid: (1, 2), ["abc"], [0] * 20

Used by

Popular packages that depend on annotated-types.

Relationship graph

Dependencies (left) and dependents (right) of annotated-types.

pydanticannotated-types
annotated-types dependencies dependents

Frequently installed together

Release history

1 release in the last two years, typically about 128 days apart.

Recent versions of annotated-types
VersionPublishedSizeLicense
0.8.0latest1 month ago13 KB
0.7.02 years ago13 KB
0.6.02 years ago12 KB
0.5.03 years ago11 KB
0.4.03 years ago11 KB
0.3.14 years ago10 KB
0.3.04 years ago10 KB
0.2.04 years ago9.1 KB
0.1.04 years ago1.1 KB

Overview

annotated-types is an PyPI package that reusable constraint types to use with typing.Annotated. It has 1 known dependents in the graph. The latest version is 0.8.0.

Who should use it

Teams working in the PyPI ecosystem who need reusable constraint types to use with typing.Annotated and value a focused solution.

When not to use it

Consider an alternative if you need to or if a more actively-maintained option better fits your PyPI stack.

Pros

  • Zero runtime dependencies — minimal footprint.

Cons

  • No license detected — review usage terms before adopting.

Auto-generated from collected registry metadata. No external claims are inferred.

Frequently asked questions

Should I use annotated-types?

No — annotated-types should not be adopted for new projects. No license declared — you have no explicit right to use this code.

How do I install annotated-types?

Run `pip install annotated-types` to add annotated-types to your PyPI project.

What license is annotated-types released under?

No license was detected in annotated-types's metadata; review the repository before use.

How popular is annotated-types?

PyPI does not publish download counts. Within PackageGraph's crawl, 1 known packages depend on annotated-types.

Is annotated-types still maintained?

The most recent release of annotated-types (v0.8.0) was published 1 month ago.