Metadata-Version: 2.4
Name: fleet-framework
Version: 1.1.0
Summary: generic distributed-automation framework — master/worker, browser pool, anti-bot helpers, and abstract automation contracts (SERP, content, news, place, marketplace, jobs, social)
Author: Sarper AVCI
License: MIT
Project-URL: Homepage, https://github.com/sarperavci/fleet
Project-URL: Repository, https://github.com/sarperavci/fleet
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: fastapi>=0.115.0
Requires-Dist: uvicorn[standard]>=0.30.0
Requires-Dist: pydantic>=2.7.0
Requires-Dist: websockets>=12.0
Requires-Dist: httpx>=0.27.0
Requires-Dist: redis>=5.0.0
Requires-Dist: jinja2>=3.1.0
Requires-Dist: psutil>=5.9.0
Requires-Dist: click>=8.1.0
Requires-Dist: pyyaml>=6.0.2
Requires-Dist: beautifulsoup4>=4.12.0
Requires-Dist: lxml>=5.1.0
Requires-Dist: cryptography>=42.0.0
Provides-Extra: browser
Requires-Dist: cloakbrowser>=0.3; extra == "browser"
Requires-Dist: cryptography>=42.0.0; extra == "browser"
Requires-Dist: mitmproxy>=11.0; extra == "browser"
Requires-Dist: curl_cffi>=0.7; extra == "browser"
Requires-Dist: pyvirtualdisplay>=3.0; extra == "browser"
Requires-Dist: uaforger>=0.1.5; extra == "browser"
Provides-Extra: cloudflare
Requires-Dist: fleet-framework[browser]; extra == "cloudflare"
Provides-Extra: cloak
Requires-Dist: fleet-framework[browser]; extra == "cloak"
Provides-Extra: otel
Requires-Dist: opentelemetry-api>=1.27.0; extra == "otel"
Requires-Dist: opentelemetry-sdk>=1.27.0; extra == "otel"
Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.27.0; extra == "otel"
Provides-Extra: test
Requires-Dist: pytest>=8.0; extra == "test"
Requires-Dist: pytest-asyncio>=0.23; extra == "test"
Provides-Extra: all
Requires-Dist: fleet-framework[browser,cloak,cloudflare,otel]; extra == "all"
Dynamic: license-file

# Fleet

A framework for running Python automations across a fleet of machines. You write the automation once; Fleet hands it out to your workers, keeps them running, restarts the ones that fall over, and ships their output where you want it to go.

One process, the master, runs on one host. Many workers, one per machine, do the actual work. Output from one workload can feed another across hosts; you don't write the plumbing.

Battle-tested in the wild as the brains behind a Cloudflare Turnstile-solving farm.

## What it is

Fleet is two pieces: a master and some workers.

The master runs on one machine. It's where you set what to do and read what got done. Workers run on every other machine in your fleet. They check in with the master, get instructions, and do the work.

The work itself is a small Python class you write. Ship it as a pip package, install it on the machines, and Fleet finds it on its own.

## What's in the box

- One master, many workers. Change config in one place, every worker follows.
- Workers heal themselves. A crashed task is restarted on the next tick.
- Workloads hand output to each other across machines, no glue code.
- Optional Chromium pool for anything that needs a real browser.
- Auth, a small dashboard, and observability hooks. All wired up.

## Getting started

```bash
pip install fleet-framework
```

Then write your automation as a Python class. Roughly 30 lines:

```python
import asyncio
import httpx
from fleet.core import BaseConfig, ContinuousAutomation, register

class PingerConfig(BaseConfig):
    url: str
    interval_seconds: float = 5.0

@register("pinger")
class Pinger(ContinuousAutomation[PingerConfig]):
    Config = PingerConfig

    async def run_slot(self, ctx):
        async with httpx.AsyncClient(proxy=ctx.proxy) as client:
            while not ctx.shutdown.is_set():
                r = await client.get(ctx.config.url)
                await ctx.emit({"status": r.status_code})
                await asyncio.sleep(ctx.config.interval_seconds)
```

Full walkthrough — master, worker, config, output — at <http://fleet.hackmap.win/getting-started/quickstart>.

## Documentation

Full docs live at **<http://fleet.hackmap.win/>**.

- [Introduction](http://fleet.hackmap.win/)
- [Installation](http://fleet.hackmap.win/getting-started/installation) · [Quickstart](http://fleet.hackmap.win/getting-started/quickstart) · [Your first automation](http://fleet.hackmap.win/getting-started/first-automation)
- [Architecture](http://fleet.hackmap.win/concepts/architecture) · [Automations](http://fleet.hackmap.win/concepts/automations) · [Primitives](http://fleet.hackmap.win/concepts/primitives)
- [Continuous automations](http://fleet.hackmap.win/guides/continuous-automation) · [Batch automations](http://fleet.hackmap.win/guides/batch-automation) · [Inter-automation comms](http://fleet.hackmap.win/guides/inter-automation)
- [Browser-based automations](http://fleet.hackmap.win/guides/browser-automations) · [Deployment](http://fleet.hackmap.win/guides/deployment)
- [REST API](http://fleet.hackmap.win/reference/rest-api) · [WebSocket protocol](http://fleet.hackmap.win/reference/ws-protocol) · [CLI](http://fleet.hackmap.win/reference/cli)
- [Auth](http://fleet.hackmap.win/operations/auth) · [Observability](http://fleet.hackmap.win/operations/observability) · [Troubleshooting](http://fleet.hackmap.win/operations/troubleshooting)

## License

MIT. See [LICENSE](LICENSE).
