Skip to main content

ClickHouse schema and migration toolkit for Python (port of chkit TS)

Project description

chkit (Python)

A Python port of chkit — 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

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chkit_py-0.1.0.tar.gz (43.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chkit_py-0.1.0-py3-none-any.whl (38.6 kB view details)

Uploaded Python 3

File details

Details for the file chkit_py-0.1.0.tar.gz.

File metadata

  • Download URL: chkit_py-0.1.0.tar.gz
  • Upload date:
  • Size: 43.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for chkit_py-0.1.0.tar.gz
Algorithm Hash digest
SHA256 52f0a7af3c15dfad6de66070adbff00c5a5c25e769ca2c602f5c167269169af0
MD5 ed4a67dabd7a53849b83f25c4818fc7b
BLAKE2b-256 dabaeaf9fa638bc5b1036ddefa30567bafcba89d0949acc984db410cee29999d

See more details on using hashes here.

File details

Details for the file chkit_py-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: chkit_py-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 38.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for chkit_py-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d45bacbba2bd09576b9746126344489b71727f3f0e89dccb122c52e97a10fc49
MD5 2d21e6c104f8120387526defdedaeda1
BLAKE2b-256 4b9a1527585716e988024c7edb7c10683c35c0127b827d632b10503e894f4b00

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page