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
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)
| File | Size | Uploaded | |
|---|---|---|---|
| is_annotated-1.0.1.tar.gz | 8.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|