Skip to main content

Read–Eval–Print Loop Interpreter

Project description

🐟 Read–Eval–Print Loop Interpreter (REPLI)

repli build license python pypi

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


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.8.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

repli-0.1.8-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file repli-0.1.8.tar.gz.

File metadata

  • Download URL: repli-0.1.8.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

Hashes for repli-0.1.8.tar.gz
Algorithm Hash digest
SHA256 4b708f099a7c47d72cd49319514dc5e9736bd76bee0d61c558c9b415b3ba4e6a
MD5 eda0c5dcc11c6a726da3495b18539aa5
BLAKE2b-256 e14cd12b74c7dca4242ebf0c2787fd5352c0baf42b2c9342005aead466f77232

See more details on using hashes here.

File details

Details for the file repli-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: repli-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for repli-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 d33e37550f85724465f7d2f0f763b68a34aefeebc0d5507fbd012df094e97ea4
MD5 c95f0499cb98d2302722f6b9e6591b09
BLAKE2b-256 013e82c3788080bbbef906a855e9199559d6aaf6fe552626196a5ccc516aa01a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page