Read–Eval–Print Loop Interpreter
Project description
🐟 Read–Eval–Print Loop Interpreter (REPLI)
It's a Python package for building command-line terminal applications.
Features:
- Breadcrumbs
- Interface panel
- Pagination
┌──────────────────────────────────────────────────────────────┐
│ home │
│ ──────────────────────────────────────────────────────────── │
│ │
│ 1 print hello world │
│ 2 do something │
│ │
│ ──────────────────────────────────────────────────────────── │
│ e exit | q previous page │
└──────────────────────────────────────────────────────────────┘
>
Install
Pip:
pip install repli
Poetry:
poetry add repli
Usage
page = Page(description='home')
@page.command(type=NativeFunction, name='1', description='print hello world')
def command_print_hello_world():
print('hello world')
@page.command(type=Subprocess, name='2', description='do something')
def command_do_something():
return 'echo something else'
interpreter = Interpreter(page=page)
interpreter.loop()
See example.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
repli-0.1.10.tar.gz
(7.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
repli-0.1.10-py3-none-any.whl
(10.0 kB
view details)
File details
Details for the file repli-0.1.10.tar.gz.
File metadata
- Download URL: repli-0.1.10.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a00978814d717e0df4c81110c16a807c6ddf053a7f33d636b67639fd5be6210
|
|
| MD5 |
38fe1eff7d36e4347bfa435f33cc4aaa
|
|
| BLAKE2b-256 |
36f30eff6d4d5b965b64633d6f8c0711c5cab7cb34f1293446e7225f93843edd
|
File details
Details for the file repli-0.1.10-py3-none-any.whl.
File metadata
- Download URL: repli-0.1.10-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2900edb9caa76ba6f31f646369d54aeb57c4724e528d4a91482994ed13166f8
|
|
| MD5 |
5932e502380119dde39eb801b648a2d7
|
|
| BLAKE2b-256 |
c7bae1e3e960fb23aba27d3b1d5060c8f928fd096a0a523e59dba00265958586
|