Skip to main content

Questionary

Version License Continuous Integration Coverage Supported Python Versions Documentation

✨ Questionary is a Python library for effortlessly building pretty command line interfaces ✨

Example

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.

Download files

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

Source Distribution

questionary-1.10.0.tar.gz (23.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

questionary-1.10.0-py3-none-any.whl (31.4 kB view details)

Uploaded Python 3

File details

Details for the file questionary-1.10.0.tar.gz.

File metadata

  • Download URL: questionary-1.10.0.tar.gz
  • Upload date:
  • Size: 23.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.7 CPython/3.7.11 Linux/5.8.0-1036-azure

File hashes

Hashes for questionary-1.10.0.tar.gz
Algorithm Hash digest
SHA256 600d3aefecce26d48d97eee936fdb66e4bc27f934c3ab6dd1e292c4f43946d90
MD5 0fc453e2b7f2516e76edf321b58c1332
BLAKE2b-256 04c6a8dbf1edcbc236d93348f6e7c437cf09c7356dd27119fcc3be9d70c93bb1

See more details on using hashes here.

File details

Details for the file questionary-1.10.0-py3-none-any.whl.

File metadata

  • Download URL: questionary-1.10.0-py3-none-any.whl
  • Upload date:
  • Size: 31.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.7 CPython/3.7.11 Linux/5.8.0-1036-azure

File hashes

Hashes for questionary-1.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fecfcc8cca110fda9d561cb83f1e97ecbb93c613ff857f655818839dac74ce90
MD5 afd50e638eacc4b4438deb5161320dcc
BLAKE2b-256 4900151ff8314078efa3087c23b4b7c473f08f601dff7c62bfb894dd462e0fc9

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