TypeForm helpers
Project description
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
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file typeformtools-0.1.14-py3-none-any.whl.
File metadata
- Download URL: typeformtools-0.1.14-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1afd4fedd54cad42b78ec955942eb2fa67461d3e9bd778bb6ac17589d0522890
|
|
| MD5 |
72e6551475b4e0e291c995e519774d1c
|
|
| BLAKE2b-256 |
dbdcc86f6a4fd901c67bae858cb7df643319fadd15bee57bd275a20307266e26
|