Skip to main content

Python library to build pretty command line user prompts ⭐️

Project description

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.

Project details


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.1.1.tar.gz (25.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-2.1.1-py3-none-any.whl (36.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: questionary-2.1.1.tar.gz
  • Upload date:
  • Size: 25.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.12.11 Linux/6.11.0-1018-azure

File hashes

Hashes for questionary-2.1.1.tar.gz
Algorithm Hash digest
SHA256 3d7e980292bb0107abaa79c68dd3eee3c561b83a0f89ae482860b181c8bd412d
MD5 0c7b9d9ba6c6b4ba94f5e705850cd0c3
BLAKE2b-256 f645eafb0bba0f9988f6a2520f9ca2df2c82ddfa8d67c95d6625452e97b204a5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: questionary-2.1.1-py3-none-any.whl
  • Upload date:
  • Size: 36.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.12.11 Linux/6.11.0-1018-azure

File hashes

Hashes for questionary-2.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a51af13f345f1cdea62347589fbb6df3b290306ab8930713bfae4d475a7d4a59
MD5 28bcba46e6d40fb3a1724e1f695480b8
BLAKE2b-256 3c261062c7ec1b053db9e499b4d2d5bc231743201b74051c973dadeac80a8f43

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