Skip to main content

A pure Python terminal menu system with quick navigation and custom layouts.

Project description

Pure Python Menu (PPMenu)

A simple, powerful, and fast terminal menu system for Python.


PPMenu is beautiful and adaptive menu sistem for terminal apps

What is PPMenu?

PPMenu is a lightweight pure Python menu builder focused on:

  • Quick navigation with arrow keys, vim keys, and quick jumps
  • ALT+key quick-jumps for professional control
  • Full customization: titles, carts, dynamic displays
  • No external dependencies — works everywhere!

Built for terminal applications, system tools, games, shops,
and anywhere a clean text menu is needed.


Features

  • 🧭 Navigate with arrow keys, hjkl, quick letters
  • ⚡ Jump instantly with quick letters ([f] File, [o] Open, etc.)
  • ✨ ALT+Quick-Jump support for professional Vim users (only h/j/k/l)
  • 🎨 Custom color schemes (titles, selected items, submenus)
  • 🛠️ Full extensibility: override parts of the display
  • 🧹 100% clean PEP8 code, full type hints
  • 🔥 Fully covered with real Pytest tests

Installation

Option 1: Local Project

uv pip install ppmenu

# or

pip install ppmenu

Option 2: Local Project

Clone the repository:

git clone https://github.com/sergey-samoylov/ppmenu.git
cd ppmenu/

Install development dependencies (optional, for testing):

pip install pytest

Quick Usage Example

Create a quick menu in seconds:

from ppmenu import PPM

def say_hello():
    print("Hello, world!")

menu_structure = {
    '[h] Hello': say_hello,
    '[q] Quit': lambda: exit(0),
}

menu = PPM(menu_structure, title='My Simple Menu')
menu.run()

✅ Arrow keys and Vim-keys move.
✅ Press h to run "Hello".
✅ Press q to quit.


Enjoy projects in examples/

Have a taste how it might work with your own projects by launching
one of these simple apps:

  • demo
  • Cozy Coffee Shop
  • English Quiz

All are in examples directory.

Will happily create a file with a list of your projects, that use PPMenu.


Development & Testing

Run all tests:

pytest

(Optional: add pytest.ini with [pytest] pythonpath = . for clean imports.)


Contributing

Contributions are welcome!
Feel free to:

  • Open issues
  • Suggest improvements
  • Submit pull requests

Let's make PPMenu even better together!

📢Please follow the Code Style Guide before submitting pull requests.


License

This project is licensed under the GNU General Public License v3.0 (GPLv3).

See LICENSE file for details.


Author

Made with ❤️ by Sergey Samoylov

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

ppmenu-0.1.1.tar.gz (44.6 kB view details)

Uploaded Source

Built Distribution

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

ppmenu-0.1.1-py3-none-any.whl (30.9 kB view details)

Uploaded Python 3

File details

Details for the file ppmenu-0.1.1.tar.gz.

File metadata

  • Download URL: ppmenu-0.1.1.tar.gz
  • Upload date:
  • Size: 44.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for ppmenu-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d53cd344688e5659f5c43173fba22e09bc8a28d893662836c8f0699f9baac187
MD5 729617332c2e82e8715c425b79f18437
BLAKE2b-256 2868ed50f63dc7b8a2a0b1792a374e040c6a303c585f8c7d9864fe575b59fbee

See more details on using hashes here.

File details

Details for the file ppmenu-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: ppmenu-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 30.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for ppmenu-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ab32c0bda60520ebcebdbae7c1875556a6de1b453062b7060c61784119fd1841
MD5 c792cbf9e1d21dbbea1afb0f7d6a642d
BLAKE2b-256 1865bdce5bdc24eb1087d5d10174915862fb215e5dd0112f41e8c36f09e76997

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