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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: questionary-2.0.1.tar.gz
  • Upload date:
  • Size: 24.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.5 Linux/5.15.0-1041-azure

File hashes

Hashes for questionary-2.0.1.tar.gz
Algorithm Hash digest
SHA256 bcce898bf3dbb446ff62830c86c5c6fb9a22a54146f0f5597d3da43b10d8fc8b
MD5 2ca6f5b8299edbce76a72fb450c3f53e
BLAKE2b-256 84d0d73525aeba800df7030ac187d09c59dc40df1c878b4fab8669bdc805535d

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for questionary-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8ab9a01d0b91b68444dff7f6652c1e754105533f083cbe27597c8110ecc230a2
MD5 f2b7f9272fa1a54834418bfbd10ce475
BLAKE2b-256 0be72dd8f59d1d328773505f78b85405ddb1cfe74126425d076ce72e65540b8b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page