Connect Streamlit to TigerGraph
Introduction
This guide explains how to securely access a TigerGraph database from Streamlit Cloud. It uses the pyTigerGraph library and Streamlit's secrets management.
Create a TigerGraph Cloud Database
First, follow the official tutorials to create a TigerGraph instance in TigerGraph Cloud, either as a blog or a video. Note your username, password, and subdomain.
For this tutorial, we will be using the COVID-19 starter kit. When setting up your solution, select the “COVID-19 Analysis” option.
Once it is started, ensure your data is downloaded and queries are installed.
Add username and password to your local app secrets
Your local Streamlit app will read secrets from a file .streamlit/secrets.toml in your app’s root directory. Create this file if it doesn’t exist yet and add your TigerGraph Cloud instance username, password, graph name, and subdomain as shown below:
