2022-04-11 19:32:51 +00:00
2022-03-29 16:42:58 -07:00
2022-03-29 16:42:58 -07:00
2021-05-21 15:02:28 +00:00
2021-05-11 15:54:03 -07:00
2021-05-11 15:54:03 -07:00
2021-05-11 15:54:03 -07:00
2022-04-11 19:32:51 +00:00
2022-04-11 19:32:51 +00:00
2021-05-21 15:02:28 +00:00

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")
S
Description
ngrok API client library for Python
Readme MIT 2.9 MiB
Languages
Python 100%