{"id":16573971,"url":"https://github.com/sjrusso8/fastapi-lakehouse","last_synced_at":"2025-08-03T20:41:40.967Z","repository":{"id":143448314,"uuid":"513919103","full_name":"sjrusso8/fastapi-lakehouse","owner":"sjrusso8","description":"Connect FastAPI to a Databricks Lakehouse","archived":false,"fork":false,"pushed_at":"2022-07-14T18:16:54.000Z","size":35,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-27T05:11:34.967Z","etag":null,"topics":["databricks","fastapi","fastapi-template","lakehouse"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sjrusso8.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-14T13:48:06.000Z","updated_at":"2025-01-22T13:34:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"52731f17-e10a-4b09-ac11-4c8dd4af90bb","html_url":"https://github.com/sjrusso8/fastapi-lakehouse","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjrusso8%2Ffastapi-lakehouse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjrusso8%2Ffastapi-lakehouse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjrusso8%2Ffastapi-lakehouse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjrusso8%2Ffastapi-lakehouse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sjrusso8","download_url":"https://codeload.github.com/sjrusso8/fastapi-lakehouse/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248724629,"owners_count":21151561,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["databricks","fastapi","fastapi-template","lakehouse"],"created_at":"2024-10-11T21:43:31.916Z","updated_at":"2025-04-13T14:10:48.443Z","avatar_url":"https://github.com/sjrusso8.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FastAPI and Databricks Lakehouse CRUD Example\n\nA FastAPI example using a Databricks backend. The goal is to demonstrate that FastAPI can be connected with the Databricks Lakehouse architecture and perform CRUD activities.\n\n## Setup\n\nThis example uses Poetry. Install [Poetry](https://python-poetry.org/) and run `poetry install` to install the dependenices.\n\n### Prerequisites\n\n1. Have access to a Databricks Workspace\n2. An existing cluster or SQL warehouse\n3. Can create a Databricks PAT token\n\n### Configuration\n\nFollow the [Databricks Guide](https://docs.databricks.com/dev-tools/python-sql-connector.html#get-started) to collect the below cluster details:\n- **Server Hostname**\n- **HTTP Path**\n- **PAT Token**\n\nAdd those values into a `.env` file similar to the one provided in `.env.example`\n\n(Optional) Make sure the cluster you are targeting is already on. If the cluster is off, the first response will take additional time waiting for the cluster to come online.\n\n### Create Fake User Data\n\nImport the `.dbc` file under '/data/create_faker_data.dbc' into your Databricks workspace and run the notebook. This will create a Delta table for `users` under the a database `fastapi`.\n\n## Run FastAPI\n\nIn the parent folder of this repo run the below command to start the FastAPI server.\n\n`uvicorn app.main:app --reload`\n\nAnd you're all set! You now have a FastAPI running on a Lakehouse.\n\n## Acknowledgements\n\nThis example depends [sqlalchemy-databricks](https://github.com/crflynn/sqlalchemy-databricks) created by [crflynn](https://github.com/crflynn).\n\nIt is a thin wrapper for the [databricks-sql-connector](https://docs.databricks.com/dev-tools/python-sql-connector.html) and the [PyHive SQLAlchemy](https://github.com/dropbox/PyHive#sqlalchemy) libraries","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsjrusso8%2Ffastapi-lakehouse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsjrusso8%2Ffastapi-lakehouse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsjrusso8%2Ffastapi-lakehouse/lists"}