Athesa
State-driven web automation framework for complex workflows
Athesa is a protocol-oriented Python framework for building maintainable web automation processes using state machines, screen detection, and declarative action sequences.
✨ Features
- 🎯 State Machine Architecture - Clear workflow definition with explicit state transitions
- 🔍 Smart Screen Detection - Robust page state detection with multiple strategies
- 🔌 Pluggable Adapters - Support for Selenium, Playwright, and custom automation tools
- 📦 Protocol-Oriented - Duck typing with Python protocols, no forced inheritance
- 🎪 Event System - Built-in event emitter (no PyQt/GUI dependencies)
- 🏭 Process Factory - Registry for managing and discovering automation processes
- Testable - Clean separation of concerns, easy to unit test
Quick Start
Installation
pip install athesa
Basic Example
from athesa import ProcessRunner, ProcessContext
from athesa.adapters.selenium import SeleniumBridge
from selenium import webdriver
# Setup browser
driver = webdriver.Chrome()
bridge = SeleniumBridge(driver)
# Create context
context = ProcessContext(
credentials={'username': 'user@example.com', 'password': 'secret'}
)
# Run process
from my_processes import LoginProcess
process = LoginProcess()
runner = ProcessRunner(process, context, bridge)
outcome = runner.run()
print(f"Result: {outcome}") # 'success', 'failure', or 'retry'
driver.quit()
📖 Documentation
- Getting Started - Introduction and setup
- API Reference - Complete API documentation
- Quick Reference - Common patterns and snippets
- Examples - Working examples
🎓 Core Concepts
Process
A complete workflow from start to finish. Defines screens, handlers, states, and transitions.
State
A step in your workflow. Each state knows what screens to expect.
Screen
A detectable page state using selectors and verification criteria.
Handler
Actions to perform when a screen is detected.
Bridge
Abstraction layer for browser automation (Selenium, Playwright, custom).
💡 Why Athesa?
Problem: Web automation is brittle. Pages change, flows have edge cases, errors are hard to debug.
Solution: Athesa uses explicit state machines and screen detection:
- ✅ Clear state transitions make debugging easy
- ✅ Multiple detection strategies handle dynamic pages
- ✅ Process registry allows flow composition
- ✅ Event system provides observability
- ✅ Protocol-based (no forced inheritance)
🏗️ Architecture
┌─────────────────────────────────────────┐
│ Your Process Definition │
│ (States, Screens, Handlers) │
└──────────────┬──────────────────────────┘
│
┌───────▼────────┐
│ ProcessRunner │
└───────┬────────┘
│
┌──────────┼──────────┐
│ │ │
┌───▼───┐ ┌──▼──┐ ┌───▼────┐
│State │ │Page │ │Action │
│Machine│ │Det. │ │Executor│
└───┬───┘ └──┬──┘ └───┬────┘
│ │ │
└─────────┼─────────┘
│
┌─────▼─────┐
│ Bridge │
│ (Selenium)│
└───────────┘
Contributing
Contributions are welcome! Please read CONTRIBUTING.md first.
📝 License
MIT License - see LICENSE file
Acknowledgments
Built with ❤️ for the automation community.
Athesa - Smooth automation flows, state by state.
Metadata
Release files for athesa 0.1.2
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 | |
|---|---|---|---|---|
| athesa-0.1.2.tar.gz | 30.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| athesa-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 71.6 kB
Release files / athesa-0.1.2.tar.gz
| Download URL | athesa-0.1.2.tar.gz |
|---|---|
| Size | 30.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
af762c82ff5d8b83a6a5c78cf8b0151aeae625cd0ca2be1fef4d16b3b9466037
|
|
BLAKE2b-256 checksum How to use checksums |
6bb30d625b0c91bf0b7e9b0ec0aac3be59bbf781555962a3ac4d8c8d0eebbac9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.0
|
Release files / athesa-0.1.2-py3-none-any.whl
| Download URL | athesa-0.1.2-py3-none-any.whl |
|---|---|
| Size | 41.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
83f2b13104fe069edf137e6b9823a6413a4104f6cdfdb340727810663c3a4d1a
|
|
BLAKE2b-256 checksum How to use checksums |
5f425b03fdaab4c98ddedb33e1a5f30ed9e386144ca7bfd386fc51d1286f3e4e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.0
|
Security for athesa 0.1.2
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.