Skip to main content

PepperPy console package

Project description

PepperPy Console

PyPI version Python 3.8+ License: MIT Code style: black Documentation Status

A powerful Python library for building text-based user interfaces (TUI) with a focus on extensibility and ease of use.

Features

  • 🎨 Theme Support: Customizable appearance with built-in themes
  • 🔌 Plugin System: Easy to extend with custom plugins
  • 🎯 CLI Framework: Robust command-line interface system
  • 📱 TUI Components: Rich set of text user interface widgets
  • 🔄 Event System: Comprehensive event handling
  • 🔒 Type Safety: Full type hints support
  • Async Support: Built with asyncio for modern Python applications

Installation

pip install pepperpy-console

Quick Start

from pepperpy_console import PepperApp, PepperScreen, Static

class WelcomeScreen(PepperScreen):
    async def compose(self):
        yield Static("Welcome to PepperPy Console!")

class MyApp(PepperApp):
    async def on_mount(self):
        await self.push_screen(WelcomeScreen())

if __name__ == "__main__":
    app = MyApp()
    app.run()

Documentation

Visit our documentation for:

Examples

CLI Application

from pepperpy_console import PepperApp, Command

class CLIApp(PepperApp):
    def __init__(self):
        super().__init__()
        self.setup_commands()

    def setup_commands(self):
        async def greet(name: str):
            return f"Hello, {name}!"

        self.commands.add_command(Command(
            name="greet",
            callback=greet,
            description="Greet someone"
        ))

app = CLIApp()
app.run()

Data Table

from pepperpy_console import (
    PepperApp,
    PepperScreen,
    PepperTable,
    Column
)

class DataScreen(PepperScreen):
    def __init__(self):
        super().__init__()
        self.table = PepperTable()

    def setup_table(self):
        self.table.add_column(Column("ID"))
        self.table.add_column(Column("Name"))
        self.table.add_row("1", "Item 1")

    async def compose(self):
        self.setup_table()
        yield self.table

app = PepperApp()
app.push_screen(DataScreen())
app.run()

Contributing

We welcome contributions! Please see our Contributing Guide for details.

Development

  1. Clone the repository:
git clone https://github.com/yourusername/pepperpy-console.git
cd pepperpy-console
  1. Install dependencies:
poetry install
  1. Run tests:
poetry run pytest

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Built with Textual
  • Inspired by modern Python libraries and frameworks

Support

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

pepperpy_console-0.2.1.tar.gz (32.0 kB view details)

Uploaded Source

Built Distribution

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

pepperpy_console-0.2.1-py3-none-any.whl (51.4 kB view details)

Uploaded Python 3

File details

Details for the file pepperpy_console-0.2.1.tar.gz.

File metadata

  • Download URL: pepperpy_console-0.2.1.tar.gz
  • Upload date:
  • Size: 32.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.12.8 Linux/6.5.0-1025-azure

File hashes

Hashes for pepperpy_console-0.2.1.tar.gz
Algorithm Hash digest
SHA256 0636e5fa8fee481c47be35191339bf0dabd761653954b2ab7111e6ce4fa41473
MD5 5446c89bf5447d52890e2b2ec147d656
BLAKE2b-256 9672302afb3b82985a5870a203699a96b3b2b4dad0b7f1f50463a6a69354e463

See more details on using hashes here.

File details

Details for the file pepperpy_console-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: pepperpy_console-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 51.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.12.8 Linux/6.5.0-1025-azure

File hashes

Hashes for pepperpy_console-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 92edb851a83ffc4a937345ac8bbf5b25b171da141d418d525f9b2eee6ec8fc71
MD5 8d34ac1cdbcbfb64ee0031ad979f5870
BLAKE2b-256 b4bcc9358675314f370a6200b1b85d3bc1f9b9bc4c949f884e329327ed490d48

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