prompt_toolkit
Library for building powerful interactive command lines in Python
Install
prompt-toolkit on PyPI
pip
pip install prompt-toolkituv
uv add prompt-toolkitpoetry
poetry add prompt-toolkitPackage facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — wcwidth |
| Maintenance | actively maintained — 18 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: prompt_toolkit-3.0.53-py3-none-any.whl
About prompt_toolkit
from the package's own PyPI description — quoted content, verbatim
Python Prompt Toolkit
|AppVeyor| |PyPI| |RTD| |License| |Codecov|
.. image :: /docs/images/logo_400px.png
prompt_toolkit is a library for building powerful interactive command line applications in Python.
Read the documentation on readthedocs
<http://python-prompt-toolkit.readthedocs.io/en/stable/>_.
Gallery
ptpython <http://github.com/prompt-toolkit/ptpython/>_ is an interactive
Python Shell, build on top of prompt_toolkit.
.. image :: /docs/images/ptpython.png
More examples <https://python-prompt-toolkit.readthedocs.io/en/stable/pages/gallery.html>_
prompt_toolkit features
prompt_toolkit could be a replacement for GNU readline
<https://tiswww.case.edu/php/chet/readline/rltop.html>_, but it can be much
more than that.
Some features:
- Pure Python.
- Syntax highlighting of the input while typing. (For instance, with a Pygments lexer.)
- Multi-line input editing.
- Advanced code completion.
- Both Emacs and Vi key bindings. (Similar to readline.)
- Even some advanced Vi functionality, like named registers and digraphs.
- Reverse and forward incremental search.
- Works well with...
Read as markdown · JSON record · Source repository · Homepage · Docs
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
A pure-Python library for building interactive command-line applications with syntax highlighting, multi-line editing, code completion, and both Emacs and Vi key bindings.
Low friction: single runtime dependency (wcwidth), active maintenance with a release 18 days ago, indicating a mature, well-maintained project.
Permissive license treatment allows broad use; BSD classification in classifiers confirms commercial and proprietary projects can adopt it freely.
Usage
pip install prompt_toolkit
from prompt_toolkit import prompt
answer = prompt('Give me some input: ')
print('You said: %s' % answer)
Requires Python 3.10 or later.
Verdict: A production-stable, actively maintained library with minimal dependencies and no known vulnerabilities. Ideal for developers building interactive CLI tools in Python; the low install friction and permissive license make adoption straightforward.
Needs verification
- Whether Pygments is truly optional or required at runtime (description lists it as a dependency but fact sheet does not).
- Repository star count and other popularity metrics beyond tier classification.
Similar packages
permissive · top 1,000 on PyPI
ipython-pygments-lexerspermissive · top 1,000 on PyPI
Pygmentspermissive · top 100 on PyPI
jupyterlab-pygmentspermissive · top 1,000 on PyPI
Sphinxpermissive · top 1,000 on PyPI
wcwidthpermissive · top 1,000 on PyPI
matplotlibpermissive · top 1,000 on PyPI
sshtunnelpermissive · top 1,000 on PyPI
questionarypermissive · top 1,000 on PyPI
pybind11permissive · top 1,000 on PyPI