The ngrok Agent SDK for Python
Reason this release was yanked:
Use "ngrok" project going forward.
Project description
The ngrok Agent SDK for Python
Note: This is alpha-quality software. Interfaces are subject to 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+.
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
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
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
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 Distributions
Built Distributions
File details
Details for the file bobzillapypi-0.2.1-cp37-abi3-win_amd64.whl
.
File metadata
- Download URL: bobzillapypi-0.2.1-cp37-abi3-win_amd64.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.7+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 967f87332b2b5e8582c56bc9ac7da58c1b2d6d2cfca665e5af24c09a9443eeca |
|
MD5 | 57cec1a4444da337a6d5762417bf4654 |
|
BLAKE2b-256 | 8d1e33b17b3a0b7bff0e4c3679729e04156d1a8c14624b234224e1cf643ec40c |
File details
Details for the file bobzillapypi-0.2.1-cp37-abi3-win32.whl
.
File metadata
- Download URL: bobzillapypi-0.2.1-cp37-abi3-win32.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.7+, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ab0eaf36e1f5fecdbd46a7c78e50a590dc6e941a91b2913a2836a46e9955bc7 |
|
MD5 | d8b46f36441d700311b2b1bf7a7b8b72 |
|
BLAKE2b-256 | 629221b14ef8f7eab63ebd3d7fadc0ffd8bd564f2a0001ceaefc16bd92c7e7b3 |
File details
Details for the file bobzillapypi-0.2.1-cp37-abi3-musllinux_1_2_x86_64.whl
.
File metadata
- Download URL: bobzillapypi-0.2.1-cp37-abi3-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.7+, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b32e8f063c10459db13bffb26518c616f116259d80e416a2a760f01963c2e25 |
|
MD5 | a679864953ea37c940d884a0faa9fb4b |
|
BLAKE2b-256 | c3e6c1e5128a5f751ee323b5a3be7397880b08ea5b749a83db41b17635141b94 |
File details
Details for the file bobzillapypi-0.2.1-cp37-abi3-musllinux_1_2_aarch64.whl
.
File metadata
- Download URL: bobzillapypi-0.2.1-cp37-abi3-musllinux_1_2_aarch64.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.7+, musllinux: musl 1.2+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c662c7fa854f884e2baff6397a356811c436c73438f9139881cad204423765f5 |
|
MD5 | 7537b9800d6a041c8ac0f268017880c8 |
|
BLAKE2b-256 | 3286a1c6fbeb8e23a937c1aaa95b57b4d1eabf0299943752dfde09853dbf61fc |
File details
Details for the file bobzillapypi-0.2.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: bobzillapypi-0.2.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.7+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92d9cda5441bab942bfc0cbaf0ca57b7ddf67dd50dd8d24573682369bdc2663d |
|
MD5 | e5a223fc2fd08f7c25a5c9eac8680132 |
|
BLAKE2b-256 | e787032407459b956766c64ecf7eb1b820b74ee8669542c174803594a7cd54d3 |
File details
Details for the file bobzillapypi-0.2.1-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
.
File metadata
- Download URL: bobzillapypi-0.2.1-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.7+, manylinux: glibc 2.17+ ARMv7l
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8c777242c4ef758955a9a637be28f26d5c2a0df0068d3ff6cab56df2a86317d |
|
MD5 | 251607904dcfb90a4ceae1f7700aaff8 |
|
BLAKE2b-256 | 74d01e8466375edd35c3390cc9600edbb96e8438b84c745394d52c44e8af148b |
File details
Details for the file bobzillapypi-0.2.1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: bobzillapypi-0.2.1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.7+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f07ee3e11f11f3e050684831a2e0db1ef5c4c37599dab403655d77308bc5751 |
|
MD5 | 52f905b02a3d885799515694ae074c46 |
|
BLAKE2b-256 | c4d8d45072051ce04a22573004320cc9f27323bd430326f9f3ddc5a5adbc742e |
File details
Details for the file bobzillapypi-0.2.1-cp37-abi3-macosx_11_0_arm64.whl
.
File metadata
- Download URL: bobzillapypi-0.2.1-cp37-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.7+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc1dd296ea81defbae0b255a469d34943c447edc418e8fa115da215d450b2e46 |
|
MD5 | 7b10fdcdd3c656b965fadc3c4b83caac |
|
BLAKE2b-256 | 714db222472e7cd4762c6fe1f0ea71bb2ec996fcba3d39d9c960aedb05240e3e |
File details
Details for the file bobzillapypi-0.2.1-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
.
File metadata
- Download URL: bobzillapypi-0.2.1-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
- Upload date:
- Size: 3.3 MB
- Tags: CPython 3.7+, macOS 10.9+ universal2 (ARM64, x86-64), macOS 10.9+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33c7cb0e63720bacfe2cb6791c6b5b4f6ab8be2a6d0f897ec41be3b74ab4c04c |
|
MD5 | 5eb19b9cdffa71edd2139f3a258b3a88 |
|
BLAKE2b-256 | e0713d64378c5a4d0c944cb775be534665d35d99126c2b45060a708de3c80223 |
File details
Details for the file bobzillapypi-0.2.1-cp37-abi3-macosx_10_7_x86_64.whl
.
File metadata
- Download URL: bobzillapypi-0.2.1-cp37-abi3-macosx_10_7_x86_64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.7+, macOS 10.7+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 042a7375168431a2b96d4c2bced5130458694b2b8baf6a8e80a1988a7cf0e4b0 |
|
MD5 | b423ef515c2ad95ca0e89654a1a371bb |
|
BLAKE2b-256 | 8ac41287f75ac31bf6566b2bf83c3d4a0919984748166324b792870c02201bee |