Metadata-Version: 2.4
Name: chkit-py
Version: 0.1.0
Summary: ClickHouse schema and migration toolkit for Python (port of chkit TS)
Project-URL: Homepage, https://chkit.obsessiondb.com
Project-URL: Repository, https://github.com/obsessiondb/chkit
Project-URL: Issues, https://github.com/obsessiondb/chkit/issues
Author: ObsessionDB
License: MIT
Keywords: cli,clickhouse,database,migrations,schema
Requires-Python: >=3.11
Requires-Dist: clickhouse-connect<1,>=0.8
Requires-Dist: pydantic<3,>=2.9
Requires-Dist: rich<14,>=13.9
Requires-Dist: typer<1,>=0.15
Provides-Extra: dev
Requires-Dist: mypy>=1.13; extra == 'dev'
Requires-Dist: pyright>=1.1.390; extra == 'dev'
Requires-Dist: pytest-cov>=6.0; extra == 'dev'
Requires-Dist: pytest>=8.3; extra == 'dev'
Requires-Dist: ruff>=0.8; extra == 'dev'
Provides-Extra: publish
Requires-Dist: build>=1.2; extra == 'publish'
Requires-Dist: twine>=5.1; extra == 'publish'
Description-Content-Type: text/markdown

# chkit (Python)

A Python port of [chkit](https://chkit.obsessiondb.com) — ClickHouse schema
management and migration toolkit, written in strict, imperative Python.

## Design

- **Type safety first.** Every public surface is annotated. The project is
  configured for `mypy --strict` and Pyright `strict` mode out of the box.
- **Pydantic v2 models.** Runtime validation, frozen, `extra="forbid"`.
- **Imperative core.** Pure functions over data; minimal classes outside of
  Pydantic models and the CLI shell.
- **No magic.** No dynamic imports, no runtime introspection of user code
  beyond what Pydantic provides.

## Layout

```
src/chkit/
  core/          Schema DSL, diff engine, planner, SQL rendering, validation
  clickhouse/    ClickHouse client wrapper
  cli/           Typer-based CLI (init, generate, migrate, status, check, drift)
```

## Quickstart

```bash
pip install -e ".[dev]"
chkit --help
mypy
pytest
```

## Status

Port-in-progress. Implements the core schema model, canonicalization, the
diff/migration planner, validation, and a basic CLI. Parity tracker in the
`tests/` directory mirrors the TS test suite.
