Go to file
Mathew Sir Guest the best 154344e94a refactor: rename sessions submodule to _sessions to avoid shadowing sessions()
wabot/__init__.py defines def sessions(...) and also had a sessions.py
submodule, so wabot.sessions (attribute) resolved to the function,
shadowing the module for import wabot.sessions as m style access. This
is the same class of collision that browser.py -> _browser.py already
fixed. Renaming to _sessions.py removes the ambiguity and lets
docs/api.rst drop the :no-index: Sphinx workaround in favor of plain
autoclass directives on the public SessionRecord/SessionStore
re-exports.
2026-07-12 15:37:56 -06:00
docs refactor: rename sessions submodule to _sessions to avoid shadowing sessions() 2026-07-12 15:37:56 -06:00
src/wabot refactor: rename sessions submodule to _sessions to avoid shadowing sessions() 2026-07-12 15:37:56 -06:00
tests refactor: rename sessions submodule to _sessions to avoid shadowing sessions() 2026-07-12 15:37:56 -06:00
.gitignore docs: rewrite README and CLAUDE.md for the modernized library 2026-07-08 23:10:45 -06:00
CLAUDE.md docs: rewrite README and CLAUDE.md for the modernized library 2026-07-08 23:10:45 -06:00
pyproject.toml build: replace setup.py with uv project, src layout 2026-07-07 21:23:55 -06:00
README.md docs: rewrite README and CLAUDE.md for the modernized library 2026-07-08 23:10:45 -06:00
uv.lock build: replace setup.py with uv project, src layout 2026-07-07 21:23:55 -06:00

WABot — Web Automator Bot

Stateful Selenium browser automation for Python. Model pages as classes, drive them through one facade, and — the flagship — keep the browser alive after your process exits so another Python process can pick it up by name.

import wabot

bot = wabot.browser(session="scraper1", browser="firefox")
bot.driver.get("https://example.com/login")
# ... log in; process exits; browser stays open ...

# a different process, later:
bot = wabot.browser(session="scraper1", browser="firefox")  # reattaches

Human-like pacing (random delays, randomized click positions) is on by default; pass pacing=wabot.NoPacing() for full speed.

Development

uv sync                                   # install everything
uv run pytest                             # unit tests (fast, no browsers)
uv run pytest -m integration              # real headless-browser tests
uv run ruff check . && uv run ruff format --check .
uv run sphinx-build -M html docs docs/_build   # docs

Docs: quickstart, persistent-sessions guide, and API reference under docs/ (build locally with the command above).