This project shows an example of a Python project that uses uv for dependency management and Databricks Asset Bundles for deployment.
Prerequisites:
- Python 3.9+
uv- Databricks CLI
- Databricks workspace with Unity Catalog and Serverless enabled
Steps:
- Clone the repository
- Setup the uv env:
uv sync
Add the DATABRICKS_CONFIG_PROFILE environment variable to your .env file:
DATABRICKS_CONFIG_PROFILE=<your-profile-name>Then, run the tests via pytest:
pytestTo deploy the app, login to your Databricks workspace from Databricks CLI:
databricks auth login Deploy the workflow:
databricks bundle deploy --var="catalog=your_catalog" --var="schema=default" -t dev- Databricks Asset Bundles - The tool to create, manage, and deploy Databricks Workflows
- uv - An extremely fast Python package and project manager, written in Rust
- hatch-vcs - Plugin that uses your preferred version control system (like Git) to determine project versions
- pydantic - data validation library for Python