Skip to main content
Choice, a Python dialog library
================================

choice is a quick little library for getting user input in Python in a dialog-like fashion. Here's a little example:

~~~
import choice

# Get a yes or no response (default is no)
confirm = choice.Binary('Are you sure you want to delete?', False).ask()
if confirm:
deleteIt()

# Input an arbitrary value, check for correctness
howmany = choice.Input('How many pies?', int).ask()
print("You ordered {} pies".format(howmany))

# Choose from a set of options
entree = choice.Menu(['steak', 'potatoes', 'eggplant']).ask()
~~~

choice automatically displays the best UI available to the user: basic text console, curses, or GUI windows. (curses and GUI are in development!)

Requirements and Installation
=============================

For basic functionality, `choice` has no external dependencies, and requires only:

* Python 2.7 or 3

To install, just run:

~~~
pip install choice
~~~

Documentation
=============

API docs are coming soon. More in-depth documentation can be found on Github:

https://github.com/fyhuang/choice/wiki

Metadata

Release files for choice 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 choice 0.1
File Size Uploaded Provenance Actions
choice-0.1.tar.gz 3.6 kB Without provenance Details for choice-0.1.tar.gz

Release files / choice-0.1.tar.gz

Download URL choice-0.1.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
0d7dd85021e14626eef72f077b2c937e83d296adc0d7f2eede587e2cfaf71721
BLAKE2b-256 checksum
How to use checksums
f63eccd75fb3109b3c441c04fa07bbb4afc39d1ecc5c6e35760aa6dd70a38dd9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for choice 0.1

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.

Release history Release notifications | RSS feed

This release

0.1 This release

1 release file No provenance

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