Skip to main content

typestring parser

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]]

Metadata

Release files for typestring-parser 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for typestring-parser 0.1
File Size Uploaded
typestring-parser-0.1.tar.gz 4.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for typestring-parser 0.1
File Interpreter ABI Platform
typestring_parser-0.1-py3-none-any.whl Python 3 none any Details

Total release size: 8.4 kB

Release files / typestring-parser-0.1.tar.gz

Download URL typestring-parser-0.1.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
2d55c0a02c18e48286032039804503528bea75876fee027c64ed533059ccde69
BLAKE2b-256 checksum
How to use checksums
d6a06e2f9e7c3f3afac454cee86cfd982bff02f3f18f2ef2f603f1da5884c7fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.9 CPython/3.8.3 Linux/4.4.0-193-generic

Release files / typestring_parser-0.1-py3-none-any.whl

Download URL typestring_parser-0.1-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e3fa5a41b0503a19d4829e7930f2077fddf5447f5a4095cdca362738446fd3ea
BLAKE2b-256 checksum
How to use checksums
0d0d488466822c77a9a7c6b8ea1009dc1365653f6614ca5cb456e576156c89e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.9 CPython/3.8.3 Linux/4.4.0-193-generic

Release history Release notifications | RSS feed

This release

0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page