Skip to main content

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


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

If you're not sure about the file name format, learn more about wheel file names.

typeformtools-0.1.14-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file typeformtools-0.1.14-py3-none-any.whl.

File metadata

File hashes

Hashes for typeformtools-0.1.14-py3-none-any.whl
Algorithm Hash digest
SHA256 1afd4fedd54cad42b78ec955942eb2fa67461d3e9bd778bb6ac17589d0522890
MD5 72e6551475b4e0e291c995e519774d1c
BLAKE2b-256 dbdcc86f6a4fd901c67bae858cb7df643319fadd15bee57bd275a20307266e26

See more details on using hashes here.

Supported by

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