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.2.tar.gz (47.3 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.2-py3-none-any.whl (39.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: chkit_py-0.1.2.tar.gz
  • Upload date:
  • Size: 47.3 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.2.tar.gz
Algorithm Hash digest
SHA256 8caf49fbd2c894a51c9c4662b554fa3e7154c83054740631e84d0e656953e49e
MD5 835b9cc200591208ea58f43d7fcc65e7
BLAKE2b-256 f8621047fe9252489bdeb7fcd23eb4735443d10a26b989cd8c6de3b987dcc33b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chkit_py-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 39.9 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c88f8c21248f550a80661627a0504ca5fd4c187eadec8094fcddabd4343a4cd3
MD5 52498bc33ab41ecd96792b85abff887c
BLAKE2b-256 ca4071dc7629d603446f518ce81ec8c7cae162f62f6f2b809aa361247a3da0dc

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