Skip to main content

is_annotated

Check if an object is an Annotated type.

This is a micro-package, containing the single function isannotated to check if a type hint is an Annotated type. Annotated objects can't be checked by normal isinstance checks.

Installation

PyPI platforms PyPI version

pip install is_annotated

Documentation

Actions Status

from typing import Annotated
from is_annotated import isannotated

print(isannotated(1))
# False

print(isannotated(int))
# False

print(isannotated(Annotated[int, "1"]))
# True

Metadata

Release files for is-annotated 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for is-annotated 1.0.1
File Size Uploaded
is_annotated-1.0.1.tar.gz 8.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for is-annotated 1.0.1
File Interpreter ABI Platform
is_annotated-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 12.9 kB

Release files / is_annotated-1.0.1.tar.gz

Download URL is_annotated-1.0.1.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
7103a36eb58de43854e8f8425b895051e55250beaa70f58a909a052efa6cd882
BLAKE2b-256 checksum
How to use checksums
184771e305ed9716826ad2104cc6354a1b00147910fb5c8252d2a2b7999fd5df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.5

Release files / is_annotated-1.0.1-py3-none-any.whl

Download URL is_annotated-1.0.1-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
98426507e1d174cf61b32f5e5bdebab2d6f29885d2809df2383d0afdbef40a15
BLAKE2b-256 checksum
How to use checksums
1a21c7144383ecc537029c70f0d10a6b2cadcb3737be0712635ff811c8fa18e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.5

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page