Skip to main content

Read–Eval–Print Loop Interpreter

Project description

🫥 Read–Eval–Print Loop Interpreter (REPLI)

repli build license python pypi

This is a Python package for building Read–Eval–Print Loop (REPL) applications.

Features:

  • Breadcrumbs
  • Interface panel
  • Pagination
────────────────────────────────────────────────────────────────
  home
────────────────────────────────────────────────────────────────
╭─ commands ───────────────────────────────────────────────────╮
│ 1  page 1                                                    │
│ 2  page 2                                                    │
╰──────────────────────────────────────────────────────────────╯
╭─ builtins ───────────────────────────────────────────────────╮
│ e  exit                                                      │
│ q  previous page                                             │
╰──────────────────────────────────────────────────────────────╯
> _

Install

Pip:

pip install repli

Poetry:

poetry add repli

Usage

page = Page(name='0', description='home')

@page.command(type=NativeFunction, name='1', description='command 1')
def command_1():
    print('command 1')

@page.command(type=Subprocess, name='2', description='command 2')
def command_2():
    return 'echo command 2'

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.5.tar.gz (7.7 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.5-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: repli-0.1.5.tar.gz
  • Upload date:
  • Size: 7.7 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.5.tar.gz
Algorithm Hash digest
SHA256 58ed4b9fd7b017f4d38530ae6744bbb2f672332864044dae8d4cfe4887d6bbb4
MD5 4b1b153ebaa68a58123982eb692f4191
BLAKE2b-256 5bed706c69d60cf2429216d8a0fdaf5d1281dbd729d2ff29e96f35d0f12139de

See more details on using hashes here.

File details

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

File metadata

  • Download URL: repli-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 9.8 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 03e5b2a8a57a0d6f49a9553f95b7c05c1bdace29c815eb194aa5854ffadd2c25
MD5 2a0753963da6fcb7b6f93910e1cc64b6
BLAKE2b-256 30428600e09de0b1eef628da301fdb401cf506b178e7da672fd00b914de55fd3

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