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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pgrok-0.1.0.tar.gz
.
File metadata
- Download URL: pgrok-0.1.0.tar.gz
- Upload date:
- Size: 18.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e93214bda38af25f5fc29d9a754ed16cc06ec0fcc69f66f5ae222193b0657d9 |
|
MD5 | 21de48f5d4f5d8282819bd37eb24c29c |
|
BLAKE2b-256 | e635b2cc19d224f5ccfe7867d74e4e022cd1d1bfc53aa7d9d4d74ac444272610 |
File details
Details for the file pgrok-0.1.0-py3.7.egg
.
File metadata
- Download URL: pgrok-0.1.0-py3.7.egg
- Upload date:
- Size: 40.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 423ba19b0c04b1a26af5271713667d1a981912383dd94077daf542557941b2f2 |
|
MD5 | 025018fa26d353453ee6e0c9307f4664 |
|
BLAKE2b-256 | e4d582d96f7f0a5334c0bf7c45687d10b8ccf64d17247a9b5dfaeae07da24772 |