Python tools for typed input validation.
Project description
Rynput
Python tools for strongly typed input validation.
Description
Rynput is focused on validating strings and converting them to a specific type, if possible. It is particularily effective when configuring a large list of properties which may have very different requirements for their values.
Installation
Run pip install rynput.
Usage
It is recommended to use the following import statement:
from rynput import Property, PropertyGroup, validators
From there, create the list of properties to validate.
The constructor for Property takes a name (str), type (Validator), and
optionally a default value and description. Omitting a default value means
that the property is marked as "required," and thus cannot be omitted by
the input method.
properties = PropertyGroup([
Property("Option", validators.Option(["Foo", "Bar", "Baz"]), "Foo"), # Default value provided
Property("Integer", validators.Integer(4, 8)), # Required
...
])
The input strings may come from anywhere. However, typical examples may include a user configuration wizard
(see examples/input_example.py) or from a config file (examples/json_example.py).
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 Distribution
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 rynput-1.0.3.tar.gz.
File metadata
- Download URL: rynput-1.0.3.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00161e58821f34314a980e77b776c4f6e85bcde47877e1db7f95e40015c4e213
|
|
| MD5 |
451e539f10feeb062c22627ac051a493
|
|
| BLAKE2b-256 |
42cbf0693c36b317eea7ad66e55e830c53a02e755204e8fcb80461d3ecd56711
|
Provenance
The following attestation bundles were made for rynput-1.0.3.tar.gz:
Publisher:
python-publish.yml on jacob-thomas7/rynput
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rynput-1.0.3.tar.gz -
Subject digest:
00161e58821f34314a980e77b776c4f6e85bcde47877e1db7f95e40015c4e213 - Sigstore transparency entry: 707941863
- Sigstore integration time:
-
Permalink:
jacob-thomas7/rynput@798d787f55c940379d85bf0460924c1c2a127688 -
Branch / Tag:
refs/tags/release-1.0.3 - Owner: https://github.com/jacob-thomas7
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@798d787f55c940379d85bf0460924c1c2a127688 -
Trigger Event:
release
-
Statement type:
File details
Details for the file rynput-1.0.3-py3-none-any.whl.
File metadata
- Download URL: rynput-1.0.3-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b73854580c09260c7515334b2a1e76680f1679e915d1816c5f7c20911e6d8ca
|
|
| MD5 |
60b85b22463bcca4114371c9fef4d4b5
|
|
| BLAKE2b-256 |
e080a5315ffd038abdcc659ae17285fbc37657f4bfec471dc7f2185100bc0c7a
|
Provenance
The following attestation bundles were made for rynput-1.0.3-py3-none-any.whl:
Publisher:
python-publish.yml on jacob-thomas7/rynput
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rynput-1.0.3-py3-none-any.whl -
Subject digest:
0b73854580c09260c7515334b2a1e76680f1679e915d1816c5f7c20911e6d8ca - Sigstore transparency entry: 707941875
- Sigstore integration time:
-
Permalink:
jacob-thomas7/rynput@798d787f55c940379d85bf0460924c1c2a127688 -
Branch / Tag:
refs/tags/release-1.0.3 - Owner: https://github.com/jacob-thomas7
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@798d787f55c940379d85bf0460924c1c2a127688 -
Trigger Event:
release
-
Statement type: