ngrok HTTP API client library
Project description
ngrok API client library
This library wraps the ngrok HTTP API to make it easier to consume in Python.
Installation
This library is published on PyPi
pip install ngrok-api
Documentation
A quickstart guide and a full API reference are included in the ngrok python API documentation
Quickstart
Please consult the documentation for additional examples.
import ngrok
# construct the api client
ng = ngrok.Client("<API KEY>")
# list all online tunnels
for t in ng.tunnels():
print(t)
# create an ip policy the allows traffic from some subnets
policy = ng.ip_policies.create(action="allow")
for cidr in ["24.0.0.0/8", "12.0.0.0/8"]:
ng.ip_policy_rules.create(cidr=cidr, ip_policy_id=policy.id)
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
ngrok-api-0.1.2.tar.gz
(27.9 kB
view hashes)
Built Distribution
ngrok_api-0.1.2-py3-none-any.whl
(28.7 kB
view hashes)
Close
Hashes for ngrok_api-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 565c6e9e8e8a4d064f29631ba82079f02d447d0b3799a70c283d1aafc8797fe0 |
|
MD5 | 92b13f9e43e2fa7d62c98bc37748acd7 |
|
BLAKE2b-256 | e426b610aa060de5b1e19797bf445d6fe7d26edba38b96cb26d681325cb1f36a |