Metadata-Version: 2.5
Name: atherdlp-server
Version: 0.1.1
Summary: Local AtherDLP server: DLP policy engine, API, and dashboard on one port.
Project-URL: Homepage, https://github.com/AetherDLP/AtherDLP-backend
Project-URL: Repository, https://github.com/AetherDLP/AtherDLP-backend
Project-URL: Issues, https://github.com/AetherDLP/AtherDLP-backend/issues
Author-email: Subham Singh Chauhan <subhamchauhan1100@gmail.com>
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: data-loss-prevention,dlp,egress,observability,security
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: FastAPI
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Security
Requires-Python: >=3.10
Requires-Dist: alembic>=1.13
Requires-Dist: celery>=5.4
Requires-Dist: chardet>=5.2
Requires-Dist: fastapi>=0.115
Requires-Dist: httpx>=0.27
Requires-Dist: pdfminer-six>=20231228
Requires-Dist: pydantic-settings>=2.4
Requires-Dist: pydantic>=2.8
Requires-Dist: python-multipart>=0.0.9
Requires-Dist: redis>=5.0
Requires-Dist: sqlalchemy>=2.0
Requires-Dist: uvicorn[standard]>=0.30
Provides-Extra: ocr
Requires-Dist: pillow>=10.3; extra == 'ocr'
Requires-Dist: pytesseract>=0.3.10; extra == 'ocr'
Provides-Extra: postgres
Requires-Dist: psycopg[binary]>=3.1; extra == 'postgres'
Provides-Extra: test
Requires-Dist: pytest-asyncio>=0.23; extra == 'test'
Requires-Dist: pytest>=8.2; extra == 'test'
Description-Content-Type: text/markdown

# atherdlp-server

Local AtherDLP server: the DLP policy engine, REST API, and dashboard, served on
one port with no external services.

AtherDLP detects sensitive data leaving your application. The SDK intercepts
outbound `httpx` requests, classifies the destination, and reports what was in
the payload. This package is the other half: it evaluates those events against
your policies and shows them in a dashboard.

## Quick start

```bash
pipx install atherdlp-server
atherdlp up
```

That applies migrations to a SQLite database, seeds a few demo events so the
dashboard is not empty on first run, and opens <http://localhost:8473>.

No Postgres, no Redis, no Docker, no Node toolchain — the compiled dashboard
ships inside the package.

Then point your application at it:

```bash
pip install atherdlp
```

```python
import atherdlp

atherdlp.configure(endpoint="http://127.0.0.1:8473/events/http")
atherdlp.install()

# your app's httpx calls happen here

atherdlp.uninstall()
```

`configure()` is required for events to reach the server. Without an
`endpoint`, the SDK still intercepts and classifies, but delivers nowhere and
the dashboard stays empty.

## What you will see

Every intercepted request is classified by destination — calls to OpenAI,
Anthropic, Gemini, Mistral and Cohere are tagged as LLM egress, Stripe as PCI —
then matched against sensitive info types and evaluated against your policies to
an `allow` / `alert` / `block` decision. Activity and alerts are correlated by
trace id, so one leaked field can be followed from the call that sent it to the
alert it raised.

## `atherdlp up`

| Flag | Default | Meaning |
|---|---|---|
| `--host` | `127.0.0.1` | Bind address |
| `--port` | `8473` | Port |
| `--data-dir` | `~/.local/share/atherdlp` | Database and uploads |
| `--no-browser` | off | Do not open a browser |
| `--no-seed` | off | Skip demo data |

State persists between runs in `--data-dir`. Delete that directory for a clean
slate.

> **This server has no authentication yet.** It binds to loopback by default,
> which keeps it private to your machine. Do not expose it on a public
> interface: the read APIs return captured payload samples, which are by
> definition the most sensitive data the tool handles.

## Optional extras

```bash
pip install "atherdlp-server[ocr]"       # image OCR — also needs the tesseract binary
pip install "atherdlp-server[postgres]"  # Postgres instead of SQLite
```

OCR degrades gracefully: without these, image extraction is skipped rather than
failing the request.

## Running from source

```bash
git clone <org>/AtherDLP-backend && git clone <org>/AtherDLP-frontend
cd AtherDLP-backend
python3 -m venv .venv && source .venv/bin/activate
pip install -e ".[test]"

python scripts/build_frontend.py   # builds the dashboard, needs npm
atherdlp up
```

Run the tests with `pytest` (they use an in-memory SQLite database).

To develop the dashboard with hot reload, run `atherdlp up` and
`npm run dev` in `AtherDLP-frontend` — the Vite dev server proxies `/api` to
port 8473.

## Deployments beyond local mode

`atherdlp up` sets `ATHERDLP_LOCAL_MODE=true`, which runs scan tasks in-process
instead of dispatching to Celery. That is correct for a single process and wrong
for a multi-worker deployment, where inline scanning blocks the request that
triggered it. For that, leave local mode off and run Celery workers against
Redis with a Postgres `ATHERDLP_DATABASE_URL`.

## License

Apache-2.0.
