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.3.tar.gz (55.7 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.3-py3-none-any.whl (47.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: chkit_py-0.1.3.tar.gz
  • Upload date:
  • Size: 55.7 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.3.tar.gz
Algorithm Hash digest
SHA256 7807e1c08a1231f02a8c6470f4121a3f12f6e0f82de8f56044f4e3aa20828ea0
MD5 4f6394b5b447fe5216d4dbad399705d6
BLAKE2b-256 cc881fa492f7dca11fa816f9664d980d0207f90630fd931c68d37ed3dd7135c5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chkit_py-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 47.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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8abd92735652281da7f98f08df4ef1e4b63489b22126ad93884a00c5ffde1077
MD5 cc0b5749c6bb8c10178b3aac2c9c990c
BLAKE2b-256 ec5bf1183920007d5039e7fd1a3918fd5ebf498b84fa9f2437ecd65b37e8b96e

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