readstr
Provides readstr, a function that can read a lot of different types from strings:
from readstr import readstr
import typing
import uuid
readstr('1,2,3', typing.Set[int])
readstr('foo=3,bar=10', typing.Dict[str, int])
readstr('vUfDOuQwRVavn3_QjMxp7Q', uuid.UUID)
Useful for reading arguments from command line arg, from environment variables, etc.
Extensible
from dataclasses import dataclass
from typing import List
from readstr import readstr, reads
@dataclass
class Path:
path: str
@reads
def read_path(str_value: str) -> Path:
return Path(str_value)
readstr('file://a,file://b', List[Path])
Metadata
Release files for readstr 0.8.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| readstr-0.8.0.tar.gz | 8.2 kB | Without provenance | Details for readstr-0.8.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| readstr-0.8.0-py3-none-any.whl | Python 3 | none | any | Details for readstr-0.8.0-py3-none-any.whl |
Total release size: 17.4 kB
Release files / readstr-0.8.0.tar.gz
| Download URL | readstr-0.8.0.tar.gz |
|---|---|
| Size | 8.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7bb09fd8adcd6cce4226e7eb6a5dbe9f67d090f50ede642a7cb2011489cef6a5
|
|
BLAKE2b-256 checksum How to use checksums |
f8f8cfebc4f73b8b61933b83a36491e30c23c0c86dbe411fa5924f1f5ed55f69
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.5
|
Release files / readstr-0.8.0-py3-none-any.whl
| Download URL | readstr-0.8.0-py3-none-any.whl |
|---|---|
| Size | 9.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
23fe529699ccbb58378094ee6e0906701ecfe6e8d5f25b2b8ecea6b9f04e9379
|
|
BLAKE2b-256 checksum How to use checksums |
f4ac3ae22be0af7f1cf1d8c0c88a8cb5908a3f85ff83e396a6f1cd5ff4d7f321
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.5
|
Security for readstr 0.8.0
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.