# jonathanslenders/python-prompt-toolkit

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/jonathanslenders-python-prompt-toolkit).**

10,498 stars · 793 forks · Python · BSD-3-Clause

## Links

- GitHub: https://github.com/jonathanslenders/python-prompt-toolkit
- Homepage: https://python-prompt-toolkit.readthedocs.io/
- awesome-repositories: https://awesome-repositories.com/repository/jonathanslenders-python-prompt-toolkit.md

## Description

python-prompt-toolkit is a Python library and terminal user interface framework used for building interactive command line interfaces. It provides a toolkit for constructing complex terminal applications with advanced input handling and layout management.

The project features a real-time syntax highlighting engine and a rendering system that ensures correct alignment and display of double-width Unicode characters. It includes specialized capabilities for command line autocompletion, providing ghost text suggestions and searchable input history.

The framework covers a broad range of interface capabilities, including interactive code completion, mouse interaction support, and multi-line input buffering. It also supports configurable keyboard navigation using Vi and Emacs key bindings for text manipulation.

## Tags

### User Interface & Experience

- [Interactive CLI Frameworks](https://awesome-repositories.com/f/user-interface-experience/interactive-cli-frameworks.md) — Provides a comprehensive framework for constructing interactive command-line interfaces with advanced layout and input management.
- [Terminal User Interfaces](https://awesome-repositories.com/f/user-interface-experience/terminal-user-interfaces.md) — A comprehensive framework for building complex terminal user interfaces with advanced input and layout management. ([source](https://github.com/jonathanslenders/python-prompt-toolkit#readme))
- [Coordinate-Based Character Rendering](https://awesome-repositories.com/f/user-interface-experience/character-based-visual-elements/coordinate-based-character-rendering.md) — Implements a coordinate-based system to place text characters at specific x and y positions for precise terminal layouts.
- [Event-Driven Input Handlers](https://awesome-repositories.com/f/user-interface-experience/form-and-input-management/input-handling/event-driven-input-handlers.md) — Provides an event-driven input loop to process keyboard and mouse sequences and trigger application actions.
- [Keyboard Command Mapping](https://awesome-repositories.com/f/user-interface-experience/input-mapping/keyboard-command-mapping.md) — Translates keyboard sequences into internal commands via configurable maps, supporting Vi and Emacs modes.
- [Keyboard Navigation](https://awesome-repositories.com/f/user-interface-experience/keyboard-navigation.md) — Supports configurable keyboard navigation through Emacs and Vi bindings for efficient text manipulation. ([source](https://github.com/jonathanslenders/python-prompt-toolkit#readme))
- [Syntax Highlighters](https://awesome-repositories.com/f/user-interface-experience/syntax-highlighters.md) — Includes a syntax highlighting engine that uses lexers to apply colors to text in real time.
- [Real-Time Command Highlighting](https://awesome-repositories.com/f/user-interface-experience/syntax-highlighters/real-time-command-highlighting.md) — Colors input text in real time using a lexer to provide immediate visual feedback during typing. ([source](https://github.com/jonathanslenders/python-prompt-toolkit#readme))
- [Terminal Text Rendering](https://awesome-repositories.com/f/user-interface-experience/terminal-text-rendering.md) — Ensures double-width Unicode characters are rendered correctly for precise alignment of international text. ([source](https://github.com/jonathanslenders/python-prompt-toolkit#readme))
- [Double-Width Character Alignment](https://awesome-repositories.com/f/user-interface-experience/terminal-text-rendering/double-width-character-alignment.md) — Ensures correct alignment and display of double-width Unicode characters for international language support.
- [Unicode Layout Rendering](https://awesome-repositories.com/f/user-interface-experience/terminal-user-interfaces/rendering-output-engines/terminal-agnostic-renderers/unicode-layout-rendering.md) — Ensures correct alignment and display of double-width Unicode characters for precise terminal rendering.

### Development Tools & Productivity

- [Command-Line Autocompletion](https://awesome-repositories.com/f/development-tools-productivity/command-line-autocompletion.md) — Provides a robust system for command-line autocompletion with ghost text suggestions and searchable input history.
- [Command Line Input Utilities](https://awesome-repositories.com/f/development-tools-productivity/command-line-input-utilities.md) — Provides tools for implementing specialized text input fields with highlighting and intelligent completions.
- [Interactive CLI Tools](https://awesome-repositories.com/f/development-tools-productivity/interactive-cli-tools.md) — Facilitates the development of interactive command line applications with advanced input handling.
- [Terminal Syntax Highlighting Engines](https://awesome-repositories.com/f/development-tools-productivity/terminal-syntax-highlighting-engines.md) — Implements a real-time syntax highlighting engine specifically designed for terminal environments using lexers.
- [Terminal User Interface Frameworks](https://awesome-repositories.com/f/development-tools-productivity/terminal-user-interface-frameworks.md) — Provides a framework for creating professional terminal interfaces with mouse support and multi-line editing.
- [Differential Screen Updates](https://awesome-repositories.com/f/development-tools-productivity/window-managers/split-screen-layouts/terminal-screen-partitioning/differential-screen-updates.md) — Implements differential rendering to compare screen states and update only changed characters for efficiency.
- [Code Completion](https://awesome-repositories.com/f/development-tools-productivity/code-completion.md) — Provides an interactive system for suggesting completions for current input to reduce data entry errors. ([source](https://github.com/jonathanslenders/python-prompt-toolkit#readme))
- [Command Line Navigation](https://awesome-repositories.com/f/development-tools-productivity/command-line-navigation.md) — Implements efficient text manipulation and navigation using configurable Vi and Emacs key bindings.
- [Multi-line Editing](https://awesome-repositories.com/f/development-tools-productivity/multi-line-editing.md) — Supports multi-line editing and multiple input buffers for complex command line interactions. ([source](https://github.com/jonathanslenders/python-prompt-toolkit#readme))
- [Shell History Search Engines](https://awesome-repositories.com/f/development-tools-productivity/shell-history-search-engines.md) — Provides incremental reverse and forward search capabilities through previously entered command history. ([source](https://github.com/jonathanslenders/python-prompt-toolkit#readme))
- [Suggestion Engines](https://awesome-repositories.com/f/development-tools-productivity/suggestion-engines.md) — Offers ghost text suggestions based on user history and patterns to accelerate command entry. ([source](https://github.com/jonathanslenders/python-prompt-toolkit#readme))
- [Buffer Managers](https://awesome-repositories.com/f/development-tools-productivity/window-managers/buffer-managers.md) — Manages multiple independent text buffers to support context switching and multi-line editing.

### Operating Systems & Systems Programming

- [Terminal UI Frameworks](https://awesome-repositories.com/f/operating-systems-systems-programming/terminal-command-line-environments/terminal-interface-systems/terminal-interfaces/terminal-ui-frameworks.md) — Offers a full framework for creating sophisticated terminal interfaces with mouse support and multi-line editing.

### Part of an Awesome List

- [CLI Development](https://awesome-repositories.com/f/awesome-lists/devtools/cli-development.md) — Library for building interactive CLI tools.
