What is the Python SDK?
The Elementary Python SDK brings observability and testing directly into your Python pipelines. It captures any Python test result, from any framework, and reports it to Elementary Cloud. The SDK allows you to:- Define data quality tests - Use decorators to create tests that validate your data
- Report test results - Automatically send test execution results to Elementary Cloud
- Register assets - Define tables, views, and other data assets with metadata
- Track execution context - Capture run metadata, lineage, and dependencies
- Integrate with any framework - Works with Great Expectations, DQX, or your own test code
Key Features
- Framework-agnostic - Works with any Python testing framework (Great Expectations, DQX, custom code)
- Decorator-based API - Simple decorators to define tests (
@boolean_test,@expected_range, etc.) - Context management - Use
elementary_test_contextto automatically capture test results - Unified observability - Python tests appear alongside dbt tests and cloud tests in Elementary
- Full lineage - Connect Python assets to dbt models, warehouse tables, and ML outputs
Use Cases
The Python SDK is ideal for:- Ingestion pipelines - Catch issues before data hits the warehouse
- Python-based transformations - Monitor PySpark, SQL generation, and data processing pipelines
- AI/ML pipelines - Track vectorization, embeddings, model training, and feature generation
- Hybrid pipelines - Monitor structured, semi-structured, and unstructured data flows
- Post-warehouse pipelines - Validate data streaming to downstream destinations, APIs, and operational systems
How It Works
- Install the SDK - Add the Elementary Python SDK to your Python environment
- Define tests - Use decorators (
@boolean_test,@expected_range, etc.) to create data quality tests - Create assets - Define table assets with metadata, owners, tags, and dependencies
- Run tests in context - Use
elementary_test_contextto automatically capture test results - Send results - Use
ElementaryCloudClientto send test results to Elementary Cloud - Monitor - View your data quality metrics unified with dbt tests and cloud tests
Get Started
Follow our quickstart guide to send your first data to Elementary Cloud in minutes.
Read the Blog Post
Learn more about the Python SDK and see real-world examples in our blog post.

