Check if an object is an `Annotated` type.
Project description
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
pip install is_annotated
Documentation
from typing import Annotated
from is_annotated import isannotated
print(isannotated(1))
# False
print(isannotated(int))
# False
print(isannotated(Annotated[int, "1"]))
# True
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
is_annotated-1.0.1.tar.gz
(8.9 kB
view hashes)
Built Distribution
Close
Hashes for is_annotated-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98426507e1d174cf61b32f5e5bdebab2d6f29885d2809df2383d0afdbef40a15 |
|
MD5 | 376e79f0ea3a7000042fe197852d1abe |
|
BLAKE2b-256 | 1a21c7144383ecc537029c70f0d10a6b2cadcb3737be0712635ff811c8fa18e2 |