polar-tides is a Python library to assist in enforcing/validating polars dataframes against the TIDES data standards using dataframely schema objects.
This library is in alpha and not yet intended for production use. It is undergoing active development, so expect breaking changes.
import dataframely as dy
import polars as pl
import polartides as tides
def create_trips_performed() -> tides.TripsPerformed: # Use dataframely schemas as return-types
"""
Agency-specific code that returns a TIDES:trips_performed-compliant polars dataframe.
Raises dataframely.exc.SchemaError
"""
df: pl.DataFrame = ... # create the dataframe
return tides.TripsPerformed.validate(df) # Returns a TIDES schema-validated polars dataframeThis is not yet available on pypi
Download this repo and copy the polartides folder to your PATH.
Please!
We need tests and sample data.