Skip to main content

Python client for interacting with Pgrok!

Project description

Python Tunneling client for pgrok

pgrok-py is a Python wrapper for pgrok that manages its own binary and puts it on your path, making pgrok readily available from anywhere on the command line and via a convenient Python API.

pgrok is a reverse proxy tool which is open-source version of ngrok that opens secure tunnels from public URLs to localhost, perfect for exposing local web servers, building webhook integrations, enabling SSH access, testing chatbots, demoing from your own machine, and more, and its made even more powerful with native Python integration through pgrok-py.

This provide additional functionality of self-hosting tunnelling server to aws/droplet instance and also additional benefits to escape monthly recurring charges of ngrok.

Installation

pip install git+https://github.com/sandyz1000/pgrok-py.git

Basic Usage

Pgrok tunnel-backend

from pgrok import pgrok

# Open a HTTP tunnel on the default port 80
# <PgrokTunnel: "http://<public_sub>.pgrok.io" -> "http://localhost:80">
http_tunnel = pgrok.connect()
# Open a SSH tunnel
# <PgrokTunnel: "https://colabshell.ejemplo.me" -> "localhost:8080">
ssh_tunnel = pgrok.connect(addr=8080, proto='http', name='colabshell')

The connect method takes kwargs as well, which allows us to pass additional properties that are supported by pgrok.

This package puts the default pgrok binary on our path, so all features of pgrok are available on the command line.

pgrok http 80

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

pgrok-0.1.0.tar.gz (18.1 kB view hashes)

Uploaded Source

Built Distribution

pgrok-0.1.0-py3.7.egg (40.1 kB view hashes)

Uploaded Source

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