Metadata-Version: 2.4
Name: sqlakit-debugserver
Version: 0.1.0
Summary: A page of the queries a SQLAKit application runs, as it runs them.
Keywords: sqlalchemy,sqlakit,debugging,sql
Author: Anton Ruhlov
Author-email: Anton Ruhlov <antonruhlov@gmail.com>
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Database
Classifier: Topic :: Software Development :: Debuggers
Classifier: Typing :: Typed
Requires-Dist: sqlakit>=0.20.0
Requires-Python: >=3.11
Project-URL: Repository, https://github.com/sqlakit/sqlakit-debugserver
Project-URL: Documentation, https://sqlakit.readthedocs.io/en/stable/debugging/#the-debug-server
Description-Content-Type: text/markdown

# sqlakit-debugserver

A page of the queries a [SQLAKit](https://sqlakit.readthedocs.io/en/stable/)
application runs, filled as it runs them.

```console
$ pip install sqlakit-debugserver
$ sqlakit-debugserver
```

It installs `sqlakit` with it.

Then send recordings to it from the application:

```python
from sqlakit_debugserver import DebugServer

with db.recording("GET /users", send_to=DebugServer("localhost", 5555)):
    list_users()
```

The pytest plugin's `--sqlakit-report` writes the same page to a file, with the
recordings in it. The documentation covers
[the server](https://sqlakit.readthedocs.io/en/stable/debugging/#the-debug-server)
and [the report](https://sqlakit.readthedocs.io/en/stable/debugging/#the-queries-a-test-run-made).

## Development

The server is Python, on top of `sqlakit`. The page is React, built with `bun`
into one file, `sqlakit_debugserver/static/index.html`, which the package ships:

```console
$ uv sync
$ uv run poe test
$ uv run poe lint
$ cd frontend && bun install && bun test && bun run dist
```

Run `bun run dist` whenever `frontend/` changes, and commit the result.
