Vultus Serpentis
Modern Tkinter utilities for TTK and TTKBootstrap applications
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 messagingcommands: Command pattern implementation for undo/redoactions: Action abstraction for UI componentsvalidation: 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:
- All tests pass (
pytest) - Code is type-checked (
mypy --strict) - Code follows style guide (
pylint) - 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 TTKdemo_bootstrap_enhanced.py: Enhanced features with TTKBootstrapdemo_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)
| 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)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| 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.