Alan Shreve c9fe27d618 Merge pull request #11 from ngrok/staging
cut new release for ngrok-api-python
2021-09-17 21:37:56 -07:00
2021-09-18 04:33:13 +00:00
2021-09-18 04:33:13 +00: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
2021-09-18 04:33:13 +00:00
2021-09-18 04:33:13 +00:00
2021-05-21 15:02:28 +00:00

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
ng = ngrok.Client("<API KEY>")

# list all online tunnels
for t in ng.tunnels.list():
    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)
S
Description
ngrok API client library for Python
Readme MIT 2.9 MiB
Languages
Python 100%