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.11.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.11-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: repli-0.1.11.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.11.tar.gz
Algorithm Hash digest
SHA256 5a0d1da455ccd083ab69a2978d6f2a94fa4cbf6bcdfbee23bd067d62c4159778
MD5 4c0b76d612f3f3da4fac941da1c8806c
BLAKE2b-256 c3e140a16ac2d315ce46f7c95ae835932ae06d45f12fa1b5e807dc4098c8e96d

See more details on using hashes here.

File details

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

File metadata

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

Hashes for repli-0.1.11-py3-none-any.whl
Algorithm Hash digest
SHA256 d3d95f5c9bf07ab92efd49298afa3a04e70752268dc2a86a6b289480fb273b4d
MD5 d5a4958c709ae112659494bf5e49d2fe
BLAKE2b-256 969c91273c0d29713d7d9161e36d611d884c8f2063ec13e41346286d4e48492f

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