Skip to main content

The ngrok Agent SDK for Python

Project description

The ngrok Agent SDK for Python

PyPI Supported Versions MIT licensed Apache-2.0 licensed Continuous integration

Note: This is alpha-quality software. Interfaces may change without warning.

ngrok is a globally distributed reverse proxy commonly used for quickly getting a public URL to a service running inside a private network, such as on your local laptop. The ngrok agent is usually deployed inside a private network and is used to communicate with the ngrok cloud service.

This is the ngrok agent in library form, suitable for integrating directly into Python applications. This allows you to quickly build ngrok into your application with no separate process to manage.

If you're looking for the previous agent downloader project, it's over here.

Installation

The published library is available on PyPI.

python -m pip install ngrok

ngrok-py officially supports Python 3.7+.

Documentation

A quickstart guide and a full API reference are included in the ngrok-py Python API documentation.

Quickstart

After you've installed the package, you'll need an Auth Token. Retrieve one on the Auth Token page of your ngrok dashboard

There are multiple examples in the /examples directory. A minimal use-case looks like the following:

async def create_tunnel():
  builder = NgrokSessionBuilder()
  session = await builder.authtoken_from_env().connect()
  tunnel = await session.http_endpoint().metadata("python tun meta").listen()
  print("tunnel: {}".format(tunnel.url()))

  res = await tunnel.forward_tcp("localhost:9000")

Platform Support

Pre-built binaries are provided on PyPI for the following platforms:

OS i686 x64 aarch64 arm
Windows *
MacOS
Linux
Linux musl
FreeBSD *

ngrok-py, and ngrok-rs which it depends on, are open source, so it may be possible to build them for other platforms.

  • Windows-aarch64 will be supported after the next release of Ring.
  • FreeBSD-x64 is built by the release process, but PyPI won't accept BSD flavors.

Dependencies

This project relies on PyO3, an excellent system to ease development and building of Rust plugins for Python.

Thank you to OpenIoTHub for handing over the ngrok name on PyPI.

License

This project is licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in tokio-core by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

ngrok-0.3.0-cp37-abi3-win_amd64.whl (1.9 MB view details)

Uploaded CPython 3.7+Windows x86-64

ngrok-0.3.0-cp37-abi3-win32.whl (1.7 MB view details)

Uploaded CPython 3.7+Windows x86

ngrok-0.3.0-cp37-abi3-musllinux_1_2_x86_64.whl (1.8 MB view details)

Uploaded CPython 3.7+musllinux: musl 1.2+ x86-64

ngrok-0.3.0-cp37-abi3-musllinux_1_2_aarch64.whl (1.9 MB view details)

Uploaded CPython 3.7+musllinux: musl 1.2+ ARM64

ngrok-0.3.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.8 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.17+ x86-64

ngrok-0.3.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (1.6 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.17+ ARMv7l

ngrok-0.3.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.7 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.17+ ARM64

ngrok-0.3.0-cp37-abi3-macosx_11_0_arm64.whl (1.6 MB view details)

Uploaded CPython 3.7+macOS 11.0+ ARM64

ngrok-0.3.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (3.4 MB view details)

Uploaded CPython 3.7+macOS 10.9+ universal2 (ARM64, x86-64)macOS 10.9+ x86-64macOS 11.0+ ARM64

ngrok-0.3.0-cp37-abi3-macosx_10_7_x86_64.whl (1.8 MB view details)

Uploaded CPython 3.7+macOS 10.7+ x86-64

File details

Details for the file ngrok-0.3.0-cp37-abi3-win_amd64.whl.

File metadata

  • Download URL: ngrok-0.3.0-cp37-abi3-win_amd64.whl
  • Upload date:
  • Size: 1.9 MB
  • Tags: CPython 3.7+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/0.14.16

File hashes

Hashes for ngrok-0.3.0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 dd30473dece5390fd48d023ee5d9cc58ce11b014de0ff585f18bd815c5a08696
MD5 8e4f8a9f07c3c531d4227ea2821fd81b
BLAKE2b-256 da3f83778cce0522017cc2d96d674f42c280d1e513be9f968dd189f8bfdf5481

See more details on using hashes here.

File details

Details for the file ngrok-0.3.0-cp37-abi3-win32.whl.

File metadata

  • Download URL: ngrok-0.3.0-cp37-abi3-win32.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: CPython 3.7+, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/0.14.16

File hashes

Hashes for ngrok-0.3.0-cp37-abi3-win32.whl
Algorithm Hash digest
SHA256 7741273e6e5d9e125e6d1cf7f44465f5253749b32fcb2abdbcb0a397463529f5
MD5 c45752f9487eb1a02510338b3a04f246
BLAKE2b-256 62d9281107b04b9a40adc3c9f2af9181bb35d712a425a30a0d6e3bf110ce023e

See more details on using hashes here.

File details

Details for the file ngrok-0.3.0-cp37-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for ngrok-0.3.0-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 7c3c3db6f4320e12b41e197ec5011737ce889dd9bec1962a2110453c66e37e68
MD5 9325f94930ecf940c6000d1e0d0590fe
BLAKE2b-256 1d077f3ed42a2a931bfca8cc6ad30bc60be789c91b8a8c7873bef3ebea8ecc41

See more details on using hashes here.

File details

Details for the file ngrok-0.3.0-cp37-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for ngrok-0.3.0-cp37-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 c30696e3f6bbb443287e91c8ce24f5fa9f217df87be105f18dd06b63838ca9f9
MD5 bac776fc89916a9c364c96feb6e7c1a2
BLAKE2b-256 99af8aff2553bac0c0629ed6ea53b81657a1bc4fecae650e0b9e5a057898e6e9

See more details on using hashes here.

File details

Details for the file ngrok-0.3.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ngrok-0.3.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a271124f32abb789fdc64939013ac70bf5cc307d7e047765d70263f9e1aade24
MD5 184bb73576e89ffcd8d8e8aa87be6d4c
BLAKE2b-256 58fb0c54758b3e4ab21cc671acc68d02c1e9e0c84152e43f6ce83bd32ce108c4

See more details on using hashes here.

File details

Details for the file ngrok-0.3.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for ngrok-0.3.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 70301f8c090299ba247575b2694e2dc08af10477266e22f74a3bf91235654f98
MD5 5b50a0871130fb6ae6368c592c5bf12d
BLAKE2b-256 7e6c4180eca6581a971eebe34f080bcf105f762c55d05aad398657d5b3818bd9

See more details on using hashes here.

File details

Details for the file ngrok-0.3.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for ngrok-0.3.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 d8d851ae958ed9a11037cd5b3ed8af8fb3ff0d4624d177eee8526491860712a5
MD5 ee3b40bf8f4d97da2c581a5192bfc42a
BLAKE2b-256 92e476edcaa6a6b6e0ca36e53f9daff3e55dbe59c9d6db1690127048f44ddeb5

See more details on using hashes here.

File details

Details for the file ngrok-0.3.0-cp37-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ngrok-0.3.0-cp37-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6afda1040fa198ecead94b0b87ed666275dfd569d1a13b8b492e436f4006f224
MD5 70b1c6604cfac8d9e6e4870f508e425b
BLAKE2b-256 fb623b779819b1fb0b8aa1794c32e0f2eedda103e9d0703af6e9e897e3d6b7db

See more details on using hashes here.

File details

Details for the file ngrok-0.3.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for ngrok-0.3.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 828231a7b593855693667837c6ebd99b7e993d57b5fdd409f4a70894e0159f0f
MD5 b40b7dc9cfc93c28c605fe49f6054ad1
BLAKE2b-256 c618c8fc3348fa456ec89d324dc68a4979d8a03a28c72abdfa10b20f1126c541

See more details on using hashes here.

File details

Details for the file ngrok-0.3.0-cp37-abi3-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for ngrok-0.3.0-cp37-abi3-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 a83017a654c401ffde7ca6accccdc35cdd9ba1404a2e65dfc5382f7c00b9264d
MD5 140f1feae38e373599ada2a2ed7e53f3
BLAKE2b-256 c4b5444c3bcb30ce656ac19303885ce4ca2dacf3c8c8da22c0ca624020ea60f0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page