Skip to main content

Vultus Serpentis

Modern Tkinter utilities for TTK and TTKBootstrap applications

Python Version License: MIT

Vultus Serpentis is a suite of integrated utilities for building modern Python Tkinter applications with support for both plain TTK and TTKBootstrap. It provides a clean, modular architecture for common GUI patterns including actions, validation, undo/redo, and event-driven communication.

Features

  • 🎯 Actions: Swing-like Action class for centralizing UI component logic and state
  • ✅ Validation: Flexible input validation framework with configurable feedback strategies
  • ↩️ Commands: Robust undo/redo framework based on the command pattern
  • 📡 Event Bus: Synchronous event bus for decoupled component communication
  • 🎨 TTK/TTKBootstrap Support: Works with plain TTK, with enhanced features for TTKBootstrap
  • 🧪 Well-Tested: 90%+ test coverage with comprehensive test suite
  • 📦 Type-Safe: Full type hints with mypy strict mode compliance

Installation

Basic Installation (TTK only)

pip install vultus-serpentis

With TTKBootstrap Support

pip install vultus-serpentis[bootstrap]

Development Installation

pip install vultus-serpentis[dev]

Quick Start

Actions

from vultus_serpentis import Action
import tkinter as tk

def save_file():
    print("File saved!")

root = tk.Tk()
save_action = Action("Save", save_file, tooltip_text="Save the current file")

# Bind to multiple widgets
button = tk.Button(root)
save_action.bind_widget(button)

# Control state centrally
save_action.enabled = False  # Disables all bound widgets

Validation

from vultus_serpentis import ValidationBinder, RequiredValidator
import tkinter as tk

root = tk.Tk()
var = tk.StringVar()
entry = tk.Entry(root, textvariable=var)

# Validate with automatic feedback
with ValidationBinder(entry, var, [RequiredValidator()], debounce_ms=300):
    root.mainloop()

Commands (Undo/Redo)

from vultus_serpentis import Command, CommandManager

class IncrementCommand(Command):
    def __init__(self, counter):
        self.counter = counter
        self.old_value = counter.value
    
    def execute(self):
        self.counter.value += 1
        return True
    
    def undo(self):
        self.counter.value = self.old_value
        return True

manager = CommandManager.default()
manager.execute(IncrementCommand(my_counter))
manager.undo()  # Reverts the increment
manager.redo()  # Re-applies the increment

Event Bus

from vultus_serpentis import EventBus, Event
from dataclasses import dataclass

@dataclass
class FileOpenedEvent(Event):
    filename: str

bus = EventBus.default()

def on_file_opened(event):
    print(f"File opened: {event.filename}")

bus.subscribe(FileOpenedEvent, on_file_opened)
bus.publish(FileOpenedEvent(filename="document.txt"))

Architecture

Vultus Serpentis is designed with modularity in mind. Each module can be used independently or integrated together:

  • common: Shared base classes (Observable, VultusException)
  • events: Event bus for pub/sub messaging
  • commands: Command pattern implementation for undo/redo
  • actions: Action abstraction for UI components
  • validation: Input validation with feedback strategies

TTK vs TTKBootstrap

The library works with plain TTK by default, with enhanced features when TTKBootstrap is available:

Feature Plain TTK TTKBootstrap
Core functionality ✅ Full support ✅ Full support
Validation feedback Basic (bg/fg colors) Enhanced (bootstyle, toast)
Action styling Standard Bootstyle-aware

Development

Running Tests

pytest

Type Checking

mypy vultus_serpentis

Code Quality

pylint vultus_serpentis

Coverage Report

pytest --cov=vultus_serpentis --cov-report=html

Requirements

  • Python 3.9+
  • tksimpletooltip >= 2.6.0
  • ttkbootstrap >= 1.10.0 (optional, for enhanced features)

License

MIT License - see LICENSE file for details

Contributing

Contributions are welcome! Please ensure:

  1. All tests pass (pytest)
  2. Code is type-checked (mypy --strict)
  3. Code follows style guide (pylint)
  4. Test coverage remains above 90%

Roadmap

  • Phase 1: Foundation (Observable, VultusException)
  • Phase 2: Event Bus implementation
  • Phase 3: Command Framework
  • Phase 4: Actions Module
  • Phase 5: Validation Module
  • Phase 6: Integration & Examples
  • Phase 7: Documentation & PyPI Release

Examples

See the examples/ directory for complete working examples:

  • demo_basic_ttk.py: Using Vultus Serpentis with plain TTK
  • demo_bootstrap_enhanced.py: Enhanced features with TTKBootstrap
  • demo_full_integration.py: All modules working together

Support

For issues, questions, or contributions, please visit the GitHub repository.

Metadata

Release files for vultus-serpentis 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vultus-serpentis 0.1.0
File Size Uploaded Provenance Actions
vultus-serpentis-0.1.0.tar.gz 30.3 kB Without provenance Details for vultus-serpentis-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for vultus-serpentis 0.1.0
File Interpreter ABI Platform Actions
vultus_serpentis-0.1.0-py3-none-any.whl Python 3 none any Details for vultus_serpentis-0.1.0-py3-none-any.whl

Total release size: 48.2 kB

Release files / vultus-serpentis-0.1.0.tar.gz

Download URL vultus-serpentis-0.1.0.tar.gz
Size 30.3 kB
Tags Source
SHA-256 checksum
How to use checksums
5a729a8dc2362a74ab55cbe19631f79a0f5dd80dca0baefa260d032b9bad92cf
BLAKE2b-256 checksum
How to use checksums
cb273925459e69e2b8ad9132619c4eb46ed5d8788a827bfe7b694d39a09ff0bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.3

Release files / vultus_serpentis-0.1.0-py3-none-any.whl

Download URL vultus_serpentis-0.1.0-py3-none-any.whl
Size 17.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2b11c257eccf543a50081d5f0dac88cbe6a84df7136871688cf86600e87c0a9b
BLAKE2b-256 checksum
How to use checksums
119e5e2525a3f0530272bba8b0f8fbe3b13dd5be367b329435caa57a21dd9451
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.3

Security for vultus-serpentis 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page