Session#

The ngrok Agent SDK for Python

class ngrok.Session#

An ngrok session.

close()#

Close the ngrok session.

close_listener(id)#

Close a listener with the given ID.

get_listeners()#

Retrieve a list of this session’s non-closed Listeners, in no particular order.

http_endpoint()#

Start building a Listener backing an HTTP endpoint.

labeled_listener()#

Start building a labeled Listener.

tcp_endpoint()#

Start building a Listener backing a TCP endpoint.

tls_endpoint()#

Start building a Listener backing a TLS endpoint.