Skip to main content

Houseplant: Database Migrations for ClickHouse

PyPI version image image

Houseplant is a CLI tool that helps you manage database migrations for ClickHouse.


Here's how you can manage your ClickHouse migrations.

$ houseplant init
✨ Project initialized successfully!

$ houseplant generate "add events"
✨ Generated migration: ch/migrations/20240101000000_add_events.yml

$ houseplant migrate:status
Database: june_development

┏━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┓
┃ Status ┃ Migration ID   ┃ Migration Name ┃
┡━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━┩
│   up   │ 20240101000000 │ add events     │
└────────┴────────────────┴────────────────┘

$ houseplant migrate
✓ Applied migration 20241121003230_add_events.yml

$ houseplant migrate:up VERSION=20241121003230
✓ Applied migration 20241121003230_add_events.yml

$ houseplant migrate:down VERSION=20241121003230
✓ Rolled back migration 20241121003230_add_events.yml

Why Houseplant?

  • Schema Management: Houseplant automatically tracks and manages your ClickHouse schema changes, making it easy to evolve your data model over time
  • Developer Experience: Write migrations in YAML format, making them easy to read, review, and maintain
  • Environment Support: Different configurations for development, testing, and production environments
  • Rich CLI: Comes with an intuitive command-line interface for all migration operations

Installation

You can install Houseplant using pip:

$ pip install houseplant

Configuration

Houseplant uses the following environment variables to connect to your ClickHouse instance:

  • HOUSEPLANT_ENV: The current environment
  • CLICKHOUSE_HOST: Host address of your ClickHouse server (default: "localhost")
  • CLICKHOUSE_PORT: Port number for ClickHouse (default: 9000)
  • CLICKHOUSE_DB: Database name (default: "development")
  • CLICKHOUSE_USER: Username for authentication (default: "default")
  • CLICKHOUSE_PASSWORD: Password for authentication (default: "")
  • CLICKHOUSE_SECURE: Enable secure connection via the secure flag of ClickHouse client (default: False)
  • CLICKHOUSE_VERIFY: Enable certificate verifiaction verify flag of ClickHouse client (default: False)

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for houseplant 0.2.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for houseplant 0.2.5
File Size Uploaded
houseplant-0.2.5.tar.gz 298.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for houseplant 0.2.5
File Interpreter ABI Platform
houseplant-0.2.5-py3-none-any.whl Python 3 none any Details

Total release size: 310.5 kB

Release files / houseplant-0.2.5.tar.gz

Download URL houseplant-0.2.5.tar.gz
Size 298.6 kB
Tags Source
SHA-256 checksum
How to use checksums
1ea20288e44738b091836c80b8ce4b1bdfc7edc9044895e3835b7edb8c0a051a
BLAKE2b-256 checksum
How to use checksums
bee17a29d5c0b182ecb6a5b4e44adfffc68a91dbee727684f82ba44b8f99b587
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 27, 2025.

Transparency log

Release files / houseplant-0.2.5-py3-none-any.whl

Download URL houseplant-0.2.5-py3-none-any.whl
Size 11.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fe45a3b00e5642a02acd725bd8e5c05aa2322da750b699be0a4ae08d1247c6da
BLAKE2b-256 checksum
How to use checksums
4d44db2311424f2a1d0526796164f2878385daeb93f0f424c290f023e229b73f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 27, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.5 This release

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page