Skip to main content

Efficiently get the index-0 element of an iterable.

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

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

Project details


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.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

is_annotated-1.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file is_annotated-1.0.tar.gz.

File metadata

  • Download URL: is_annotated-1.0.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

Hashes for is_annotated-1.0.tar.gz
Algorithm Hash digest
SHA256 cf1db09c0d73197c33f22a6f66897768ed44b94d0617cb390a9ab01a0d9dc069
MD5 e9a86dc222da92818195915b4633223a
BLAKE2b-256 d659e017ca941ea8a580afd9df937ec68b1dc30e69805dadf8c0165514d44ee4

See more details on using hashes here.

File details

Details for the file is_annotated-1.0-py3-none-any.whl.

File metadata

  • Download URL: is_annotated-1.0-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

Hashes for is_annotated-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6d8eed6ac314e9ca555f15458a09ac43db30acfe30f382c4e9a4dec458f5561b
MD5 461e86f26a35aeaadf15ffeab36ddc28
BLAKE2b-256 f15d8fc9651729e454fbce3526664a01f013d60beff93ce113bacbb7b814b158

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page