ngrok HTTP API client library
Project description
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
Support
The best place to get support using this library is through the ngrok Slack Community. If you find any bugs, please contribute by opening a new GitHub issue.
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.12.0.tar.gz
(49.7 kB
view hashes)
Built Distribution
ngrok_api-0.12.0-py3-none-any.whl
(44.3 kB
view hashes)
Close
Hashes for ngrok_api-0.12.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24472371648ec1f58d6c5f1157f59b87b5e9aa20ee7d26e13561a7c88ecc853f |
|
MD5 | 2a5023541561b475c95a4e1ec914c823 |
|
BLAKE2b-256 | 8622d6a4f5c18528caf478a0a38d4221b97cc653829b287b66c10e785ee93618 |