ngrok HTTP API client library
Project description
Unstable
This library is currently unstable. We know of rough edges and are working to bring it to parity with our other API client libraries. Please feel free to try it out and let us know if you find it useful!
ngrok API client library for Python
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
client = ngrok.Client("<API KEY>")
# list all online tunnels
for t in client.tunnels.list():
print(t)
# create an ip policy that allows traffic from some subnets
policy = client.ip_policies.create()
for cidr in ["24.0.0.0/8", "12.0.0.0/8"]:
client.ip_policy_rules.create(cidr=cidr, ip_policy_id=policy.id, action="allow")
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.8.0.tar.gz
(37.6 kB
view hashes)
Built Distribution
ngrok_api-0.8.0-py3-none-any.whl
(38.5 kB
view hashes)
Close
Hashes for ngrok_api-0.8.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb228da427c3d2d405cfc115e3cf034a7891243f43ce6872ad464968ceec0d69 |
|
MD5 | b1d4c5eb5734ae8971e508d0b6ca1495 |
|
BLAKE2b-256 | 8b8bf3ab660f1a5f4adec8b8ea9b17775335d53ec7c99f37c5587844b55d707f |