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 details)
Built Distribution
File details
Details for the file is_annotated-1.0.1.tar.gz
.
File metadata
- Download URL: is_annotated-1.0.1.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7103a36eb58de43854e8f8425b895051e55250beaa70f58a909a052efa6cd882 |
|
MD5 | f913ce04eca35fa3e0ebfe4d727ef9f8 |
|
BLAKE2b-256 | 184771e305ed9716826ad2104cc6354a1b00147910fb5c8252d2a2b7999fd5df |
File details
Details for the file is_annotated-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: is_annotated-1.0.1-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98426507e1d174cf61b32f5e5bdebab2d6f29885d2809df2383d0afdbef40a15 |
|
MD5 | 376e79f0ea3a7000042fe197852d1abe |
|
BLAKE2b-256 | 1a21c7144383ecc537029c70f0d10a6b2cadcb3737be0712635ff811c8fa18e2 |