All notable changes to this project will be documented in this file.
This project adheres to Semantic Versioning.
7.2.1 - 2024-11-04
- Include SSL handshake failures in installer retry logic.
- Documentation improvements update links to
ngrok
's documentation.
7.2.0 - 2024-07-18
- Build and stability improvements.
- Test cases for TLS tunnels, and other test improvements.
conf.DEFAULT_NGROK_PATH
defaults to installing the binary alongsidengrok
's configs rather than alongside the code (putting the binary in thevenv
can cause odd behavior, or security concerns).
7.1.6 - 2024-03-24
- Build and stability improvements.
7.1.5 - 2024-03-08
obj
parsing inNgrokLog
.raises
to documentation.- Build improvements.
7.1.4 - 2024-03-05
- Build and style improvements.
conf.VERSION
, moved all version information topyngrok/__init__.py
. Get package version withfrom pyngrok import __version__
instead.
7.1.3 - 2024-02-26
- Build improvements.
- Renamed
make check-style
tomake check
.
7.1.2 - 2024-02-11
- Relative dependency pinning in
pyproject.toml
. - Style and stability improvements (check
flake8
withmake check-style
).
requirements.txt
files to streamline in topyproject.toml
.
7.1.1 - 2024-02-09
- Migrated to
pyproject.toml
. - Fix for instability from an
ngrok
binary change. - Test improvements.
7.1.0 - 2024-02-02
- Documentation improvements.
- Test improvements.
- Support for 3.6 and 3.7. To use
pyngrok
with Python 3.7 or lower, pinpyngrok<7.1
.
7.0.5 - 2023-12-30
- Test improvements, suite now respects
NGROK_AUTHTOKEN
for all necessary tests (skipped if not set, rather than tests failing).
7.0.4 - 2023-12-27
- If a value for
PyngrokConfig.authToken
, it will attempt to use the environment variableNGROK_AUTHTOKEN
if it is set. - Documentation improvements.
- Build improvements.
7.0.3 - 2023-12-04
- Build improvements, including
wheel
support.
7.0.2 - 2023-12-01
pyngrok
to no longer install the config file in a legacy location, now respectsngrok
's default locations.
- Build improvements.
7.0.1 - 2023-11-14
- Documentation improvements.
7.0.0 - 2023-09-20
- Support for Python type hints.
- Documentation improvements.
- Moved
NgrokLog
frompyngrok.process
topyngrok.log
.
- Support for Python 3.5. To use
pyngrok
with Python 3.5, pinpyngrok<7
.
- Minor bugs.
6.1.2 - 2023-09-19
- Documentation improvements.
- Minor bugs.
6.1.0 - 2023-09-12
- Support for
labels
, songrok
's Labeled Tunnel Configuration is now supported, which enables basic support forngrok
's Edge. api_key
toPyngrokConfig
, which can be set sopyngrok
can interface with Edges when usinglabels
.- ngrok.api_request() now takes an
auth
param, so it can now be used to pass theBearer
token tongrok
's API. id
to NgrokTunnel.- Documentation improvements.
- Test improvements.
6.0.0 - 2023-04-12
- Default installer behavior to download
ngrok
v3 by default. - Documentation updates.
- Test updates.
5.2.3 - 2023-04-12
- Support for
basic_auth
parameter inngrok
v3. - Documentation improvements.
- Test improvements.
5.2.2 - 2023-04-11
- Documentation improvements.
- Test improvements.
5.2.1 - 2022-11-29
- Support for Python 3.10 and 3.11.
5.2.0 - 2022-11-28
- Support for
ngrok
v3 (v2 is still used by default). - Documentation and examples for using
pyngrok
withngrok
v3.
- Stability improvements.
- Documentation improvements.
- Test improvements.
5.1.0 - 2021-08-24
reconnect_session_retries
fromPyngrokConfig
, instead relying onngrok
's own built-in retry mechanism on startup fails.
- Logging improvements.
- Documentation improvements.
- Test improvements.
5.0.6 - 2021-08-08
- Darwin 64-bit ARM support, as this was added to
ngrok
itself.
- Darwin 386 support, as this was removed from
ngrok
itself.
- Build improvements.
- Documentation improvements.
5.0.5 - 2021-03-25
reconnect_session_retries
is a new configuration parameter inPyngrokConfig
, which determines the max number of times to retry establishing a new session withngrok
if the connection fails on startup.
- Build improvements.
- Test improvements.
5.0.4 - 2021-03-08
- Build improvements.
5.0.3 - 2021-03-02
- Build improvements.
- Test improvements.
5.0.2 - 2021-02-12
- Migrated build from Travis CI to GitHub Actions.
- Errors when
bind_tls
was set toFalse
. - Documentation improvements.
5.0.1 - 2020-12-28
- Documentation improvements.
- Build improvements.
5.0.0 - 2020-10-25
- Support
for
ngrok
's tunnel definitions when calling ngrok.connect(). If a tunnel definition inngrok
's config matches the givenname
, it will be used to start the tunnel. - Support for
a
ngrok
tunnel definition named "pyngrok-default" when calling ngrok.connect(). Whenname
isNone
and a "pyngrok-default" tunnel definition exists itngrok
's config, it will be used. - process.is_process_running() to
check if
ngrok
is already running without also implicitly starting it. - ngrok.get_version() to get
ngrok
andpyngrok
versions in a tuple. - conf.get_default(), replacing the need
for direct references to
conf.DEFAULT_PYNGROK_CONFIG
. - conf.set_default(), replacing the need
for direct references to
conf.DEFAULT_PYNGROK_CONFIG
. refresh_metrics()
to NgrokTunnel.data
to NgrokTunnel, which holds the original tunnel data.- ngrok.update() to update
ngrok
, if an update is available. - Stability improvements.
- Documentation improvements.
- Logging improvements.
- ngrok.connect() now returns
a NgrokTunnel instead of a
str
of the public URL. The returnedNgrokTunnel
has a reference to the previously returnedpublic_url
in it. - ngrok.connect() changed its signature,
renamed kwarg
port
(the first arg) toaddr
to matchngrok
's documentation. - ngrok.connect() changed its signature,
the
options
kwarg should now be unpacked, pass each option directly to the method as a kwarg. - NgrokTunnel.
__init
__()'s params (data
,pyngrok_config
, andapi_url
) are now required. ngrok.disconnect()
no longer installs and startsngrok
, it simply returns if thengrok
process has not been started.- Renamed
conf.DEFAULT_PYNGROK_CONFIG
toconf._default_pyngrok_config
( use conf.set_default() instead). - Renamed
ngrok.ensure_ngrok_installed()
tongrok.install_ngrok()
. ngrok.install_ngrok()
(formerlyngrok.ensure_ngrok_installed()
) changed its signature, now takes apyngrok_config
(optional) instead ofngrok_path
as its only arg.- Renamed
process._ensure_path_ready()
toprocess._validate_path()
.
- Support for Python 2.7. Legacy documentation for 4.1, the latest version with Python 2.7 support, can be found here.
return_ngrok_tunnel
fromngrok.connect()
. Thekwarg
can still be passed, but it will do nothing, it now always uses theTrue
behavior.
4.2.2 - 2020-10-12
The next release, 5.0.0, contains breaking changes, including dropping support for Python 2.7. 4.2.x is meant to ease
migration between 4.1.x and 5.0.0 and should not be pinned, as it will not be supported after 5.0.0 is released. To
prepare for these breaking changes, see the changelog below. To avoid these breaking changes altogether, or if
Python 2.7 support is still needed, pin pyngrok~=4.1.0
.
- ngrok.connect() replaced
options
withkwargs
, maintained backwards compatibility. Support for passingoptions
as a dict will be removed in 5.0.0, unpack the dict askwargs
. - ngrok.connect() added
return_ngrok_tunnel
to its args, which defaults toFalse
for backwards compatibility. This will default toTrue
in 5.0.0, and the flag will be removed. - conf.get_default(), replacing the need to
directly reference
conf.DEFAULT_PYNGROK_CONFIG
, which will be removed in 5.0.0.
4.1.16 - 2020-10-12
- ngrok.get_version() to get
ngrok
andpyngrok
versions in a tuple. refresh_metrics()
to NgrokTunnel.- Documentation improvements.
- Logging improvements.
4.1.13 - 2020-10-02
An integration example for Google Colab.
- Documentation improvements.
- Test
ngrok.api_request()
usingparams
for filtering with special characters.
- ngrok.api_request()'s
params
is now properly documented as adict
instead of alist
. - Trimmed trailing line return from
ngrok
logs.
4.1.12 - 2020-09-10
- Validation for
log_format
inngrok
'sconfig.yaml
, aspyngrok
depends on key/value logs. - Validation for
log_level
inngrok
'sconfig.yaml
, aspyngrok
depends on the level being eitherinfo
ordebug
.
4.1.11 - 2020-09-08
- Build improvements.
- Documentation improvements.
4.1.10 - 2020-08-14
- When
bind_tls
isTrue
, thepublic_url
return fromngrok.connect()
is nowhttps
.
4.1.9 - 2020-08-12
- The thread that monitors
ngrok
logs now maintains its ownalive
state instead of modifyingPyngrokConfig.monitor_thread
. - The thread that monitors
ngrok
logs is now daemonic, so it no longer blocks the Python process from terminating. - Documentation improvements.
4.1.8 - 2020-07-26
DEFAULT_PYNGROK_CONFIG
variable toconf
module, used whenpyngrok_config
is not passed tongrok
methods.
- Zombie processes remaining in certain cases when
ngrok
exited early or was terminated externally.
4.1.7 - 2020-07-23
TypeError
exception when aNgrokLog
parses a string that contains a missing or malformedlvl
. Default is nowNOTSET
in such cases.
4.1.6 - 2020-07-09
start_new_process
is a new configuration parameter inPyngrokConfig
, which will be passed to subprocess.Popen whenngrok
is started. Requires Python 3 and POSIX.
- Documentation improvements in integration examples.
4.1.5 - 2020-07-06
- Appears
ngrok
itself has a bug around not properly escaping characters in tunnel names, so avoiding this bug for fileserver tunnels by substituting their name.
4.1.4 - 2020-07-05
- Inconsistent support for a local directory (ex.
file:///
) being passed asngrok.connect()
'sport
. This is valid, andngrok
will use its built-in fileserver for the tunnel.
4.1.3 - 2020-06-21
- Issue where
NgrokLog
did not properly split on just the first=
character when parsing a log.
4.1.2 - 2020-06-19
- Python 2 compatibility issue with download progress bar.
4.1.1 - 2020-06-18
- Stability improvements.
- Documentation improvements.
4.1.0 - 2020-06-18
- Progress bar when
ngrok
is being downloaded and installed for the first time. - Version number displayed in CLI's
--help
. installer.install_ngrok()
andinstaller._download_file()
now accept**kwargs
, which are passed down to urllib.request.urlopen, and updated the documentation.
- Documentation improvements.
4.0.3 - 2020-06-17
- Build improvements.
4.0.2 - 2020-06-17
- PyPI package classifiers.
- Build improvements.
4.0.1 - 2020-06-07
- Moved
_DEFAULT_NGROK_CONFIG_PATH
fromngrok
module toconf
module, renamed toDEFAULT_NGROK_CONFIG_PATH
.
- Exception thrown when trying to validate the config when no file is given (i.e. the variable is None and thus the default should be used).
4.0.0 - 2020-06-06
PyngrokConfig
, which contains all ofpyngrok
's configuration for interacting with thengrok
binary rather than passing these values around in an ever-growing list ofkwargs
. It is documented here.log_event_callback
is a new configuration parameter inPyngrokConfig
, a callback that will be invoked each time angrok
log is emitted.monitor_thread
is a new configuration parameter inPyngrokConfig
which determines whetherngrok
should continue to be monitored (for logs, etc.) after it has finished starting. Defaults toTrue
.startup_timeout
is a new configuration parameter inPyngrokConfig
.max_logs
is a new configuration parameter inPyngrokConfig
.start_monitor_thread()
andstop_monitor_thread()
to NgrokProcess.
timeout
parameter that was passed down tongrok.api_request()
is now configurable byrequest_timeout
inPyngrokConfig
.- Max number of logs stored by the
NgrokProcess
from 500 to 100. NgrokProcess.log_boot_line()
renamed toNgrokProcess._log_startup_line()
.NgrokProcess.log_line()
renamed toNgrokProcess._log_line()
.- Auto-generated tunnel names (if
name
is not given when callingngrok.connect()
) are no prefixed withproto
andport
. web_addr
cannot be set tofalse
in, as thepyngrok
modules depends on this API.
installer.install_default_config()
documentation now properly reflects thatdata
is adict
and not astr
.
ngrok_path
,config_path
,auth_token
, andregion
were all removed fromprocess.get_process()
. Use PyngrokConfig instead.ngrok_path
,config_path
,auth_token
, andregion
were all removed fromngrok.get_ngrok_process()
. Use PyngrokConfig instead.ngrok_path
,config_path
,auth_token
,region
, andtimeout
were all removed fromngrok.connect()
. Use PyngrokConfig instead.ngrok_path
,config_path
, andtimeout
were all removed fromngrok.disconnect()
. Use PyngrokConfig instead.ngrok_path
, andtimeout
were all removed fromngrok.get_tunnels()
. Use PyngrokConfig instead.
3.1.1 - 2020-06-06
- Limit number of
NgrokLog
s stored inNgrokProcess
'slogs
variable to last 500.
3.1.0 - 2020-06-04
- After
ngrok
starts, the process moves into its own thread andNgrokLog
s continue to be parsed for programmatic access.
3.0.0 - 2020-05-29
- NgrokLog class is a parsed
representation of
ngrok
's logs for more accessible debugging. logs
variable toNgrokProcess
class, which is aNgrokLog
object.
ngrok_logs
inPyngrokNgrokException
is now a list ofNgrokLog
s instead ofstr
s.- When starting the
ngrok
process, log levels now matchngrok
s in its startup logs.
startup_logs
fromNgrokProcess
, uselogs
instead.
2.1.7 - 2020-05-06
- Documentation and SEO improvements.
2.1.6 - 2020-05-04
- Documentation and SEO improvements.
2.1.5 - 2020-05-01
An integration example for end-to-end testing.
- PyPI package classifiers.
2.1.4 - 2020-04-23
- FreeBSD is now listed as a supported platform and the correct binary is chosen.
2.1.3 - 2020-03-28
- Integration examples to the documentation for common uses cases.
- Build improvements.
2.1.2 - 2020-03-23
- Build improvements.
2.1.1 - 2020-03-21
- Version number displayed in CLI.
2.1.0 - 2020-03-21
region
parameter forngrok.connect()
, andprocess.get_process()
. See ngrok module.auth_token
parameter forngrok.connect()
, andprocess.get_process()
. See ngrok module.- Support for
Cygwin
as a platform by having it use the 64-bit Windows binary.
2.0.3 - 2020-02-14
- Only allow instances of
urlopen
to be executed with ahttp
request.
2.0.2 - 2020-02-08
DEFAULT_RETRY_COUNT
for use ininstaller._download_file()
.
2.0.1 - 2020-02-01
- Removed code that could cause a
ModuleNotFoundError
when another module referenced this module in it'srequirements.txt
.
2.0.0 - 2020-01-28
api_url
variable toNgrokProcess
class.startup_logs
variable toNgrokProcess
class.startup_error
variable toNgrokProcess
class.pyngrok
console alias that mirrorsngrok
.pyngrok
's version is now also reported alongsidengrok
's version when invoked via the console.
- Refactored the boot loop for improved stability and accessibility.
- Properly identify more ARM processors, including
aarch64
.
process
variable fromNgrokProcess
(previously deprecated in1.4.0
, useproc
now instead).
1.4.4 - 2020-01-28
- Build improvements.
1.4.3 - 2020-01-13
- Build improvements.
- Documentation improvements.
1.4.2 - 2019-09-09
- Bumped PyYAML dependency version.
1.4.1 - 2019-09-09
- Issue where arguments passed from the command line to
ngrok
were being dropped (and thusngrok help
was always being displayed).
1.4.0 - 2019-06-25
- Configurable
timeout
parameter forngrok.connect()
,ngrok.disconnect()
, andngrok.get_tunnels()
in ngrok module. - A changelog, code of conduct, and contributing guide.
- A pull request template.
- Documentation now builds and publishes to pyngrok.readthedocs.io.
proc
variable toNgrokProcess
, which will replaceprocess
in the future due to module shadowing (process
is still set for backwards compatibility, but it should no longer be relied upon as it will be removed in a future release).
- Documentation issues.
1.3.8 - 2019-06-22
- Configurable
timeout
parameter for requests to the API. - Configurable
timeout
parameter whenngrok
is being downloaded and installed. PyngrokNgrokURLError
, which is thrown when a request timeout occurs.
- Improvements to the bug reports issue template.
1.3.7 - 2019-06-01
config_path
variable toNgrokProcess
class.- Ability to pass
args
tongrok.run()
. - A bug report issue template.
- A feature request issue template.
- Renamed
CURRENT_PROCESSES
inprocess
module to a private_current_processes
. - Reduced many log levels to
debug
to minimize noise and makeinfo
logs most relevant.
- Sometimes
ngrok
logs errors on startup but doesn't set thelvl=error
flag, sopyngrok
now also checks theerr
variable to see if it contains an error to surface. - If the
ngrok
process started bypyngrok
is killed externally,pyngrok
now handles its own state properly. - Documentation issues.
1.3.4 - 2019-05-26
- Support for all platforms for which
ngrok
is compatible, including ARM processors.
- Cleaned up code around ensuring the
ngrok
binary is present. - Cleaned up code around process termination.
- Cleaned up tests.
- Documentation issues.
1.3.0 - 2019-01-20
config_path
parameter tongrok.disconnect()
.ngrok.run()
method for more flexibility in startingngrok
programmatically.__str__
and__repr__
methods.- Initial Sphinx configuration and dependencies for documentation.
- Code documentation.
1.2.0 - 2019-01-18
- Updates to README with more usage examples.
ngrok
command line usage viaentry_points
in packaging configuration.- Updates to PyPI categorization.
- Improvements to log messages.
- Improvements to exception messages.
1.1.1 - 2018-12-19
- Several more specific exceptions to the
exception
module.
- Renamed the
ngrokexception
module toexception
. - Improvements to the README.
- Issues with the Travis CI build.
- Issues with
ngrok
binary download/installation.
1.0.0 - 2018-12-18
- First stable release of
pyngrok
.