Skip to main content

PyPI version linting Tests

PyPI - Downloads GitHub issues GitHub Repo stars GitHub Discord

Read the Docs

Demonstration

ItsPrompt

Do you ever feel the need to ask a user of your code for an input?

Using input() is easy, but is it great?

Do you want to give the user a selection list, a yes-or-no question, or maybe a multiline input field?

And do you think all of this should be done easily, without caring to much how it all works?

Then you are right here! ItsPrompt allows you to ask the user for input, the fancy way.

ItsPrompt tries to be an easy-to-use module for managing prompts for the user. Your task is to create a great program, not finding yourself questioning how to ask the user for input. That is why ItsPrompt is there to take care of this problem, so you can focus on the important things!

TOC


A small, thankful note

This project is not the first to accomplish the above-mentioned tasks. There is another package, PyInquirer, which inspired me to build ItsPrompt.

On my way to create a small program I came to a point were I needed a simple GUI, and I tried PyInquirer. Unfortunately, at the current time it is not actively maintained and a bit outdated. I thought of updating it, but then I thought "Isn't it easier to just create my own version?" - And so I did!

ItsPrompt is not a copy or a fork of PyInquirer. I built this module from the ground up, without ever looking deep into the source code of PyInquirer.

On my way to build this package, I learned a lot about prompt-toolkit, and all of this just because of PyInquirer! Thanks!


Features

  • many prompt types:
    • select
    • raw_select
    • expand
    • checkbox
    • confirm
    • input
    • table
  • prompt autocompletion and validation
  • customizable style with prompt_toolkit
  • a helpful toolbar with error messages
  • simple, pythonic syntax

Installation

This package is hosted on pypi, so the installation is as simple as it can get:

python3 -m pip install ItsPrompt

This will install ItsPrompt without pandas. If you want to use TablePrompt (see table) with pandas.DataFrame, you can install pandas support either by:

  • installing pandas separately
  • install ItsPrompt via pip install ItsPrompt[df]

Quick Example

Import the Prompt class:

from ItsPrompt.prompt import Prompt

Now you can ask the user any type of prompt by calling the specific function from the Prompt class, e.g.:

result = Prompt.input('What is your name?')
print(result)

You see how easy it is?


Usage

To learn more about the usage, visit our documentation.


Further Information

Visit our documentation to learn more about the usage of ItsPrompt!

If you need some easy examples, refer to example.py!

If you want to contribute, check out the projects repository: ItsPrompt!

If you got any other questions, or want to give an idea on how to improve ItsPrompt:


Puh, that was so much to read... But now, lets have fun with ItsPrompt!

Metadata

Release files for ItsPrompt 1.5

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

Source distribution (sdist)

Source distribution for ItsPrompt 1.5
File Size Uploaded
itsprompt-1.5.tar.gz 19.5 kB Details

Built distribution (wheel)

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

Total release size: 50.4 kB

Release files / itsprompt-1.5.tar.gz

Download URL itsprompt-1.5.tar.gz
Size 19.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e1d563ed007037553c1ab9e5918c920f6705e75157e3b70ae613fa0f5fe0bc0f
BLAKE2b-256 checksum
How to use checksums
9fd9adc54e68b260fb2695377203aa1021e0bb37a9a838a565b46fa62ad09983
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.9.19

Release files / ItsPrompt-1.5-py3-none-any.whl

Download URL ItsPrompt-1.5-py3-none-any.whl
Size 30.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ced710ecc76e16d4b64572d88fb3db0d0c1f068dde26de41fc89193e2a736dc1
BLAKE2b-256 checksum
How to use checksums
e9b60663c9424a7152d9b00b045164a5d45331d6350600cc2413ed3fe5663f09
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.9.19

Release history Release notifications | RSS feed

This release

1.5 This release

2 release files

1.4

2 release files

1.3

2 release files

1.2

2 release files

1.1

2 release files

1.0

2 release files

0.5.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