Skip to main content

Restores old endpoints prior to streamlit==1.18.0

Project description

streamlit-endpoint-patch

Since streamlit 1.18.0, original endpoint names were migrated to new ones under _stcore (e.g. _stcore/stream) and this breaks some systems, espeically those behind reverse proxies or arrangements with forwarding rules that you cannot change in a heartbeat.

This repo contains a very dirty monkey patch that forces streamlit to use the old endpoints of /stream (and friends like /health).

⚠️This is an unofficial patch and not approved by Streamlit developers. In the long run you should work to get the new endpoints working, and use this temporary solution at your own risk!⚠️

Last tested with streamlit 1.19.0.

Install

pip install streamlit-endpoint-patch

Usage

2 methods.

Method 1 (through pypi):

  1. Install package once
pip install streamlit-endpoint-patch
  1. Execute the following in your virtualenv/pyenv/whatever
streamlit-endpoint-patch

Method 2 (copy-paste):

  1. Copy streamlit_endpoint_patch/endpoint_coersion.py to where you see fit
  2. Activate virtualenv if you have one
  3. Execute the following in your virtualenv/pyenv/whatever
python streamlit_endpoint_patch/endpoint_coersion.py  # or wherever you put the .py

Reverting to original streamlit

pip install streamlit=<your version>

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-endpoint-patch-0.1.0.tar.gz (8.2 kB view details)

Uploaded Source

File details

Details for the file streamlit-endpoint-patch-0.1.0.tar.gz.

File metadata

File hashes

Hashes for streamlit-endpoint-patch-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2de883edc82ade133ad8211e30fcb33bf2ede823e45ebacefb6ef2456812dc2e
MD5 b0ff2b7eae9eba3fbe22154fe7ed7468
BLAKE2b-256 457d061ad907556554e215d73909002294272437ee07a1bc957f48eb2221f15a

See more details on using hashes here.

Supported by

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