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-2.0.0.tar.gz (24.7 kB view details)

Uploaded Source

Built Distribution

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

questionary-2.0.0-py3-none-any.whl (34.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: questionary-2.0.0.tar.gz
  • Upload date:
  • Size: 24.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.4 Linux/5.15.0-1042-azure

File hashes

Hashes for questionary-2.0.0.tar.gz
Algorithm Hash digest
SHA256 8681b9d9ec751347ab11af2204d063b856d06845b07b442951e081780e8cb8a6
MD5 1e8943ef47bb23258bf3d2da97eb7955
BLAKE2b-256 0f30b639fff1bb7009ba786c0cbf40f39eba88d06957d3f569240da5672502f9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: questionary-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 34.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.4 Linux/5.15.0-1042-azure

File hashes

Hashes for questionary-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 564ae8917f141c9ef0ed131bb2671397fcaba7a901988b39cdbb569b8f29ce94
MD5 4e616d175768b0d4d13416f7e8dad803
BLAKE2b-256 ec16d640510d6485660ef6c775a8ab92e4fdec4eb700d8a3749b729797a07c42

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