Skip to main content

Run Streamlit apps on Google Colab with ease

Project description

Streamlit Colab

Streamlit Colab

Streamlit Colab is a command-line tool that allows you to run Streamlit applications with ngrok tunneling. This makes your local Streamlit app accessible via a public URL, which is especially useful for sharing your app with others or for testing purposes.

Table of Contents


Introduction

Streamlit Colab enables you to easily share your Streamlit apps by exposing them to the web via ngrok. Whether you're collaborating on a project or showcasing your work, this tool provides a seamless way to make your apps accessible to the world.


Installation

To install Streamlit Colab, use the following command:

pip install streamlit-colab

Usage

Run your Streamlit app with ngrok tunneling using the following command:

stc <app.py> <ngrok_token> [port]

Parameters:

  • <app.py>: Path to your Streamlit application file.
  • <ngrok_token>: Your ngrok authentication token.
  • [port] (Optional): Custom port to run the Streamlit app on. Defaults to 8501 if not specified.

Examples

1. Running with Default Port (8501)

Run your Streamlit app on the default port:

stc /path/to/your/app.py <your_ngrok_token>

2. Running with a Custom Port (e.g., 5005)

Specify a custom port, such as 5005:

stc /path/to/your/app.py <your_ngrok_token> 5005

3. Using an Environment Variable for ngrok Token

Set your ngrok token as an environment variable and omit it from the command:

export NGROK_TOKEN=<your_ngrok_token>
stc /path/to/your/app.py

Override the port if needed:

stc /path/to/your/app.py 5005

Documentation

For more detailed instructions and additional features, visit the official documentation page.


© 2024 Streamlit Colab. All rights reserved.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

streamlit-colab-0.1.6.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

streamlit_colab-0.1.6-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file streamlit-colab-0.1.6.tar.gz.

File metadata

  • Download URL: streamlit-colab-0.1.6.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.15

File hashes

Hashes for streamlit-colab-0.1.6.tar.gz
Algorithm Hash digest
SHA256 469d810096c5504cd5938f4e8405359b2dd1da8a5d3fbe8c79b23a28607b7913
MD5 baf9c6aa1f858b1f57e0dee7c36069ee
BLAKE2b-256 28438ece92d0e96cd937995a5273e2021d96067816bbc75268b8915943dcc6c2

See more details on using hashes here.

File details

Details for the file streamlit_colab-0.1.6-py3-none-any.whl.

File metadata

File hashes

Hashes for streamlit_colab-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 3b69733a0b9bde0fcee95c1012d2c1525beedb0354dbc0ee9f8ae3e7dc8ed30e
MD5 f8463e8e3adfbf60946e17a1e39fe76c
BLAKE2b-256 6cba8f0c230089efeae846cda08d7069a3ab74a01a3a736c77d0c602e6ddda52

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page