Skip to main content

Useful command line input functions with error checking.

Project description

Clinput

Clinput is an importable python package that contains tools to create command line user inputs with data type conversion, syntax checking and customizable error messages. Syntactically, the functions in this package are similar to Python default input function, with a variety of optional arguments to provide customizable performance.

Contents

  1. Installation
  2. Usage
  3. Documentation
  4. Contributing
  5. Testing
  6. License

Installation

Install using pip:

pip install clinput

Usage

It is recommended to import each of single and multi separately (to avoid confusion) as follows:

import clinput.single as clis

# example use:
input_var = clis.positive("Enter a positive number: ")

or:

import clinput.single as clim

# example use:
input_vars = clim.positive("Enter a list of positive number inputs: ")

Documentation

Documentation can be found at Read the Docs.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

Testing

Tests are run using pytest.

License

MIT

Project details


Download files

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

Source Distribution

clinput-1.0.2.tar.gz (4.4 kB view details)

Uploaded Source

File details

Details for the file clinput-1.0.2.tar.gz.

File metadata

  • Download URL: clinput-1.0.2.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.6.8

File hashes

Hashes for clinput-1.0.2.tar.gz
Algorithm Hash digest
SHA256 981081123ad02fe53721aa4484bda626e01cb34f4959a23aefcd89431aa6433c
MD5 b5bea762bc67ec6556316ab442ca08b8
BLAKE2b-256 50d85825243f132d8a80bee9063ca22d87c6bdbb55a0c47f2b3518556339261c

See more details on using hashes here.

Supported by

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