# prompt-toolkit/ptpython

A better Python REPL

Repository: https://github.com/prompt-toolkit/ptpython
Canonical: https://ross.abutalabs.com/products/ptpython
Language: Python
License: BSD-3-Clause
License Family: permissive
Last push: 2025-11-21T10:57:25+00:00

## Health v2 (maintenance only)
Score: 55/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 53, release rhythm 33, longevity 100
- inputs: {"age_days": 4356, "days_push": 285, "days_rel": 286, "gap_med": 109.5, "n_releases_24m": 3}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 5450, forks 292 (observed 2026-08-28T04:09:18.637790+00:00)

## What it is
ptpython is an advanced Python REPL built on top of prompt_toolkit, offering syntax highlighting, multiline editing, autocompletion, and Vi/Emacs key bindings. It is a cross-platform drop-in replacement for the standard Python interactive shell.

## Use cases
- a better Python REPL with syntax highlighting
- interactive Python shell with autocompletion
- multiline editing in the Python interpreter
- REPL with vi or emacs key bindings
- test Python snippets interactively in the terminal
- REPL with top-level asyncio await support

## When to choose
- you spend significant time in the Python interactive shell and want autocomplete, syntax highlighting, and multiline editing
- you want vi or emacs key bindings and color schemes in your REPL
- you need a cross-platform REPL that works on Linux, macOS, Windows, and BSD

## When to avoid
- you prefer IPython's rich ecosystem of magics, notebooks, and introspection features
- you need a GUI or notebook-style interface rather than a terminal REPL
- you are on a very old Python version unsupported by current releases

## Facets
- artifact type: cli-tool
- maturity: active
- function: cli, developer-tools, editor
- domain: developer-tools, programming-languages
- platform: windows, bsd, cli, python, cross-platform
- tags: python-repl, interactive-shell, syntax-highlighting, autocompletion, prompt-toolkit, vi-keybindings, emacs-keybindings, command-line, linux, macos

## Member repositories
- prompt-toolkit/ptpython (main) score 55

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:18.637790+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:56:50.124358+00:00, confidence not recorded.
  - readme: https://github.com/prompt-toolkit/ptpython (fetched 2026-08-28T04:09:18.637790+00:00, sha f0dd68b06b24)
  - registry_pypi: https://pypi.org/pypi/ptpython/json (fetched 2026-08-29T08:51:53.905866+00:00, sha c8f37f45ac71)
- Data as of 2026-08-30T08:39:29.467469+00:00.
