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 2020 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.9.0.tar.gz (22.8 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.9.0-py3-none-any.whl (32.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: questionary-1.9.0.tar.gz
  • Upload date:
  • Size: 22.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.7.9 Linux/5.4.0-1032-azure

File hashes

Hashes for questionary-1.9.0.tar.gz
Algorithm Hash digest
SHA256 a050fdbb81406cddca679a6f492c6272da90cb09988963817828f697cf091c55
MD5 3f8ca439f1f100cac790b56ebfabcc8c
BLAKE2b-256 b5a520e0d643ce997cd5d87b3100373e24eb2c6aa874f713b08552a01639145e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: questionary-1.9.0-py3-none-any.whl
  • Upload date:
  • Size: 32.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.7.9 Linux/5.4.0-1032-azure

File hashes

Hashes for questionary-1.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fa50c06af4e3826d986efbc90be16e42ff367a634e6a169e42a3f9fccd90648b
MD5 f664d631f9d6b7e4d45d142326dce99c
BLAKE2b-256 0d44972fd92022c4dbc28fa4cbb2e161e60e2f116eb8c64b58c2c90a4b57c4c9

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 Sentry Error logging StatusPage Status page