Skip to main content

Static URLs for your Gradio demos. One line of code.

Project description

Gradipin

Static URLs for your Gradio demos. One line of code.

Gradio's share=True gives you a public URL that changes every time you restart your demo. Gradipin sits in front of those tunnels and gives you a stable link like https://gradipin.lovable.app/go/<account>/<app> that always points to whichever tunnel is currently live — perfect for tweets, READMEs, and your team's "demos" channel.

import gradio as gr
import gradipin

demo = gr.Interface(lambda x: x.upper(), "text", "text")
gradipin.share(demo, app="vision-model")
# Prints something like:
#   Gradipin: https://gradipin.lovable.app/go/your-account/vision-model
#     → https://abc123.gradio.live

The exact URL format depends on your Gradipin deployment — the canonical public URL is returned by the API and is also exposed as session.public_url if you need it programmatically.

That's it. Restart the script, get a new tunnel, your friends still hit the same URL.

Install

pip install gradipin[gradio]

If you're not using Gradio (e.g. you have your own ngrok / cloudflared tunnel in front of a FastAPI app), the base install is enough:

pip install gradipin

Authenticate

Grab an API key from gradipin.lovable.app/dashboard, then either:

gradipin login           # saves to ~/.gradipin/config

or set the environment variable:

export GRADIPIN_KEY=gp_live_...

or pass it explicitly:

gradipin.share(demo, app="vision-model", key="gp_live_...")

Lower-level API

Have your own public URL? Use the context manager:

import gradipin

with gradipin.session("my-api", url="https://abc.ngrok.io"):
    run_my_fastapi_server()

CLI

gradipin login            # save your API key
gradipin logout           # forget your API key
gradipin list             # list your apps and their status
gradipin status <app>     # check whether a specific app is live

Configuration precedence

API key resolution (first match wins):

  1. Explicit key=... argument
  2. GRADIPIN_KEY environment variable
  3. ~/.gradipin/config (written by gradipin login)
  4. GRADIPIN_KEY in a .env file in the current working directory

Other environment variables:

  • GRADIPIN_API_URL — override the API base URL (default https://gradipin.lovable.app/api/v1). Useful for self-hosted backends or local development.
  • GRADIPIN_HEARTBEAT — heartbeat interval in seconds (default 30).

Development

git clone https://github.com/gradipin/gradipin-python
cd gradipin-python
uv sync --extra dev --extra gradio
uv run pytest

License

MIT

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

gradipin-0.1.2.tar.gz (14.7 kB view details)

Uploaded Source

Built Distribution

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

gradipin-0.1.2-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file gradipin-0.1.2.tar.gz.

File metadata

  • Download URL: gradipin-0.1.2.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for gradipin-0.1.2.tar.gz
Algorithm Hash digest
SHA256 2ecc9adf6383fab69aea45d9cceef23d64c4bfcd86745fb1d01437758ef3f63c
MD5 737547ff48ae2a911a584053effb7d14
BLAKE2b-256 7185c654b1949a7b00044028ad612364d6b9ee80cab1ba2b9028b9c33331a141

See more details on using hashes here.

File details

Details for the file gradipin-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: gradipin-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for gradipin-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 87a7bd9f3a1c0b273797af50292add8adcc6b5b9829e012025a974c9bd60f5be
MD5 ea7e8fbba53b8a865a3385c06ad490b6
BLAKE2b-256 2bdb584df08c92f5cb584f95906fbd4d250c54e3d2b376bcf8e25390a0e78be9

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