Skip to main content

PyPI Python Version License

Tests Codecov

pre-commit Black

Installation

You can install typestring-parser via pip from PyPI:

$ pip install typestring-parser

Usage

Use the parse function to convert type strings into typing instances:

>>> from typestring_parser import parse
>>>
>>> parse('int')
<class 'int'>
>>> parse('int or str')
typing.Union[int, str]
>>> parse('list of str or str')
typing.Union[typing.List[str], str]
>>> parse('list of (int, str)')
typing.List[typing.Tuple[int, str]]

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

typestring-parser-0.1.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

typestring_parser-0.1-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file typestring-parser-0.1.tar.gz.

File metadata

  • Download URL: typestring-parser-0.1.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.9 CPython/3.8.3 Linux/4.4.0-193-generic

File hashes

Hashes for typestring-parser-0.1.tar.gz
Algorithm Hash digest
SHA256 2d55c0a02c18e48286032039804503528bea75876fee027c64ed533059ccde69
MD5 1b26eb28d4dfdecaacecf77214dd3bb3
BLAKE2b-256 d6a06e2f9e7c3f3afac454cee86cfd982bff02f3f18f2ef2f603f1da5884c7fe

See more details on using hashes here.

File details

Details for the file typestring_parser-0.1-py3-none-any.whl.

File metadata

  • Download URL: typestring_parser-0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.9 CPython/3.8.3 Linux/4.4.0-193-generic

File hashes

Hashes for typestring_parser-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e3fa5a41b0503a19d4829e7930f2077fddf5447f5a4095cdca362738446fd3ea
MD5 20a378303ed672067cf11ce942aae3ba
BLAKE2b-256 0d0d488466822c77a9a7c6b8ea1009dc1365653f6614ca5cb456e576156c89e1

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1

Supported by

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