Questionary
✨ Questionary is a Python library for effortlessly building pretty command line interfaces ✨
import questionary
questionary.text("What's your first name").ask()
questionary.password("What's your secret?").ask()
questionary.confirm("Are you amazed?").ask()
questionary.select(
"What do you want to do?",
choices=["Order a pizza", "Make a reservation", "Ask for opening hours"],
).ask()
questionary.rawselect(
"What do you want to do?",
choices=["Order a pizza", "Make a reservation", "Ask for opening hours"],
).ask()
questionary.checkbox(
"Select toppings", choices=["foo", "bar", "bazz"]
).ask()
questionary.path("Path to the projects version file").ask()
Used and supported by
Features
Questionary supports the following input prompts:
There is also a helper to print formatted text for when you want to spice up your printed messages a bit.
Installation
Use the package manager pip to install Questionary:
pip install questionary
✨🎂✨
Usage
import questionary
questionary.select(
"What do you want to do?",
choices=[
'Order a pizza',
'Make a reservation',
'Ask for opening hours'
]).ask() # returns value of selection
That's all it takes to create a prompt! Have a look at the documentation for some more examples.
Documentation
Documentation for Questionary is available here.
Support
Please open an issue with enough information for us to reproduce your problem. A minimal, reproducible example would be very helpful.
Contributing
Contributions are very much welcomed and appreciated. Head over to the documentation on how to contribute.
Authors and Acknowledgment
Questionary is written and maintained by Tom Bocklisch and Kian Cross.
It is based on the great work by Oyetoke Toby and Mark Fink.
License
Licensed under the MIT License. Copyright 2021 Tom Bocklisch.
Metadata
Release files for questionary 2.1.1
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 |
|---|---|---|---|---|
| questionary-2.1.1.tar.gz | 25.8 kB | Without provenance | Details for questionary-2.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| questionary-2.1.1-py3-none-any.whl | Python 3 | none | any | Details for questionary-2.1.1-py3-none-any.whl |
Total release size: 62.6 kB
Release files / questionary-2.1.1.tar.gz
| Download URL | questionary-2.1.1.tar.gz |
|---|---|
| Size | 25.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3d7e980292bb0107abaa79c68dd3eee3c561b83a0f89ae482860b181c8bd412d
|
|
BLAKE2b-256 checksum How to use checksums |
f645eafb0bba0f9988f6a2520f9ca2df2c82ddfa8d67c95d6625452e97b204a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.4 CPython/3.12.11 Linux/6.11.0-1018-azure
|
Release files / questionary-2.1.1-py3-none-any.whl
| Download URL | questionary-2.1.1-py3-none-any.whl |
|---|---|
| Size | 36.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a51af13f345f1cdea62347589fbb6df3b290306ab8930713bfae4d475a7d4a59
|
|
BLAKE2b-256 checksum How to use checksums |
3c261062c7ec1b053db9e499b4d2d5bc231743201b74051c973dadeac80a8f43
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.4 CPython/3.12.11 Linux/6.11.0-1018-azure
|
Security for questionary 2.1.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.