Loading Databricks updates...
← All video guides
Databricks Apps

Databricks Apps Tutorial: Deploy Python Apps in Minutes

Learn to build and deploy Databricks applications in minutes using Python, Streamlit, Dash, FastAPI, or React.

In short

Learn to build and deploy Databricks applications in minutes using Python, Streamlit, Dash, FastAPI, or React. This tutorial walks through creating a chatbot app, configuring permissions, and using the Databricks Apps Cookbook for copy-paste code recipes.

Source: official Databricks documentation · Databricks announcement

Key takeaways

  • Databricks Apps allow deploying Python web applications using Streamlit, Dash, FastAPI, or React directly on the platform.
  • Built-in templates enable quick app creation with minimal code for common patterns like chatbots or data readers.
  • Apps can access Databricks compute resources, SQL warehouses, serving endpoints, and invoke AI models via native APIs.
  • The Databricks Apps Cookbook provides copy-paste code recipes for reading tables, uploading files, and invoking LLMs.
  • All app access is controlled through Unity Catalog permissions so no additional access management is needed.

Chapters

  • 0:00 — Databricks Apps Introduction: Python Web Apps on Databricks
  • 0:34 — What are Databricks Apps & Real-World Use Cases
  • 1:10 — Quick Start: Supported Frameworks & Templates
  • 2:20 — Live Demo: Building a Chatbot App
  • 3:50 — Configuring Resources & Unity Catalog Permissions
  • 5:00 — Databricks Apps Cookbook: Code Recipes for Common Patterns
  • 6:30 — Cookbook: Reading Data, Uploading Files & Invoking Models
  • 9:28 — Cookbook Website, GitHub, and Installation
  • 10:59 — Community Contribution & Getting Started Today

Frequently asked questions

What frameworks does Databricks Apps support?

Databricks Apps supports any Python-based web application including Streamlit, Dash, Gradio, FastAPI with custom HTML/React frontends, and other frameworks.

How do I grant my app permissions to access data?

App permissions are controlled through Unity Catalog. You configure access during app creation by specifying which resources the app can access like tables, warehouses, or serving endpoints.

Can I deploy the Databricks Apps Cookbook locally?

Yes, the cookbook app can run locally while connecting remotely to Databricks resources, or you can deploy it directly to your workspace for interactive examples.

How do I get started quickly?

Go to Compute > Apps > Create App, select a template like Dash or Streamlit, give it a name and description, configure resources, and click Install. The app deploys within minutes.

Full transcript

Auto-generated from the video and lightly edited for readability. Timestamps link to the moment in the video.

Show full transcript (34 segments)

0:05Hey, today we are going to talk about Databricks apps and I have two awesome essays, Pascal and Antonio. Hey guys. Hey, it's great to be here. Hey sir. So can you introduce maybe yourself? Let's start first with Pascal. Perfect. Yeah, so thanks for inviting us. My name is Pascal. I'm a solutions architect based in Hamburg in Germany and yeah I work

0:28with some of our logistics customers here and help them to be successful on Databricks hopefully and yeah I joined Databricks last year and my background is around like cloud infrastructure web applications so I'm yeah really excited that we can also host these types of applications on Databricks and yeah happy to talk about this today and what about you Antonio thank you Sev thank you Pascal so my name is Antonio I'm

0:50also a datab bricks solutions architect and I also come from a cloud infrastructure background and worked at AWS before and uh I've been in Databricks uh for a few months now and Databricks amazing so let's suppose I am new completely new to datab bricks can you uh define uh what's a datab bricks app and maybe what are the an

1:13example of use cases where I can benefit from this feature yeah for sure so maybe in general I would say databicks apps it's kind of a new way to host web applications in databicks apps focused on for now Python based web applications and we always talk about these like data in the eye applications that you can host in datab bricks apps uh which basically means anything where users interact with the data you have in data

1:36bricks like tables or volumes and so on but also AI models large language models and so on apps is basically the place where you can build the UI for all of these interactions um yeah maybe that's the quick summary that's interesting um how can I get started quickly with Databricks apps. Do we have any template and maybe

1:58what are the framework that are currently supported? Mhm. Um yeah, so the quickest way to get started just is just to go into the like database UI and then when you go to compute apps create an app and there we have a couple of templates integrated into the product basically where you can deploy like a simple app that reads data from a data table or a chatbot app. uh we have some

2:22templates that you can use that um are built on these popular frameworks like Dash or Streamlit or Graddio and when you ask about like what frameworks are supported in principle we support any like Python based application that you can build. So it can be one of these uh full stack frameworks so to say like Dash or Streamllet but it can also be any Python back end that you write like

2:45fast API or something like that and then your own HTML front end react front end. So there's really a lot of like liberty around how you build your app and we just deploy it for you. And can you maybe show us an example? Yeah, absolutely. So let me just quickly share my screen here. Let me know once you're able to see it. Yeah, all good. All good. Cool. So now we are in the data

3:09bricks uh workspace console. And if we go here towards the compute section, then here towards the apps section within compute, then it is just as simple as clicking on create app right here on the on the right. And then here we have a couple of options on how to create our new app. And the first one is to go and take one of the templates that are already built in by provided by us

3:31on Databricks. As you can see here and also as Pascal was mentioning before, there are different uh frameworks that we can use out of the box. For example, let's say that we want to use dash and for to create a chatbot um so that we can interact with our data on Databricks uh using natural language. So this is something that we can do by clicking here and then next. Then we can just give it a name. Let's say chatbot

3:54test app. We can also give it a description and then here's where we actually define what the app can access and there are a couple of things that we can tweak. There are also this is actually part of the advanced settings. So you can just leave it as such uh without tweaking anything and just create an install app. Um and then if we go back we also have the option to

4:16create our own custom application. And so here if we create uh click on next we can give it a name as well. So for example test app custom um this is a test description. And then here under advanced settings um we can add the different resources that the app can can access. So if you're familiar with Databricks uh you probably have used some of

4:39the features that we already offered like such as uh Databricks uh workflows jobs SQL warehouses. So these things are here available for the app to access and then we can also tweak other other settings uh such as permissions um and and also control what the app can access and in which way it can access it. So here is just a way to create the app. Um

5:01I'm just going to go back and do it with a template with a chatbot and I'm just going to click on install app. You should select an end pointed. So let's say that I I selected for example this one for the serving endpoint. I'm going to click on install app and then it's going to take some time for the compute to start. Um and then as you can see I already can

5:24see a lot of things here in the screen. So for example um I can see where the deployment uh source is located. I can also see the app resources that are are going to be deployed. Uh so for example here I can see that this app is going to be able to use a serving endpoint uh to be queried. And then here there's also the option to tweak this in your own uh

5:46IDE. So if you're used to some specific development environment, uh you can integrate with your Databricks uh apps as well in order to still have that developer experience that you're used to using. So at the end of the day, it's just as simple as that. Then from here, we can do a lot of things. We can uh tweak the app, we can uh also uh play around with the permissions, but at the end of the day, in order to get started,

6:09this is pretty much all all you need. I think it's it's h very straightforward. And I think Pascal, you worked on a cookbook where people can deploy apps uh quickly some very very good examples. Can you can you show us what you cooked? Yeah, for sure. So uh when you start building out your first app, you will have questions like I don't know how

6:31what's the best practice to read from a delta table? What's the best practice to upload a file or let users upload a file in my app? And for exactly these typical use cases, we built a repository of samples that you can just go to and copy paste um code snippets and you can also try out all of these code snippets. Uh so let me also show this briefly here. Um so in this case I have already

6:55deployed uh this cookbook app. I will show in a second how that works. Um and once you deploy it you have like access to a lot of interactive uh samples for Databricks apps in your own workspace. Um, in principle, you can also run this locally. Of course, you don't have to uh deploy it to a workspace. You can also run it locally and then connect kind of remotely to the databicks resources. Um, and here you get like an impression of

7:17all of the recipes that we have available. Like I said, reading data from tables, from volumes, invoking models, how to embed a dashboard, how to talk to the Genie API, how to trigger a workflow or a job. Um, we've built a lot of recipes. We're also looking for more ideas like tell us what you want to see as a sample or you can even contribute your own in the GitHub repo. Um then for

7:41example if I want to read a table um I can go here to the sample can select the DB demos warehouse here where I have authorized my application so that it has the appropriate permissions already. Um I can set a select the catalog let's just go for samples and then let's say house. So this should be in every database workspace. can just try this out and then this just shows you how uh

8:06the app can read some data from this sample table and then if you want to implement this in your own app you can just go to code snippet you can copy paste this and it's kind of a self-contained uh sample that will work out of the box and then not to forget the requirements so you always have to give out some permissions because everything your app does go through uni unity catalog permissions right that's why you have to give your app

8:28permissions on the table you have to give it permissions on the SQL warehouse. Um, that's what we explained also here in this requirement section. And yeah, all kinds of other examples. Upload a file would work as you would imagine. Invoking a model. Uh, let's try our new new cloud models here maybe. Um, we can select a lamp. We can tweak like the temperature here as an

8:51example. Um, and then we can just ask what is Databricks for example. And then we have here some very simple code that just um yeah gets a response from the LM. Um and yeah this these cloud models should now be available in most dataix workspaces as paper token models. So you can get these types of responses here

9:13and here the same and copy the code snippet and look at the requirements and just get started really quickly. And so this is the interactive database apps cookbook. That's one part of the story. Um, if you don't want to deploy the cookbook yourself, we also have a website. Um, just go to appsminuscookbook.dev. Um, you can also look at all of the samples, for example, for streaml um, in a on a static website

9:38basically, so you don't have to deploy them if you don't want to. Um, this where we also starting now to build like a repository of best practices for um, developing with Databricks apps. For example, how to deploy them efficiently and so on. So yeah, if you're looking for information about around Dix apps, a good place to start is besides our docs is

10:00appscookbook.dev. Um maybe also to show how to install it. So if you want to try this out um you can or if you go on to website and you go on GitHub here you will get to our repository database apps cookbook and then you can just copy this um repository URL and in your database workspace you can import this as a git folder um so just put put in the URL um

10:24and we will get the latest version of the code from git um and then um let me show you what it looks like. you will just have it here as the cookbook as a as a git folder. Um and then when you have created a app resource, you can just pick that folder here when you click on deploy. Um and then the cookbook will deploy automatically. So just pick the stream

10:47it or dash sample and then it will start a deployment. It's that easy. Um so that's the cookbook in a nutshell. I love it. like it's it's it makes things way easier because you like you can select every component, copy the code and then build your app break by brick by brick. So it's it's really cool. I mean especially for those who never used

11:09like streamllet or dash or uh um any of those frameworks, they can build their app quickly. they can like just I don't know trigger workflow that gonna compute the KPI then query those KPI then maybe put them in a genie or a dashboard and everything can be done let's say easily so um you want to going to find the links uh on the description of this uh

11:32this this video and also make sure if you have time to contribute uh to the repo and maybe suggest your ideas everything is good anything else to add Pascal Antonio I would say like we totally to your feedback. Let us know what kind of samples for apps you're looking for, what guides do you need, kind of blog posts that you're looking for. All of these questions, you can put

11:54them here in the comments or you can reach out to us directly. And yeah, go build some cool stuff with apps. Uh start with the cookbook and yeah, show us what you built. Yeah, absolutely. Perfect. Just uh following up on on that, Pascal, I'm also very excited to see how customers and and users are going to take this to the next level. Um and also see to see how we can bridge

12:18that gap between uh the technical and the and the nontechnical and even for those more technical users how you can use these apps and this cookbook to enable those use cases uh that really require that next level customization on on the data consumption layer. So so really excited for that and yeah thank you for giving us the opportunity to

12:40showcase it. Perfect. Thank you guys for your hard work and see you soon. Absolutely. Perfect. Thanks a lot.

Official Databricks resources

Related

Databricks Answers

Looking for a quick, source-backed answer? Browse Databricks Answers on Databricks Apps — direct, documentation-validated answers to common Databricks questions, curated by Youssef Mrini, Senior Developer Advocate at Databricks.