Skip to main content

Input Parser

The input-parser module allows you to easily write scripts requiring user interaction.

The input function allows you to define the response it expects from the user so it can parse out any incorrect responses and request a new one. It automatically generates failure messages for the user.

Compatibility

input-parser is being developed with Python 3.8, but is likely to work on older versions (and will be tested when completed).

Installation

This package currently isn't on PyPi so cannot be installed. This will be available soon. In the meantime, simply copy the src/input-parser/parser.py file to your project.

Usage

The module contains only one function called parse_input(). This has two required arguments, the message and the type. The message will be shown to the user when requesting an input. The class represents the type of the input required. At the moment, you can only specify one type, but I plan to allow more to be set in a future update.

Bugs

If you find a bug in input-parser, probably just create a GitHub issue, bearing in mind that this is still a work in progress, so I've probably already spotted the bug but haven't got around to fixing it.

Release files for input-parser 0.1.0

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

Source distribution (sdist)

Source distribution for input-parser 0.1.0
File Size Uploaded
input-parser-0.1.0.tar.gz 4.1 kB Details

Release files / input-parser-0.1.0.tar.gz

Download URL input-parser-0.1.0.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
0912a5b6fe80e75e7fc1927075f341410c48d9bc721446db173a015e212bea31
BLAKE2b-256 checksum
How to use checksums
56b01470a86f453d1042b161e1639bf67a2b9e169cbb65a1f0ab817457f17d57
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.10

Release history Release notifications | RSS feed

This release

0.1.0 This release

1 release file

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