You can host a Datapane app from inside your current Python environment, whether that's your local machine, or a hosted notebook like Colab or Databricks.
Local App Serving¶
To host your app, run
A port will be chosen automatically, but you can manually specify
Creating a public URL¶
Datapane has built-in support for ngrok, which allows you to create a public, shareable URL for your data app. Simply add
public=True to your serve command. This will prompt you to enter your ngrok token, and will return a URL which you can share.
If you are embedding your app in a third-party product, you will need to pass
dp.serve. This disables specific security policies which will not work within an
Datapane Cloud will shortly provide App hosting specific and optimized to the needs of App running and hosting, including access-controls, security and authentication features that organizations require.
At the same time, you can easily host your app via any web server hosting service (especially those that work with Python / WSGI-based apps), including the services listed here.
Fly.io provides a simple way to build and deploy your app. Fly has a generous free tier where you can host your data app on the web. Note that the free tier is limited to 256mb of RAM, so if you are doing any data processing, you may want to upgrade.
You will need:
One of either:
requirements.txtfor pip dependencies
- A Dockerfile
Datapane CLI provides a helper for generating a Dockerfile:
Deploying your app¶
Once done, you can deploy your app with the following commands:
- Create and configure a new app from source code or a Docker image.
- Deploy your app
- Save your config file for future deploys
- Generate a fly.toml file
- Push and build your app on their servers
- Provide you with a URL to access your App
Render provides a simple way to build and deploy your projects from a git repository.
To get started, you'll need:
- A Render account
- Your source code in a git repository
Dockerfile. You can generate this with
datapane app generate dockerfile
Once done, you can setup a deployment from the dashboard:
- Create a new Web Service
- Select your repository
- Name your service
Create(at the end of the page)
This will start building your App, then deploying it. Once complete, you'll be able to find the URL in the Dashboard.