Skip to content

ngrok-samples/python-quickstart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ngrok Python SDK Quickstart

A minimal Python app demonstrating the ngrok Python SDK.

What you'll need

Setup

  1. Install dependencies:

    pip install -r requirements.txt
  2. Create a .env file from the example:

    cp .env.example .env
  3. Add your ngrok auth token to the .env file:

    NGROK_AUTHTOKEN=your_actual_authtoken_here
  4. Reserve a domain in the ngrok dashboard and add it to the .env file:

    NGROK_RESERVED_DOMAIN=your_actual_authtoken_here

Running the app

  1. Start the Python service:

    python service.py
  2. In another terminal, start the ngrok agent endpoint:

    python endpoint.py

The ngrok agent endpoint will output a URL that forwards traffic to your local app.

Files

  • service.py - Basic Python HTTP server
  • endpoint.py - ngrok agent endpoint configuration with OAuth
  • .env.example - Environment variable template
  • requirements.txt - Python dependencies

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages