Registry / http-networking / pyrepl

pyrepl

JSON →
library0.11.5pypypi✓ verified 25d ago

pyrepl is a readline-a-like library implemented entirely in pure Python, providing advanced command-line interface features. It offers sane multi-line editing, history management with incremental search, and robust completion capabilities. Designed for integration, it avoids global variables, allowing multiple independent readers within an application's event loop. It requires Python 3.8 or newer, with the current version being 0.11.4.

pip install pyrepl
INSTALL
IMPORT
SIG · PYREPL
P
pyrepl
http-networkingpythonv0.11.5
Install
1.6s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.11.5 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18.1MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.6s · import 0.000s · 19MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

InteractiveConsole
from pyrepl import InteractiveConsole
from pyrepl import InteractiveConsole

This quickstart demonstrates how to embed a pyrepl-powered interactive console into a Python application using `InteractiveConsole` from `pyrepl.cmdrepl`. It creates a console instance, initializes it with the current global and local scope, and then starts an interactive loop. Users can execute Python code directly within this embedded REPL.

import sys from pyrepl.cmdrepl import InteractiveConsole def main(): # Instantiate an interactive console console = InteractiveConsole(locals=globals()) # Start the interactive loop print("\nWelcome to pyrepl interactive console! Type 'exit()' or Ctrl-D to quit.") console.interact() print("Exiting pyrepl console.") if __name__ == '__main__': main()
Debug
Known issues
gotchaPyrepl's default keybindings for history navigation differ from standard terminal behavior. Instead of up/down arrow keys, use `Ctrl+P` (previous) and `Ctrl+N` (next) to cycle through command history. Arrow keys are used for moving within the current line.
fix
Users accustomed to other REPLs should remember to use `Ctrl+P` and `Ctrl+N` for history, or explore custom keybindings if available in the specific pyrepl integration.
affects: All versions
gotchaThere is significant confusion between the `pyrepl` library (this package) and `PyREPL`, the new interactive interpreter *based on* `pyrepl` that is becoming the default for CPython 3.13. While related, they are distinct. CPython's `PyREPL` has its own development and rollout nuances (e.g., specific platform support like Windows), which may not directly apply to the standalone `pyrepl` library.
fix
When researching, ensure you distinguish between 'pyrepl' (the library) and 'PyREPL' (CPython's new default REPL) to find relevant documentation and solutions.
affects: All versions, especially relevant with Python 3.13+
Upgrade
Version history
0.11.5latest on PyPI · released Aug 2, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
39 hits · last 30 days
node
34
Amazon
1
Resources
pyrepl — pip install pyrepl · libregistry