Project Type: Tools

Sweatpants Documentation

Server-side automation engine for long-running tasks. Overview Sweatpants is a server-side Python engine for repeatable, long-running automation tasks. Write modules as async generators, install them, run them as jobs. The...

Browser Pool

Playwright browser pool with automatic proxy integration and lifecycle management. Import from sweatpants import get_browser get_browser @asynccontextmanager async def get_browser( geo: Optional[str] = None, use_proxy: bool = True, ) ->...

Module Manifest

The module.json file defines a module's metadata, inputs, settings, and capabilities. Schema { "id": "string (required)", "name": "string (required)", "version": "string (required)", "description": "string", "entrypoint": "string (default: main.py)", "inputs": [],...

Module Class

Base class for all Sweatpants automation modules. Import from sweatpants import Module Overview Modules must subclass Module and implement the run() method as an async generator that yields results. from...

Proxy Client

HTTP client with rotating proxy support. Import from sweatpants import proxied_request proxied_request async def proxied_request( method: str, url: str, *, headers: Optional[dict[str, str]] = None, params: Optional[dict[str, Any]] = None,...

Configuration

Sweatpants is configured via environment variables with the SWEATPANTS_ prefix. Environment Variables Directories Variable Default Description SWEATPANTS_DATA_DIR /var/lib/sweatpants Data directory for all persistent storage SWEATPANTS_MODULES_DIR /var/lib/sweatpants/modules Installed modules directory SWEATPANTS_DB_PATH...

Job Scheduler

Async job execution engine that manages module runs, checkpoints, and lifecycle. JobContext Context object passed to running modules providing logging and state management. Properties job_id @property def job_id(self) -> str...

Changelog

All notable changes to Sweatpants are documented in this file. [0.4.4] - 2026-02-17 Added POST /modules/reload endpoint for hot-reloading modules without process restart (#18) [0.4.3] - 2026-02-15 Changed docs: add...

REST API

FastAPI REST API exposed by the Sweatpants daemon on port 8420. Status GET /status Get engine status and running jobs. Response: { "status": "running", "uptime": "2h 15m", "module_count": 5, "jobs":...

CLI Commands

Command-line interface for the Sweatpants automation engine. serve Start the Sweatpants daemon. sweatpants serve [OPTIONS] Options: --host, -h — API host to bind to (default: 127.0.0.1) --port, -p — API...

← Back to Chubes.net