Skip to content

Installation

Requirements

  • Python 3.10 or higher
  • A supported type checker: ty, mypy, or pyright

Install with pip

pip install colnade colnade-polars

colnade provides the core abstraction layer. colnade-polars provides the Polars backend adapter.

Install with uv

uv add colnade colnade-polars

Install from source

git clone https://github.com/jwde/colnade.git
cd colnade
uv sync

Verify installation

from colnade import Column, Schema, UInt64, Utf8
from colnade_polars import PolarsBackend

class TestSchema(Schema):
    id: Column[UInt64]
    name: Column[Utf8]

print("Colnade installed successfully!")
print(f"Columns: {list(TestSchema._columns.keys())}")

Type checker setup

Colnade works with any Python type checker. Here's how to set up the most common ones.

pip install ty
ty check src/

mypy

Add to your pyproject.toml:

[tool.mypy]
python_version = "3.10"
strict = true

pyright

Add to your pyproject.toml:

[tool.pyright]
pythonVersion = "3.10"
typeCheckingMode = "strict"