Skip to content

Documentation

Type-check the columns of your Polars frames

Astrolabe is a mypy plugin. It checks the column names and the data types of Polars frames and expressions before the code runs.

Start here

Set up the checker

Install the plugin and type your first frame.

Tutorial

Follow one pipeline

Load, transform and check a pipeline over trades data.

Guides

Learn the types

Schemas, operations, open frames and expression types.

Reference

Look up a detail

Every operation, error code and setting.

Requirements

Set up in one command

Astrolabe needs Python 3.12 or later, mypy 1.13 or later and Polars 1.43.2. Install the package, then runastrolabe init in your project.

Install and set up

pipeline.pymypy: 1 error
1class Trades(Columns):
2 symbol: pl.String
3 price: pl.Float64
4 quantity: pl.Int64
5
6
7trades: TypedDataFrame[Trades]
8trades.select("venue")
error: Unknown column "venue" [unknown-column]