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.

Release files for questionary 2.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for questionary 2.1.1
File Size Uploaded
questionary-2.1.1.tar.gz 25.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for questionary 2.1.1
File Interpreter ABI Platform
questionary-2.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 62.6 kB

Release files / questionary-2.1.1.tar.gz

Download URL questionary-2.1.1.tar.gz
Size 25.8 kB
Tags Source
SHA-256 checksum
How to use checksums
3d7e980292bb0107abaa79c68dd3eee3c561b83a0f89ae482860b181c8bd412d
BLAKE2b-256 checksum
How to use checksums
f645eafb0bba0f9988f6a2520f9ca2df2c82ddfa8d67c95d6625452e97b204a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.4 CPython/3.12.11 Linux/6.11.0-1018-azure

Release files / questionary-2.1.1-py3-none-any.whl

Download URL questionary-2.1.1-py3-none-any.whl
Size 36.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a51af13f345f1cdea62347589fbb6df3b290306ab8930713bfae4d475a7d4a59
BLAKE2b-256 checksum
How to use checksums
3c261062c7ec1b053db9e499b4d2d5bc231743201b74051c973dadeac80a8f43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.4 CPython/3.12.11 Linux/6.11.0-1018-azure

Release history Release notifications | RSS feed

This release

2.1.1 This release

2 release files

2.1.0

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.10.0

2 release files

1.9.0

2 release files

1.8.1

2 release files

1.8.0

2 release files

1.7.0

2 release files

1.6.0

2 release files

1.5.2

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page