Introspect Python type annotation, with ease.
Modern Python libraries often use type annotations, this library is intended to help "de/serialize" Python type hints to something you can work with.
Sample Usage:
from typingref import TypeHinter
from typing import Union
class MyType:
...
def foo(p: Union[int, str, float]) -> MyType:
...
p_type = TypeHinter.from_annotation(foo.__annotations__['p'])
if p_type.is_union():
for t in p_type.of_type:
...
assert Union[int, str, float] == p_type.as_annotation()
Metadata
Release files for typingref 0.103.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 | Provenance | Actions |
|---|---|---|---|---|
| typingref-0.103.1.tar.gz | 4.8 kB | Without provenance | Details for typingref-0.103.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| typingref-0.103.1-py3-none-any.whl | Python 3 | none | any | Details for typingref-0.103.1-py3-none-any.whl |
Total release size: 8.9 kB
Release files / typingref-0.103.1.tar.gz
| Download URL | typingref-0.103.1.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1ae22efc6ce0b5331801b9fd89a3e2a0777c074bb497c55af6ee58d3cf291754
|
|
BLAKE2b-256 checksum How to use checksums |
486f7331e48f951e4e5c926965063534b0aa1c6290d4a8a68056c0841cd60256
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.12.0 Linux/6.2.0-1016-azure
|
Release files / typingref-0.103.1-py3-none-any.whl
| Download URL | typingref-0.103.1-py3-none-any.whl |
|---|---|
| Size | 4.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
59d2aa97a097dc3384bc575123682d9fc469e9b52c90baa3624bb4d3958ad9d9
|
|
BLAKE2b-256 checksum How to use checksums |
7f8e6c90808ddc5bb9185191bf5e4de7e3a825efea3069f157b81e31c2386a1d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.12.0 Linux/6.2.0-1016-azure
|
Security for typingref 0.103.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.