typeformtools - Helpers for PEP 747 TypeForms
Usage
Installation
> pip install typeformtools
Interactive usage
> python
>>> import typeformtools
>>> typeformtools.non_optional(int | None)
# <class 'int'>
Contents
Functions to reduce to more basic TypeForms
| function | effect if argument is intended TypeForm |
otherwise |
|---|---|---|
unaliased() |
type A = T → T | original |
unannotated() |
Annotated[T, ...] → T | original |
undisguised() |
type A = Annotated[T, ...] → T | original |
non_optional() |
T | None → T | Never | original |
Other functions
| function | effect if argument is intended TypeForm |
otherwise |
|---|---|---|
literal_values() |
Literal[value, value, ...] → (value, value, ...) | fail |
Status
This package is very much a work in progress:
- it may fail, even for its limited supported scope
- the scope of provided functions needs to be extended
- more functions need to be provided
- more documentation is required
- there are still many
#TODOs
Metadata
Release files for typeformtools 0.1.14
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| typeformtools-0.1.14-py3-none-any.whl | Python 3 | none | any | Details for typeformtools-0.1.14-py3-none-any.whl |
Release files / typeformtools-0.1.14-py3-none-any.whl
| Download URL | typeformtools-0.1.14-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1afd4fedd54cad42b78ec955942eb2fa67461d3e9bd778bb6ac17589d0522890
|
|
BLAKE2b-256 checksum How to use checksums |
dbdcc86f6a4fd901c67bae858cb7df643319fadd15bee57bd275a20307266e26
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.14
|
Security for typeformtools 0.1.14
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.