{"id":21102,"library":"dataframely","title":"DataFrameLy","description":"A declarative, Polars-native data frame validation library for Python 3.10+. Current version 2.9.1, released April 2026. Active development with monthly releases.","status":"active","version":"2.9.1","language":"python","source_language":"en","source_url":"https://github.com/quantco/dataframely","tags":["polars","data-validation","schema","declarative","dataframe"],"install":[{"cmd":"pip install dataframely","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Core dependency — dataframely validates Polars DataFrames","package":"polars","optional":false}],"imports":[{"note":"Top-level API uses `dy` prefix; wildcard imports pollute namespace and may conflict with `infer_schema` (removed from __all__ in v2.9.1)","wrong":"from dataframely import *","symbol":"dy","correct":"import dataframely as dy"},{"note":"Column is re-exported at top-level; internal module paths are private and may change","wrong":"from dataframely.column import Column","symbol":"Column","correct":"from dataframely import Column"},{"note":"Schema is re-exported at top-level; internal module paths are private and may change","wrong":"from dataframely.schema import Schema","symbol":"Schema","correct":"from dataframely import Schema"}],"quickstart":{"code":"import polars as pl\nimport dataframely as dy\n\n# Define a schema\nschema = dy.Schema({\n    \"name\": dy.String(),\n    \"age\": dy.Int32(),\n    \"email\": dy.String().email(),\n})\n\n# Validate a DataFrame\ndf = pl.DataFrame({\n    \"name\": [\"Alice\", \"Bob\"],\n    \"age\": [30, 25],\n    \"email\": [\"alice@example.com\", \"bob@example.com\"],\n})\n\nresult = schema.validate(df)\nprint(result.valid)  # True\nprint(result.errors)  # []","lang":"python","description":"Quickstart: define a schema and validate a Polars DataFrame."},"warnings":[{"fix":"Replace `from dataframely import *` with `import dataframely as dy` and use `dy.infer_schema`.","message":"Infer_schema was removed from top-level __all__ in v2.9.1. If you imported `infer_schema` via `from dataframely import *`, it will no longer be available. Use `dy.infer_schema` explicitly.","severity":"breaking","affected_versions":">=2.9.1"},{"fix":"Use `strict=False` parameter to keep extra columns, or define them in the schema.","message":"`validate` and `filter` remove columns not in the schema by default. If your DataFrame has extra columns, they will be silently dropped.","severity":"gotcha","affected_versions":"all"},{"fix":"Upgrade to v2.7.0+ or use integer values for Decimal constraints.","message":"The `dy.Decimal` type constraint only accepts integers in some versions (fixed in v2.7.0). If you used float values, upgrade to >=2.7.0.","severity":"deprecated","affected_versions":"<2.7.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Use `dy.infer_schema` instead of relying on wildcard import. Ensure you have `import dataframely as dy`.","cause":"`infer_schema` was removed from the top-level module's `__all__` in v2.9.1.","error":"AttributeError: module 'dataframely' has no attribute 'infer_schema'"},{"fix":"Add missing columns to schema or pass `strict=False` to keep extra columns.","cause":"`validate` removes columns not in the schema unless `strict=False` is passed.","error":"PolarsSchemaValidationError: Column 'email' not found in DataFrame"},{"fix":"Upgrade to dataframely >=2.7.0 or use integer values for Decimal constraints.","cause":"Using float values for Decimal type constraints before v2.7.0.","error":"TypeError: unsupported operand type(s) for +: 'Decimal' and 'float'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}