├── .gitignore ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── LICENSE ├── README.md ├── doc ├── Makefile ├── make.bat └── source │ ├── abuse_reports.rst │ ├── agent_ingresses.rst │ ├── api_keys.rst │ ├── application_sessions.rst │ ├── application_users.rst │ ├── bot_users.rst │ ├── certificate_authorities.rst │ ├── client.rst │ ├── conf.py │ ├── credentials.rst │ ├── datatypes.rst │ ├── edge_route_backend_module.rst │ ├── edge_route_circuit_breaker_module.rst │ ├── edge_route_compression_module.rst │ ├── edge_route_ip_restriction_module.rst │ ├── edge_route_o_auth_module.rst │ ├── edge_route_oidc_module.rst │ ├── edge_route_policy_module.rst │ ├── edge_route_request_headers_module.rst │ ├── edge_route_response_headers_module.rst │ ├── edge_route_saml_module.rst │ ├── edge_route_traffic_policy_module.rst │ ├── edge_route_user_agent_filter_module.rst │ ├── edge_route_webhook_verification_module.rst │ ├── edge_route_websocket_tcp_converter_module.rst │ ├── edges_https.rst │ ├── edges_https_routes.rst │ ├── edges_tcp.rst │ ├── edges_tls.rst │ ├── endpoints.rst │ ├── errors.rst │ ├── event_destinations.rst │ ├── event_sources.rst │ ├── event_subscriptions.rst │ ├── failover_backends.rst │ ├── http_response_backends.rst │ ├── https_edge_mutual_tls_module.rst │ ├── https_edge_tls_termination_module.rst │ ├── index.rst │ ├── ip_policies.rst │ ├── ip_policy_rules.rst │ ├── ip_restrictions.rst │ ├── reserved_addrs.rst │ ├── reserved_domains.rst │ ├── ssh_certificate_authorities.rst │ ├── ssh_credentials.rst │ ├── ssh_host_certificates.rst │ ├── ssh_user_certificates.rst │ ├── static_backends.rst │ ├── tcp_edge_backend_module.rst │ ├── tcp_edge_ip_restriction_module.rst │ ├── tcp_edge_policy_module.rst │ ├── tcp_edge_traffic_policy_module.rst │ ├── tls_certificates.rst │ ├── tls_edge_backend_module.rst │ ├── tls_edge_ip_restriction_module.rst │ ├── tls_edge_mutual_tls_module.rst │ ├── tls_edge_policy_module.rst │ ├── tls_edge_tls_termination_module.rst │ ├── tls_edge_traffic_policy_module.rst │ ├── tunnel_group_backends.rst │ ├── tunnel_sessions.rst │ ├── tunnels.rst │ └── weighted_backends.rst ├── docs ├── .buildinfo ├── .nojekyll ├── CNAME ├── _modules │ ├── index.html │ └── ngrok │ │ ├── client.html │ │ ├── datatypes.html │ │ ├── error.html │ │ └── services.html ├── _sources │ ├── abuse_reports.rst.txt │ ├── agent_ingresses.rst.txt │ ├── api_keys.rst.txt │ ├── application_sessions.rst.txt │ ├── application_users.rst.txt │ ├── bot_users.rst.txt │ ├── certificate_authorities.rst.txt │ ├── client.rst.txt │ ├── credentials.rst.txt │ ├── datatypes.rst.txt │ ├── edge_route_backend_module.rst.txt │ ├── edge_route_circuit_breaker_module.rst.txt │ ├── edge_route_compression_module.rst.txt │ ├── edge_route_ip_restriction_module.rst.txt │ ├── edge_route_o_auth_module.rst.txt │ ├── edge_route_oidc_module.rst.txt │ ├── edge_route_policy_module.rst.txt │ ├── edge_route_request_headers_module.rst.txt │ ├── edge_route_response_headers_module.rst.txt │ ├── edge_route_saml_module.rst.txt │ ├── edge_route_traffic_policy_module.rst.txt │ ├── edge_route_user_agent_filter_module.rst.txt │ ├── edge_route_webhook_verification_module.rst.txt │ ├── edge_route_websocket_tcp_converter_module.rst.txt │ ├── edges_https.rst.txt │ ├── edges_https_routes.rst.txt │ ├── edges_tcp.rst.txt │ ├── edges_tls.rst.txt │ ├── endpoints.rst.txt │ ├── errors.rst.txt │ ├── event_destinations.rst.txt │ ├── event_sources.rst.txt │ ├── event_subscriptions.rst.txt │ ├── failover_backends.rst.txt │ ├── http_response_backends.rst.txt │ ├── https_edge_mutual_tls_module.rst.txt │ ├── https_edge_tls_termination_module.rst.txt │ ├── index.rst.txt │ ├── ip_policies.rst.txt │ ├── ip_policy_rules.rst.txt │ ├── ip_restrictions.rst.txt │ ├── reserved_addrs.rst.txt │ ├── reserved_domains.rst.txt │ ├── ssh_certificate_authorities.rst.txt │ ├── ssh_credentials.rst.txt │ ├── ssh_host_certificates.rst.txt │ ├── ssh_user_certificates.rst.txt │ ├── static_backends.rst.txt │ ├── tcp_edge_backend_module.rst.txt │ ├── tcp_edge_ip_restriction_module.rst.txt │ ├── tcp_edge_policy_module.rst.txt │ ├── tcp_edge_traffic_policy_module.rst.txt │ ├── tls_certificates.rst.txt │ ├── tls_edge_backend_module.rst.txt │ ├── tls_edge_ip_restriction_module.rst.txt │ ├── tls_edge_mutual_tls_module.rst.txt │ ├── tls_edge_policy_module.rst.txt │ ├── tls_edge_tls_termination_module.rst.txt │ ├── tls_edge_traffic_policy_module.rst.txt │ ├── tunnel_group_backends.rst.txt │ ├── tunnel_sessions.rst.txt │ ├── tunnels.rst.txt │ └── weighted_backends.rst.txt ├── _static │ ├── basic.css │ ├── debug.css │ ├── doctools.js │ ├── documentation_options.js │ ├── file.png │ ├── jquery-3.5.1.js │ ├── jquery.js │ ├── language_data.js │ ├── minus.png │ ├── plus.png │ ├── pygments.css │ ├── pygments_dark.css │ ├── scripts │ │ ├── furo-extensions.js │ │ ├── furo.js │ │ ├── furo.js.LICENSE.txt │ │ ├── furo.js.map │ │ ├── main.js │ │ └── main.js.map │ ├── searchtools.js │ ├── skeleton.css │ ├── sphinx_highlight.js │ ├── styles │ │ ├── furo-extensions.css │ │ ├── furo-extensions.css.map │ │ ├── furo.css │ │ └── furo.css.map │ ├── underscore-1.12.0.js │ └── underscore.js ├── abuse_reports.html ├── agent_ingresses.html ├── api_keys.html ├── application_sessions.html ├── application_users.html ├── bot_users.html ├── certificate_authorities.html ├── client.html ├── credentials.html ├── datatypes.html ├── edge_route_backend_module.html ├── edge_route_circuit_breaker_module.html ├── edge_route_compression_module.html ├── edge_route_ip_restriction_module.html ├── edge_route_o_auth_module.html ├── edge_route_oidc_module.html ├── edge_route_policy_module.html ├── edge_route_request_headers_module.html ├── edge_route_response_headers_module.html ├── edge_route_saml_module.html ├── edge_route_traffic_policy_module.html ├── edge_route_user_agent_filter_module.html ├── edge_route_webhook_verification_module.html ├── edge_route_websocket_tcp_converter_module.html ├── edges_https.html ├── edges_https_routes.html ├── edges_tcp.html ├── edges_tls.html ├── endpoints.html ├── errors.html ├── event_destinations.html ├── event_sources.html ├── event_subscriptions.html ├── failover_backends.html ├── genindex.html ├── http_response_backends.html ├── https_edge_mutual_tls_module.html ├── https_edge_tls_termination_module.html ├── index.html ├── ip_policies.html ├── ip_policy_rules.html ├── ip_restrictions.html ├── objects.inv ├── py-modindex.html ├── reserved_addrs.html ├── reserved_domains.html ├── search.html ├── searchindex.js ├── ssh_certificate_authorities.html ├── ssh_credentials.html ├── ssh_host_certificates.html ├── ssh_user_certificates.html ├── static_backends.html ├── tcp_edge_backend_module.html ├── tcp_edge_ip_restriction_module.html ├── tcp_edge_policy_module.html ├── tcp_edge_traffic_policy_module.html ├── tls_certificates.html ├── tls_edge_backend_module.html ├── tls_edge_ip_restriction_module.html ├── tls_edge_mutual_tls_module.html ├── tls_edge_policy_module.html ├── tls_edge_tls_termination_module.html ├── tls_edge_traffic_policy_module.html ├── tunnel_group_backends.html ├── tunnel_sessions.html ├── tunnels.html └── weighted_backends.html ├── mypy.ini ├── ngrok ├── __init__.py ├── client.py ├── datatypes.py ├── error.py ├── http_client.py ├── iterator.py ├── services.py └── utils.py ├── py.typed ├── pyproject.toml ├── setup.py ├── tests ├── __init__.py └── test_ngrok.py └── tox.ini /.gitignore: -------------------------------------------------------------------------------- 1 | # Code generated for API Clients. DO NOT EDIT. 2 | 3 | doc/build 4 | .pyc 5 | .swp 6 | __pycache__ 7 | /ngrok_api.egg-info 8 | .tox 9 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | 2 | ## 0.14.0 3 | * Renamed `upstream_proto` to `upstream_protocol` for `endpoint` resources 4 | * Added support for `pooling_enabled` on Endpoints 5 | 6 | ## 0.13.0 7 | * Added support for Cloud Endpoints (currently in private beta). 8 | * Renamed `principal_id` to `principal` for `endpoint` resources 9 | 10 | ## 0.12.0 11 | * Renamed the Policy Module to the Traffic Policy Module on HTTP Edge Routes, TCP Edges, and TLS Edges, which allows you to configure rules that can be used to influence and control traffic to and from your upstream service. The Traffic Policy itself is now specified as either a JSON or YAML string. 12 | 13 | ## 0.11.0 14 | 15 | * Added support for the Bot User API. The Bot User API allows you to manage the bots that are registered to your ngrok account. You can automate the creation, management, and deletion of bot users in your account. 16 | 17 | * Added support for the Policy Module on HTTP Edge Routes, TCP Edges, and TLS Edges, which allows you to configure rules that can be used to influence and control traffic to and from your upstream service. 18 | 19 | ## 0.10.0 20 | 21 | ENHANCEMENTS: 22 | 23 | * Added `owner_id` field to the `api_key`, `credential`, and `ssh_credential` resources. If supplied at credential creation, ownership will be assigned to the specified User or Bot. Only admins may specify an owner other than themselves. Defaults to the authenticated User or Bot. 24 | * Added `failover_backend`, `http_response_backend`, and `tunnel_group_backend` resources. A Failover backend defines failover behavior within a list of referenced backends. Traffic is sent to the first backend in the list. If that backend is offline or no connection can be established, ngrok attempts to connect to the next backend in the list until one is successful. 25 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # ngrok Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. 6 | 7 | ## Our Standards 8 | 9 | Examples of behavior that contributes to creating a positive environment include: 10 | 11 | - Using welcoming and inclusive language 12 | - Being respectful of differing viewpoints and experiences 13 | - Gracefully accepting constructive criticism 14 | - Focusing on what is best for the community 15 | - Showing empathy towards other community members 16 | 17 | Examples of unacceptable behavior by participants include: 18 | 19 | - The use of sexualized language or imagery and unwelcome sexual attention or advances 20 | - Trolling, insulting/derogatory comments, and personal or political attacks 21 | - Public or private harassment 22 | - Publishing others' private information, such as a physical or electronic address, without explicit permission 23 | - Other conduct which could reasonably be considered inappropriate in a professional setting 24 | 25 | ## Our Responsibilities 26 | 27 | The ngrok documentation team is responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. 28 | 29 | The ngrok documentation team has the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. 30 | 31 | ## Scope 32 | 33 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the ngrok docs project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. 34 | 35 | ## Enforcement 36 | 37 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [support@ngrok.com](mailto:support@ngrok.com). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. 38 | 39 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. 40 | 41 | ## Attribution 42 | 43 | This Code of Conduct is adapted from the Contributor Covenant, version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. 44 | 45 | For answers to common questions about this code of conduct, see https://www.contributor-covenant.org/faq 46 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2021 ngrok, Inc. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # ngrok API client library for Python 4 | 5 | This library wraps the [ngrok HTTP API](https://ngrok.com/docs/api) to make it 6 | easier to consume in Python. 7 | 8 | ## Installation 9 | 10 | This library is published on [PyPi](https://pypi.org/project/ngrok-api/): 11 | 12 | pip install ngrok-api 13 | 14 | ## Support 15 | 16 | The best place to get support using this library is through the [ngrok Slack Community](https://ngrok.com/slack). If you find any bugs, please contribute by opening a new GitHub issue. 17 | 18 | ## Documentation 19 | 20 | A quickstart guide and a full API reference are included in the [ngrok python API documentation](https://python-api.docs.ngrok.com). 21 | 22 | ## Quickstart 23 | 24 | Please consult the [documentation](https://python-api.docs.ngrok.com) for additional examples. 25 | 26 | import ngrok 27 | 28 | # Construct the API client 29 | client = ngrok.Client("") 30 | 31 | # List all online tunnels 32 | for t in client.tunnels.list(): 33 | print(t) 34 | 35 | # Create an IP policy that allows traffic from some subnets 36 | policy = client.ip_policies.create() 37 | for cidr in ["24.0.0.0/8", "12.0.0.0/8"]: 38 | client.ip_policy_rules.create(cidr=cidr, ip_policy_id=policy.id, action="allow") 39 | -------------------------------------------------------------------------------- /doc/Makefile: -------------------------------------------------------------------------------- 1 | # Code generated for API Clients. DO NOT EDIT. 2 | 3 | # Minimal makefile for Sphinx documentation 4 | # 5 | 6 | # You can set these variables from the command line, and also 7 | # from the environment for the first two. 8 | SPHINXOPTS ?= 9 | SPHINXBUILD ?= ../venv/bin/sphinx-build 10 | SOURCEDIR = source 11 | BUILDDIR = build 12 | 13 | # Put it first so that "make" without argument is like "make help". 14 | help: 15 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 16 | 17 | .PHONY: help Makefile 18 | 19 | # Catch-all target: route all unknown targets to Sphinx using the new 20 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 21 | %: Makefile 22 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 23 | -------------------------------------------------------------------------------- /doc/make.bat: -------------------------------------------------------------------------------- 1 | REM Code generated for API Clients. DO NOT EDIT. 2 | 3 | @ECHO OFF 4 | 5 | pushd %~dp0 6 | 7 | REM Command file for Sphinx documentation 8 | 9 | if "%SPHINXBUILD%" == "" ( 10 | set SPHINXBUILD=sphinx-build 11 | ) 12 | set SOURCEDIR=source 13 | set BUILDDIR=build 14 | 15 | if "%1" == "" goto help 16 | 17 | %SPHINXBUILD% >NUL 2>NUL 18 | if errorlevel 9009 ( 19 | echo. 20 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 21 | echo.installed, then set the SPHINXBUILD environment variable to point 22 | echo.to the full path of the 'sphinx-build' executable. Alternatively you 23 | echo.may add the Sphinx directory to PATH. 24 | echo. 25 | echo.If you don't have Sphinx installed, grab it from 26 | echo.http://sphinx-doc.org/ 27 | exit /b 1 28 | ) 29 | 30 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 31 | goto end 32 | 33 | :help 34 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 35 | 36 | :end 37 | popd 38 | -------------------------------------------------------------------------------- /doc/source/abuse_reports.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | Abuse Reports 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.abuse_reports` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: AbuseReportsClient 12 | :undoc-members: AbuseReportsClient 13 | -------------------------------------------------------------------------------- /doc/source/agent_ingresses.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | Agent Ingresses 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.agent_ingresses` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: AgentIngressesClient 12 | :undoc-members: AgentIngressesClient 13 | -------------------------------------------------------------------------------- /doc/source/api_keys.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | API Keys 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.api_keys` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: APIKeysClient 12 | :undoc-members: APIKeysClient 13 | -------------------------------------------------------------------------------- /doc/source/application_sessions.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | Application Sessions 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.application_sessions` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: ApplicationSessionsClient 12 | :undoc-members: ApplicationSessionsClient 13 | -------------------------------------------------------------------------------- /doc/source/application_users.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | Application Users 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.application_users` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: ApplicationUsersClient 12 | :undoc-members: ApplicationUsersClient 13 | -------------------------------------------------------------------------------- /doc/source/bot_users.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | Bot Users 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.bot_users` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: BotUsersClient 12 | :undoc-members: BotUsersClient 13 | -------------------------------------------------------------------------------- /doc/source/certificate_authorities.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | Certificate Authorities 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.certificate_authorities` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: CertificateAuthoritiesClient 12 | :undoc-members: CertificateAuthoritiesClient 13 | -------------------------------------------------------------------------------- /doc/source/client.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | Client 5 | ===================================== 6 | 7 | :class:`~ngrok.Client` is the root object of the `ngrok-api` library. Construct 8 | a Client with an API Key. Then you can access API Services as properties of the 9 | Client object: 10 | 11 | :: 12 | 13 | import ngrok 14 | 15 | # construct the api client 16 | client = ngrok.Client("") 17 | 18 | # list all ip policies 19 | for policy in client.ip_policies.list(): 20 | print(policy) 21 | 22 | # create an ngrok agent authtoken 23 | cred = client.credentials.create() 24 | print(cred) 25 | 26 | .. automodule:: ngrok 27 | :members: Client 28 | :undoc-members: Client 29 | -------------------------------------------------------------------------------- /doc/source/conf.py: -------------------------------------------------------------------------------- 1 | # Code generated for API Clients. DO NOT EDIT. 2 | 3 | # Configuration file for the Sphinx documentation builder. 4 | # 5 | # This file only contains a selection of the most common options. For a full 6 | # list see the documentation: 7 | # https://www.sphinx-doc.org/en/master/usage/configuration.html 8 | 9 | # -- Path setup -------------------------------------------------------------- 10 | 11 | # If extensions (or modules to document with autodoc) are in another directory, 12 | # add these directories to sys.path here. If the directory is relative to the 13 | # documentation root, use os.path.abspath to make it absolute, like shown here. 14 | # 15 | # import os 16 | # import sys 17 | # sys.path.insert(0, os.path.abspath('.')) 18 | 19 | 20 | # -- Project information ----------------------------------------------------- 21 | 22 | project = 'ngrok-api' 23 | copyright = '2021, ngrok Inc.' 24 | author = 'Alan Shreve' 25 | 26 | 27 | # -- General configuration --------------------------------------------------- 28 | 29 | # Add any Sphinx extension module names here, as strings. They can be 30 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 31 | # ones. 32 | extensions = [ 33 | 'sphinx.ext.viewcode', 'sphinx.ext.autodoc', 'sphinx_autodoc_typehints' 34 | ] 35 | 36 | # Add any paths that contain templates here, relative to this directory. 37 | templates_path = ['_templates'] 38 | 39 | # List of patterns, relative to source directory, that match files and 40 | # directories to ignore when looking for source files. 41 | # This pattern also affects html_static_path and html_extra_path. 42 | exclude_patterns = [] 43 | 44 | 45 | # -- Options for HTML output ------------------------------------------------- 46 | 47 | # The theme to use for HTML and HTML Help pages. See the documentation for 48 | # a list of builtin themes. 49 | # 50 | html_theme = 'furo' 51 | 52 | # Add any paths that contain custom static files (such as style sheets) here, 53 | # relative to this directory. They are copied after the builtin static files, 54 | # so a file named "default.css" will overwrite the builtin "default.css". 55 | html_static_path = ['_static'] 56 | -------------------------------------------------------------------------------- /doc/source/credentials.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | Tunnel Credentials 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.credentials` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: CredentialsClient 12 | :undoc-members: CredentialsClient 13 | -------------------------------------------------------------------------------- /doc/source/datatypes.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | Datatypes 5 | ===================================== 6 | 7 | This module contains all datatypes returned by the ngrok API. 8 | 9 | .. automodule:: ngrok.datatypes 10 | :members: 11 | :undoc-members: 12 | -------------------------------------------------------------------------------- /doc/source/edge_route_backend_module.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | HTTPS Edge Route Backend Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.edge_route_backend_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: EdgeRouteBackendModuleClient 12 | :undoc-members: EdgeRouteBackendModuleClient 13 | -------------------------------------------------------------------------------- /doc/source/edge_route_circuit_breaker_module.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | HTTPS Edge Route Circuit Breaker Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.edge_route_circuit_breaker_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: EdgeRouteCircuitBreakerModuleClient 12 | :undoc-members: EdgeRouteCircuitBreakerModuleClient 13 | -------------------------------------------------------------------------------- /doc/source/edge_route_compression_module.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | HTTPS Edge Route Compression Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.edge_route_compression_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: EdgeRouteCompressionModuleClient 12 | :undoc-members: EdgeRouteCompressionModuleClient 13 | -------------------------------------------------------------------------------- /doc/source/edge_route_ip_restriction_module.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | HTTPS Edge Route IP Restriction Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.edge_route_ip_restriction_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: EdgeRouteIPRestrictionModuleClient 12 | :undoc-members: EdgeRouteIPRestrictionModuleClient 13 | -------------------------------------------------------------------------------- /doc/source/edge_route_o_auth_module.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | HTTPS Edge Route OAuth Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.edge_route_o_auth_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: EdgeRouteOAuthModuleClient 12 | :undoc-members: EdgeRouteOAuthModuleClient 13 | -------------------------------------------------------------------------------- /doc/source/edge_route_oidc_module.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | HTTPS Edge Route OIDC Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.edge_route_oidc_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: EdgeRouteOIDCModuleClient 12 | :undoc-members: EdgeRouteOIDCModuleClient 13 | -------------------------------------------------------------------------------- /doc/source/edge_route_policy_module.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | HTTPS Edge Route Policies Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.edge_route_policy_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: EdgeRoutePolicyModuleClient 12 | :undoc-members: EdgeRoutePolicyModuleClient 13 | -------------------------------------------------------------------------------- /doc/source/edge_route_request_headers_module.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | HTTPS Edge Route Request Headers Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.edge_route_request_headers_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: EdgeRouteRequestHeadersModuleClient 12 | :undoc-members: EdgeRouteRequestHeadersModuleClient 13 | -------------------------------------------------------------------------------- /doc/source/edge_route_response_headers_module.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | HTTPS Edge Route Response Headers Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.edge_route_response_headers_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: EdgeRouteResponseHeadersModuleClient 12 | :undoc-members: EdgeRouteResponseHeadersModuleClient 13 | -------------------------------------------------------------------------------- /doc/source/edge_route_saml_module.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | HTTPS Edge Route SAML Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.edge_route_saml_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: EdgeRouteSAMLModuleClient 12 | :undoc-members: EdgeRouteSAMLModuleClient 13 | -------------------------------------------------------------------------------- /doc/source/edge_route_traffic_policy_module.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | HTTPS Edge Route Traffic Policy Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.edge_route_traffic_policy_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: EdgeRouteTrafficPolicyModuleClient 12 | :undoc-members: EdgeRouteTrafficPolicyModuleClient 13 | -------------------------------------------------------------------------------- /doc/source/edge_route_user_agent_filter_module.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | HTTPS Edge Route User Agent Filter Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.edge_route_user_agent_filter_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: EdgeRouteUserAgentFilterModuleClient 12 | :undoc-members: EdgeRouteUserAgentFilterModuleClient 13 | -------------------------------------------------------------------------------- /doc/source/edge_route_webhook_verification_module.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | HTTPS Edge Route Webhook Verification Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.edge_route_webhook_verification_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: EdgeRouteWebhookVerificationModuleClient 12 | :undoc-members: EdgeRouteWebhookVerificationModuleClient 13 | -------------------------------------------------------------------------------- /doc/source/edge_route_websocket_tcp_converter_module.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | HTTPS Edge Route Websocket TCP Converter Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.edge_route_websocket_tcp_converter_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: EdgeRouteWebsocketTCPConverterModuleClient 12 | :undoc-members: EdgeRouteWebsocketTCPConverterModuleClient 13 | -------------------------------------------------------------------------------- /doc/source/edges_https.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | HTTPS Edges 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.edges_https` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: EdgesHTTPSClient 12 | :undoc-members: EdgesHTTPSClient 13 | -------------------------------------------------------------------------------- /doc/source/edges_https_routes.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | HTTPS Edge Routes 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.edges_https_routes` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: EdgesHTTPSRoutesClient 12 | :undoc-members: EdgesHTTPSRoutesClient 13 | -------------------------------------------------------------------------------- /doc/source/edges_tcp.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | TCP Edges 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.edges_tcp` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: EdgesTCPClient 12 | :undoc-members: EdgesTCPClient 13 | -------------------------------------------------------------------------------- /doc/source/edges_tls.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | TLS Edges 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.edges_tls` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: EdgesTLSClient 12 | :undoc-members: EdgesTLSClient 13 | -------------------------------------------------------------------------------- /doc/source/endpoints.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | Endpoints 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.endpoints` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: EndpointsClient 12 | :undoc-members: EndpointsClient 13 | -------------------------------------------------------------------------------- /doc/source/errors.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | .. _errors: 5 | 6 | Errors 7 | ===================================== 8 | 9 | When any method invoked against the ngrok API returns an error, a Exception of 10 | :class:`ngrok.Error` will be raised. 11 | 12 | The exception includes details that will allow you to robustly handle any error 13 | returned by the API. The :attr:`ngrok.Error.error_code` field allows you to 14 | handle any error in the ngrok system. Consult our `API Errors Documentation 15 | `_ for the list of error codes the API may 16 | return. 17 | 18 | Handling Errors 19 | --------------- 20 | 21 | If the API returns an unexpected 404, a :class:`ngrok.NotFoundError` will be 22 | raised. Ensure that you check for it first because it is a subclass of :class:`ngrok.Error`. 23 | 24 | .. code-block:: 25 | 26 | try: 27 | client.ip_policies.get(id) 28 | except ngrok.NotFoundError as e: 29 | client.ip_policies.create() 30 | except ngrok.Error as e: 31 | # something else happened 32 | 33 | 34 | Other validation errors are best distinguished by their error code. Consult our 35 | documentation for the `list of all ngrok error codes `_. 36 | 37 | :: 38 | 39 | try: 40 | client.edges.https.create(hostports=["url-without-port.ngrok.io"]) 41 | except ngrok.Error as e: 42 | if e.error_code == "ERR_NGROK_7104": 43 | # handle a specific condition 44 | else: 45 | raise 46 | 47 | 48 | If the ngrok API fails with an undefined response or there is some kind of 49 | network error, there are no guarantees about the type of exception thrown 50 | at that point it is best to use a naked ``except`` block or to catch a ``RuntimeError``. 51 | 52 | :: 53 | 54 | try: 55 | client.ip_policies.create() 56 | except RuntimeError: 57 | # an unexpected network error that you could retry 58 | 59 | 60 | Exception Classes 61 | ----------------- 62 | 63 | .. automodule:: ngrok 64 | :members: Error, NotFoundError 65 | -------------------------------------------------------------------------------- /doc/source/event_destinations.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | Event Destinations 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.event_destinations` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: EventDestinationsClient 12 | :undoc-members: EventDestinationsClient 13 | -------------------------------------------------------------------------------- /doc/source/event_sources.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | Event Sources 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.event_sources` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: EventSourcesClient 12 | :undoc-members: EventSourcesClient 13 | -------------------------------------------------------------------------------- /doc/source/event_subscriptions.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | Event Subscriptions 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.event_subscriptions` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: EventSubscriptionsClient 12 | :undoc-members: EventSubscriptionsClient 13 | -------------------------------------------------------------------------------- /doc/source/failover_backends.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | Failover Backends 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.failover_backends` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: FailoverBackendsClient 12 | :undoc-members: FailoverBackendsClient 13 | -------------------------------------------------------------------------------- /doc/source/http_response_backends.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | HTTP Response Backends 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.http_response_backends` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: HTTPResponseBackendsClient 12 | :undoc-members: HTTPResponseBackendsClient 13 | -------------------------------------------------------------------------------- /doc/source/https_edge_mutual_tls_module.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | HTTPS Edge Mutual TLS Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.https_edge_mutual_tls_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: HTTPSEdgeMutualTLSModuleClient 12 | :undoc-members: HTTPSEdgeMutualTLSModuleClient 13 | -------------------------------------------------------------------------------- /doc/source/https_edge_tls_termination_module.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | HTTPS Edge TLS Termination Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.https_edge_tls_termination_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: HTTPSEdgeTLSTerminationModuleClient 12 | :undoc-members: HTTPSEdgeTLSTerminationModuleClient 13 | -------------------------------------------------------------------------------- /doc/source/index.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | 5 | ngrok-api 6 | ######### 7 | 8 | This is the official helper library for working with the `ngrok 9 | HTTP API `_ from Python. 10 | 11 | Getting Started 12 | =============== 13 | 14 | Installation 15 | ------------ 16 | 17 | :: 18 | 19 | pip install ngrok-api 20 | 21 | 22 | Quickstart Example 23 | ------------------ 24 | 25 | After you've installed the package, you'll need an API key. Create one on the 26 | `API Keys page of your ngrok dashboard `_. 27 | 28 | In your application's code, construct an :class:`~ngrok.Client` object 29 | with the API key. API services can be accessed as properties of the client 30 | object. That's it! 31 | 32 | :: 33 | 34 | import ngrok 35 | 36 | # construct the api client 37 | client = ngrok.Client("") 38 | 39 | # list all online tunnels 40 | for t in client.tunnels.list(): 41 | print(t) 42 | 43 | # create an ip policy the allows traffic from some subnets 44 | policy = client.ip_policies.create() 45 | for cidr in ["24.0.0.0/8", "12.0.0.0/8"]: 46 | client.ip_policy_rules.create(cidr=cidr, ip_policy_id=policy.id, action="allow") 47 | 48 | 49 | Automatic Paging 50 | ---------------- 51 | 52 | The ngrok API pages all list resources but this library abstracts that away 53 | from you. All response objects from any ``list()`` methods return an object that 54 | implements an ``__iter__()`` method which will automatically fetch additional 55 | pages for you. 56 | 57 | :: 58 | 59 | import ngrok 60 | 61 | client = ngrok.Client("") 62 | 63 | # list all ip policies, transparently fetching additional 64 | # pages for you if necessary 65 | for p in client.ip_policies.list(): 66 | print(p) 67 | 68 | 69 | Instance Methods 70 | ---------------- 71 | 72 | Instance methods like ``update`` and ``delete`` can be invoked on an instance of an 73 | API object itself as well as directly without needing to first fetch the object. 74 | 75 | :: 76 | import ngrok 77 | 78 | client = ngrok.Client("") 79 | 80 | # update the metadata of a credential 81 | cred = client.credentials.get("cr_1kYyunEyn6XHHlqyMBLrj5nxkoz") 82 | cred.update(metadata=json.dumps({ 83 | "server_name": "giraffe-1", 84 | })) 85 | 86 | # or do it in single call 87 | cred = client.credentials.update("cr_1kYyunEyn6XHHlqyMBLrj5nxkoz", metadata=json.dumps({ 88 | "server_name": "giraffe-1", 89 | })) 90 | 91 | 92 | Error Handling 93 | -------------- 94 | 95 | The ngrok API returns detailed information when an API call fails. Consult the 96 | section on :ref:`errors ` for additional details. 97 | 98 | :: 99 | 100 | import ngrok 101 | 102 | client = ngrok.Client("") 103 | 104 | try: 105 | policy = client.ip_policies.create() 106 | client.ip_policy_rules.create(cidr="24.0.0.0/8", ip_policy_id=policy.id, action="not a valid action") 107 | except ngrok.Error as e: 108 | print("http status code", e.http_status_code) 109 | print("ngrok error code", e.error_code) 110 | print("ngrok error message", e.message) 111 | print("optional additional error-specific details", e.details) 112 | 113 | API Reference 114 | ============= 115 | 116 | .. toctree:: 117 | :caption: API 118 | 119 | client 120 | datatypes 121 | errors 122 | 123 | .. toctree:: 124 | :caption: Services 125 | 126 | abuse_reports 127 | agent_ingresses 128 | api_keys 129 | application_sessions 130 | application_users 131 | tunnel_sessions 132 | failover_backends 133 | http_response_backends 134 | static_backends 135 | tunnel_group_backends 136 | weighted_backends 137 | bot_users 138 | certificate_authorities 139 | credentials 140 | edges_https_routes 141 | edges_https 142 | https_edge_mutual_tls_module 143 | https_edge_tls_termination_module 144 | edge_route_backend_module 145 | edge_route_ip_restriction_module 146 | edge_route_request_headers_module 147 | edge_route_response_headers_module 148 | edge_route_compression_module 149 | edge_route_circuit_breaker_module 150 | edge_route_webhook_verification_module 151 | edge_route_o_auth_module 152 | edge_route_saml_module 153 | edge_route_oidc_module 154 | edge_route_websocket_tcp_converter_module 155 | edge_route_user_agent_filter_module 156 | edge_route_traffic_policy_module 157 | edges_tcp 158 | tcp_edge_backend_module 159 | tcp_edge_ip_restriction_module 160 | tcp_edge_traffic_policy_module 161 | edges_tls 162 | tls_edge_backend_module 163 | tls_edge_ip_restriction_module 164 | tls_edge_mutual_tls_module 165 | tls_edge_tls_termination_module 166 | tls_edge_traffic_policy_module 167 | endpoints 168 | event_destinations 169 | event_subscriptions 170 | event_sources 171 | ip_policies 172 | ip_policy_rules 173 | ip_restrictions 174 | reserved_addrs 175 | reserved_domains 176 | ssh_certificate_authorities 177 | ssh_credentials 178 | ssh_host_certificates 179 | ssh_user_certificates 180 | tls_certificates 181 | tunnels 182 | -------------------------------------------------------------------------------- /doc/source/ip_policies.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | IP Policies 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.ip_policies` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: IPPoliciesClient 12 | :undoc-members: IPPoliciesClient 13 | -------------------------------------------------------------------------------- /doc/source/ip_policy_rules.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | IP Policy Rules 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.ip_policy_rules` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: IPPolicyRulesClient 12 | :undoc-members: IPPolicyRulesClient 13 | -------------------------------------------------------------------------------- /doc/source/ip_restrictions.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | IP Restrictions 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.ip_restrictions` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: IPRestrictionsClient 12 | :undoc-members: IPRestrictionsClient 13 | -------------------------------------------------------------------------------- /doc/source/reserved_addrs.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | Reserved Addresses 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.reserved_addrs` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: ReservedAddrsClient 12 | :undoc-members: ReservedAddrsClient 13 | -------------------------------------------------------------------------------- /doc/source/reserved_domains.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | Reserved Domains 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.reserved_domains` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: ReservedDomainsClient 12 | :undoc-members: ReservedDomainsClient 13 | -------------------------------------------------------------------------------- /doc/source/ssh_certificate_authorities.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | SSH Certificate Authorities 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.ssh_certificate_authorities` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: SSHCertificateAuthoritiesClient 12 | :undoc-members: SSHCertificateAuthoritiesClient 13 | -------------------------------------------------------------------------------- /doc/source/ssh_credentials.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | SSH Credentials 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.ssh_credentials` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: SSHCredentialsClient 12 | :undoc-members: SSHCredentialsClient 13 | -------------------------------------------------------------------------------- /doc/source/ssh_host_certificates.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | SSH Host Certificates 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.ssh_host_certificates` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: SSHHostCertificatesClient 12 | :undoc-members: SSHHostCertificatesClient 13 | -------------------------------------------------------------------------------- /doc/source/ssh_user_certificates.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | SSH User Certificates 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.ssh_user_certificates` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: SSHUserCertificatesClient 12 | :undoc-members: SSHUserCertificatesClient 13 | -------------------------------------------------------------------------------- /doc/source/static_backends.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | Static Backends 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.static_backends` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: StaticBackendsClient 12 | :undoc-members: StaticBackendsClient 13 | -------------------------------------------------------------------------------- /doc/source/tcp_edge_backend_module.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | TCP Edge Backend Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.tcp_edge_backend_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: TCPEdgeBackendModuleClient 12 | :undoc-members: TCPEdgeBackendModuleClient 13 | -------------------------------------------------------------------------------- /doc/source/tcp_edge_ip_restriction_module.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | TCP Edge IP Restriction Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.tcp_edge_ip_restriction_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: TCPEdgeIPRestrictionModuleClient 12 | :undoc-members: TCPEdgeIPRestrictionModuleClient 13 | -------------------------------------------------------------------------------- /doc/source/tcp_edge_policy_module.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | TCP Edge Policy Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.tcp_edge_policy_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: TCPEdgePolicyModuleClient 12 | :undoc-members: TCPEdgePolicyModuleClient 13 | -------------------------------------------------------------------------------- /doc/source/tcp_edge_traffic_policy_module.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | TCP Edge Traffic Policy Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.tcp_edge_traffic_policy_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: TCPEdgeTrafficPolicyModuleClient 12 | :undoc-members: TCPEdgeTrafficPolicyModuleClient 13 | -------------------------------------------------------------------------------- /doc/source/tls_certificates.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | TLS Certificates 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.tls_certificates` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: TLSCertificatesClient 12 | :undoc-members: TLSCertificatesClient 13 | -------------------------------------------------------------------------------- /doc/source/tls_edge_backend_module.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | TLS Edge Backend Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.tls_edge_backend_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: TLSEdgeBackendModuleClient 12 | :undoc-members: TLSEdgeBackendModuleClient 13 | -------------------------------------------------------------------------------- /doc/source/tls_edge_ip_restriction_module.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | TLS Edge IP Restriction Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.tls_edge_ip_restriction_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: TLSEdgeIPRestrictionModuleClient 12 | :undoc-members: TLSEdgeIPRestrictionModuleClient 13 | -------------------------------------------------------------------------------- /doc/source/tls_edge_mutual_tls_module.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | TLS Edge Mutual TLS Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.tls_edge_mutual_tls_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: TLSEdgeMutualTLSModuleClient 12 | :undoc-members: TLSEdgeMutualTLSModuleClient 13 | -------------------------------------------------------------------------------- /doc/source/tls_edge_policy_module.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | TLS Edge Policy Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.tls_edge_policy_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: TLSEdgePolicyModuleClient 12 | :undoc-members: TLSEdgePolicyModuleClient 13 | -------------------------------------------------------------------------------- /doc/source/tls_edge_tls_termination_module.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | TLS Edge TLS Termination Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.tls_edge_tls_termination_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: TLSEdgeTLSTerminationModuleClient 12 | :undoc-members: TLSEdgeTLSTerminationModuleClient 13 | -------------------------------------------------------------------------------- /doc/source/tls_edge_traffic_policy_module.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | TLS Edge Traffic Policy Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.tls_edge_traffic_policy_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: TLSEdgeTrafficPolicyModuleClient 12 | :undoc-members: TLSEdgeTrafficPolicyModuleClient 13 | -------------------------------------------------------------------------------- /doc/source/tunnel_group_backends.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | Tunnel Group Backends 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.tunnel_group_backends` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: TunnelGroupBackendsClient 12 | :undoc-members: TunnelGroupBackendsClient 13 | -------------------------------------------------------------------------------- /doc/source/tunnel_sessions.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | Tunnel Sessions 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.tunnel_sessions` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: TunnelSessionsClient 12 | :undoc-members: TunnelSessionsClient 13 | -------------------------------------------------------------------------------- /doc/source/tunnels.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | Tunnels 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.tunnels` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: TunnelsClient 12 | :undoc-members: TunnelsClient 13 | -------------------------------------------------------------------------------- /doc/source/weighted_backends.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | Weighted Backends 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.weighted_backends` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: WeightedBackendsClient 12 | :undoc-members: WeightedBackendsClient 13 | -------------------------------------------------------------------------------- /docs/.buildinfo: -------------------------------------------------------------------------------- 1 | # Sphinx build info version 1 2 | # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. 3 | config: 587c812df0cc7f5e2849ada60cbf9c7c 4 | tags: 645f666f9bcd5a90fca523b33c5a78b7 5 | -------------------------------------------------------------------------------- /docs/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngrok/ngrok-api-python/11967f08bace1ca6b0a705bb0e88ef8af3b78620/docs/.nojekyll -------------------------------------------------------------------------------- /docs/CNAME: -------------------------------------------------------------------------------- 1 | python-api.docs.ngrok.com 2 | -------------------------------------------------------------------------------- /docs/_modules/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Overview: module code - ngrok-api documentation 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 37 | 38 | 39 | 42 | 43 | 44 | 45 | 46 | Contents 47 | 48 | 49 | 50 | 51 | 52 | Menu 53 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | Expand 62 | 64 | 65 | 66 | 67 | 68 | Light mode 69 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | Dark mode 84 | 86 | 87 | 88 | 89 | 90 | 91 | Auto light/dark mode 92 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 110 | 113 | 114 | 115 | 116 |
117 |
118 |
119 | 123 |
124 | 127 |
128 |
129 | 135 |
136 | 140 |
141 |
142 | 229 |
230 |
231 |
232 | 233 | 234 | 235 | 236 | Back to top 237 | 238 |
239 |
240 | 246 |
247 | 251 |
252 | 260 |
261 |
262 | 263 | 267 |
268 |
269 | 272 | Made with Sphinx and @pradyunsg's 273 | 274 | Furo 275 | 276 |
277 |
278 | 279 |
280 |
281 | 282 |
283 |
284 | 289 |
290 |
291 | 292 | 293 | 294 | 295 | -------------------------------------------------------------------------------- /docs/_sources/abuse_reports.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | Abuse Reports 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.abuse_reports` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: AbuseReportsClient 12 | :undoc-members: AbuseReportsClient 13 | -------------------------------------------------------------------------------- /docs/_sources/agent_ingresses.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | Agent Ingresses 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.agent_ingresses` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: AgentIngressesClient 12 | :undoc-members: AgentIngressesClient 13 | -------------------------------------------------------------------------------- /docs/_sources/api_keys.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | API Keys 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.api_keys` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: APIKeysClient 12 | :undoc-members: APIKeysClient 13 | -------------------------------------------------------------------------------- /docs/_sources/application_sessions.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | Application Sessions 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.application_sessions` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: ApplicationSessionsClient 12 | :undoc-members: ApplicationSessionsClient 13 | -------------------------------------------------------------------------------- /docs/_sources/application_users.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | Application Users 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.application_users` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: ApplicationUsersClient 12 | :undoc-members: ApplicationUsersClient 13 | -------------------------------------------------------------------------------- /docs/_sources/bot_users.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | Bot Users 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.bot_users` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: BotUsersClient 12 | :undoc-members: BotUsersClient 13 | -------------------------------------------------------------------------------- /docs/_sources/certificate_authorities.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | Certificate Authorities 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.certificate_authorities` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: CertificateAuthoritiesClient 12 | :undoc-members: CertificateAuthoritiesClient 13 | -------------------------------------------------------------------------------- /docs/_sources/client.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | Client 5 | ===================================== 6 | 7 | :class:`~ngrok.Client` is the root object of the `ngrok-api` library. Construct 8 | a Client with an API Key. Then you can access API Services as properties of the 9 | Client object: 10 | 11 | :: 12 | 13 | import ngrok 14 | 15 | # construct the api client 16 | client = ngrok.Client("") 17 | 18 | # list all ip policies 19 | for policy in client.ip_policies.list(): 20 | print(policy) 21 | 22 | # create an ngrok agent authtoken 23 | cred = client.credentials.create() 24 | print(cred) 25 | 26 | .. automodule:: ngrok 27 | :members: Client 28 | :undoc-members: Client 29 | -------------------------------------------------------------------------------- /docs/_sources/credentials.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | Tunnel Credentials 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.credentials` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: CredentialsClient 12 | :undoc-members: CredentialsClient 13 | -------------------------------------------------------------------------------- /docs/_sources/datatypes.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | Datatypes 5 | ===================================== 6 | 7 | This module contains all datatypes returned by the ngrok API. 8 | 9 | .. automodule:: ngrok.datatypes 10 | :members: 11 | :undoc-members: 12 | -------------------------------------------------------------------------------- /docs/_sources/edge_route_backend_module.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | HTTPS Edge Route Backend Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.edge_route_backend_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: EdgeRouteBackendModuleClient 12 | :undoc-members: EdgeRouteBackendModuleClient 13 | -------------------------------------------------------------------------------- /docs/_sources/edge_route_circuit_breaker_module.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | HTTPS Edge Route Circuit Breaker Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.edge_route_circuit_breaker_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: EdgeRouteCircuitBreakerModuleClient 12 | :undoc-members: EdgeRouteCircuitBreakerModuleClient 13 | -------------------------------------------------------------------------------- /docs/_sources/edge_route_compression_module.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | HTTPS Edge Route Compression Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.edge_route_compression_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: EdgeRouteCompressionModuleClient 12 | :undoc-members: EdgeRouteCompressionModuleClient 13 | -------------------------------------------------------------------------------- /docs/_sources/edge_route_ip_restriction_module.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | HTTPS Edge Route IP Restriction Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.edge_route_ip_restriction_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: EdgeRouteIPRestrictionModuleClient 12 | :undoc-members: EdgeRouteIPRestrictionModuleClient 13 | -------------------------------------------------------------------------------- /docs/_sources/edge_route_o_auth_module.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | HTTPS Edge Route OAuth Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.edge_route_o_auth_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: EdgeRouteOAuthModuleClient 12 | :undoc-members: EdgeRouteOAuthModuleClient 13 | -------------------------------------------------------------------------------- /docs/_sources/edge_route_oidc_module.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | HTTPS Edge Route OIDC Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.edge_route_oidc_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: EdgeRouteOIDCModuleClient 12 | :undoc-members: EdgeRouteOIDCModuleClient 13 | -------------------------------------------------------------------------------- /docs/_sources/edge_route_policy_module.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | HTTPS Edge Route Policies Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.edge_route_policy_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: EdgeRoutePolicyModuleClient 12 | :undoc-members: EdgeRoutePolicyModuleClient 13 | -------------------------------------------------------------------------------- /docs/_sources/edge_route_request_headers_module.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | HTTPS Edge Route Request Headers Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.edge_route_request_headers_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: EdgeRouteRequestHeadersModuleClient 12 | :undoc-members: EdgeRouteRequestHeadersModuleClient 13 | -------------------------------------------------------------------------------- /docs/_sources/edge_route_response_headers_module.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | HTTPS Edge Route Response Headers Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.edge_route_response_headers_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: EdgeRouteResponseHeadersModuleClient 12 | :undoc-members: EdgeRouteResponseHeadersModuleClient 13 | -------------------------------------------------------------------------------- /docs/_sources/edge_route_saml_module.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | HTTPS Edge Route SAML Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.edge_route_saml_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: EdgeRouteSAMLModuleClient 12 | :undoc-members: EdgeRouteSAMLModuleClient 13 | -------------------------------------------------------------------------------- /docs/_sources/edge_route_traffic_policy_module.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | HTTPS Edge Route Traffic Policy Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.edge_route_traffic_policy_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: EdgeRouteTrafficPolicyModuleClient 12 | :undoc-members: EdgeRouteTrafficPolicyModuleClient 13 | -------------------------------------------------------------------------------- /docs/_sources/edge_route_user_agent_filter_module.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | HTTPS Edge Route User Agent Filter Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.edge_route_user_agent_filter_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: EdgeRouteUserAgentFilterModuleClient 12 | :undoc-members: EdgeRouteUserAgentFilterModuleClient 13 | -------------------------------------------------------------------------------- /docs/_sources/edge_route_webhook_verification_module.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | HTTPS Edge Route Webhook Verification Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.edge_route_webhook_verification_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: EdgeRouteWebhookVerificationModuleClient 12 | :undoc-members: EdgeRouteWebhookVerificationModuleClient 13 | -------------------------------------------------------------------------------- /docs/_sources/edge_route_websocket_tcp_converter_module.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | HTTPS Edge Route Websocket TCP Converter Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.edge_route_websocket_tcp_converter_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: EdgeRouteWebsocketTCPConverterModuleClient 12 | :undoc-members: EdgeRouteWebsocketTCPConverterModuleClient 13 | -------------------------------------------------------------------------------- /docs/_sources/edges_https.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | HTTPS Edges 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.edges_https` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: EdgesHTTPSClient 12 | :undoc-members: EdgesHTTPSClient 13 | -------------------------------------------------------------------------------- /docs/_sources/edges_https_routes.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | HTTPS Edge Routes 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.edges_https_routes` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: EdgesHTTPSRoutesClient 12 | :undoc-members: EdgesHTTPSRoutesClient 13 | -------------------------------------------------------------------------------- /docs/_sources/edges_tcp.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | TCP Edges 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.edges_tcp` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: EdgesTCPClient 12 | :undoc-members: EdgesTCPClient 13 | -------------------------------------------------------------------------------- /docs/_sources/edges_tls.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | TLS Edges 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.edges_tls` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: EdgesTLSClient 12 | :undoc-members: EdgesTLSClient 13 | -------------------------------------------------------------------------------- /docs/_sources/endpoints.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | Endpoints 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.endpoints` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: EndpointsClient 12 | :undoc-members: EndpointsClient 13 | -------------------------------------------------------------------------------- /docs/_sources/errors.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | .. _errors: 5 | 6 | Errors 7 | ===================================== 8 | 9 | When any method invoked against the ngrok API returns an error, a Exception of 10 | :class:`ngrok.Error` will be raised. 11 | 12 | The exception includes details that will allow you to robustly handle any error 13 | returned by the API. The :attr:`ngrok.Error.error_code` field allows you to 14 | handle any error in the ngrok system. Consult our `API Errors Documentation 15 | `_ for the list of error codes the API may 16 | return. 17 | 18 | Handling Errors 19 | --------------- 20 | 21 | If the API returns an unexpected 404, a :class:`ngrok.NotFoundError` will be 22 | raised. Ensure that you check for it first because it is a subclass of :class:`ngrok.Error`. 23 | 24 | .. code-block:: 25 | 26 | try: 27 | client.ip_policies.get(id) 28 | except ngrok.NotFoundError as e: 29 | client.ip_policies.create() 30 | except ngrok.Error as e: 31 | # something else happened 32 | 33 | 34 | Other validation errors are best distinguished by their error code. Consult our 35 | documentation for the `list of all ngrok error codes `_. 36 | 37 | :: 38 | 39 | try: 40 | client.edges.https.create(hostports=["url-without-port.ngrok.io"]) 41 | except ngrok.Error as e: 42 | if e.error_code == "ERR_NGROK_7104": 43 | # handle a specific condition 44 | else: 45 | raise 46 | 47 | 48 | If the ngrok API fails with an undefined response or there is some kind of 49 | network error, there are no guarantees about the type of exception thrown 50 | at that point it is best to use a naked ``except`` block or to catch a ``RuntimeError``. 51 | 52 | :: 53 | 54 | try: 55 | client.ip_policies.create() 56 | except RuntimeError: 57 | # an unexpected network error that you could retry 58 | 59 | 60 | Exception Classes 61 | ----------------- 62 | 63 | .. automodule:: ngrok 64 | :members: Error, NotFoundError 65 | -------------------------------------------------------------------------------- /docs/_sources/event_destinations.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | Event Destinations 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.event_destinations` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: EventDestinationsClient 12 | :undoc-members: EventDestinationsClient 13 | -------------------------------------------------------------------------------- /docs/_sources/event_sources.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | Event Sources 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.event_sources` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: EventSourcesClient 12 | :undoc-members: EventSourcesClient 13 | -------------------------------------------------------------------------------- /docs/_sources/event_subscriptions.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | Event Subscriptions 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.event_subscriptions` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: EventSubscriptionsClient 12 | :undoc-members: EventSubscriptionsClient 13 | -------------------------------------------------------------------------------- /docs/_sources/failover_backends.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | Failover Backends 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.failover_backends` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: FailoverBackendsClient 12 | :undoc-members: FailoverBackendsClient 13 | -------------------------------------------------------------------------------- /docs/_sources/http_response_backends.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | HTTP Response Backends 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.http_response_backends` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: HTTPResponseBackendsClient 12 | :undoc-members: HTTPResponseBackendsClient 13 | -------------------------------------------------------------------------------- /docs/_sources/https_edge_mutual_tls_module.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | HTTPS Edge Mutual TLS Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.https_edge_mutual_tls_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: HTTPSEdgeMutualTLSModuleClient 12 | :undoc-members: HTTPSEdgeMutualTLSModuleClient 13 | -------------------------------------------------------------------------------- /docs/_sources/https_edge_tls_termination_module.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | HTTPS Edge TLS Termination Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.https_edge_tls_termination_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: HTTPSEdgeTLSTerminationModuleClient 12 | :undoc-members: HTTPSEdgeTLSTerminationModuleClient 13 | -------------------------------------------------------------------------------- /docs/_sources/index.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | 5 | ngrok-api 6 | ######### 7 | 8 | This is the official helper library for working with the `ngrok 9 | HTTP API `_ from Python. 10 | 11 | Getting Started 12 | =============== 13 | 14 | Installation 15 | ------------ 16 | 17 | :: 18 | 19 | pip install ngrok-api 20 | 21 | 22 | Quickstart Example 23 | ------------------ 24 | 25 | After you've installed the package, you'll need an API key. Create one on the 26 | `API Keys page of your ngrok dashboard `_. 27 | 28 | In your application's code, construct an :class:`~ngrok.Client` object 29 | with the API key. API services can be accessed as properties of the client 30 | object. That's it! 31 | 32 | :: 33 | 34 | import ngrok 35 | 36 | # construct the api client 37 | client = ngrok.Client("") 38 | 39 | # list all online tunnels 40 | for t in client.tunnels.list(): 41 | print(t) 42 | 43 | # create an ip policy the allows traffic from some subnets 44 | policy = client.ip_policies.create() 45 | for cidr in ["24.0.0.0/8", "12.0.0.0/8"]: 46 | client.ip_policy_rules.create(cidr=cidr, ip_policy_id=policy.id, action="allow") 47 | 48 | 49 | Automatic Paging 50 | ---------------- 51 | 52 | The ngrok API pages all list resources but this library abstracts that away 53 | from you. All response objects from any ``list()`` methods return an object that 54 | implements an ``__iter__()`` method which will automatically fetch additional 55 | pages for you. 56 | 57 | :: 58 | 59 | import ngrok 60 | 61 | client = ngrok.Client("") 62 | 63 | # list all ip policies, transparently fetching additional 64 | # pages for you if necessary 65 | for p in client.ip_policies.list(): 66 | print(p) 67 | 68 | 69 | Instance Methods 70 | ---------------- 71 | 72 | Instance methods like ``update`` and ``delete`` can be invoked on an instance of an 73 | API object itself as well as directly without needing to first fetch the object. 74 | 75 | :: 76 | import ngrok 77 | 78 | client = ngrok.Client("") 79 | 80 | # update the metadata of a credential 81 | cred = client.credentials.get("cr_1kYyunEyn6XHHlqyMBLrj5nxkoz") 82 | cred.update(metadata=json.dumps({ 83 | "server_name": "giraffe-1", 84 | })) 85 | 86 | # or do it in single call 87 | cred = client.credentials.update("cr_1kYyunEyn6XHHlqyMBLrj5nxkoz", metadata=json.dumps({ 88 | "server_name": "giraffe-1", 89 | })) 90 | 91 | 92 | Error Handling 93 | -------------- 94 | 95 | The ngrok API returns detailed information when an API call fails. Consult the 96 | section on :ref:`errors ` for additional details. 97 | 98 | :: 99 | 100 | import ngrok 101 | 102 | client = ngrok.Client("") 103 | 104 | try: 105 | policy = client.ip_policies.create() 106 | client.ip_policy_rules.create(cidr="24.0.0.0/8", ip_policy_id=policy.id, action="not a valid action") 107 | except ngrok.Error as e: 108 | print("http status code", e.http_status_code) 109 | print("ngrok error code", e.error_code) 110 | print("ngrok error message", e.message) 111 | print("optional additional error-specific details", e.details) 112 | 113 | API Reference 114 | ============= 115 | 116 | .. toctree:: 117 | :caption: API 118 | 119 | client 120 | datatypes 121 | errors 122 | 123 | .. toctree:: 124 | :caption: Services 125 | 126 | abuse_reports 127 | agent_ingresses 128 | api_keys 129 | application_sessions 130 | application_users 131 | tunnel_sessions 132 | failover_backends 133 | http_response_backends 134 | static_backends 135 | tunnel_group_backends 136 | weighted_backends 137 | bot_users 138 | certificate_authorities 139 | credentials 140 | edges_https_routes 141 | edges_https 142 | https_edge_mutual_tls_module 143 | https_edge_tls_termination_module 144 | edge_route_backend_module 145 | edge_route_ip_restriction_module 146 | edge_route_request_headers_module 147 | edge_route_response_headers_module 148 | edge_route_compression_module 149 | edge_route_circuit_breaker_module 150 | edge_route_webhook_verification_module 151 | edge_route_o_auth_module 152 | edge_route_saml_module 153 | edge_route_oidc_module 154 | edge_route_websocket_tcp_converter_module 155 | edge_route_user_agent_filter_module 156 | edge_route_traffic_policy_module 157 | edges_tcp 158 | tcp_edge_backend_module 159 | tcp_edge_ip_restriction_module 160 | tcp_edge_traffic_policy_module 161 | edges_tls 162 | tls_edge_backend_module 163 | tls_edge_ip_restriction_module 164 | tls_edge_mutual_tls_module 165 | tls_edge_tls_termination_module 166 | tls_edge_traffic_policy_module 167 | endpoints 168 | event_destinations 169 | event_subscriptions 170 | event_sources 171 | ip_policies 172 | ip_policy_rules 173 | ip_restrictions 174 | reserved_addrs 175 | reserved_domains 176 | ssh_certificate_authorities 177 | ssh_credentials 178 | ssh_host_certificates 179 | ssh_user_certificates 180 | tls_certificates 181 | tunnels 182 | -------------------------------------------------------------------------------- /docs/_sources/ip_policies.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | IP Policies 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.ip_policies` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: IPPoliciesClient 12 | :undoc-members: IPPoliciesClient 13 | -------------------------------------------------------------------------------- /docs/_sources/ip_policy_rules.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | IP Policy Rules 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.ip_policy_rules` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: IPPolicyRulesClient 12 | :undoc-members: IPPolicyRulesClient 13 | -------------------------------------------------------------------------------- /docs/_sources/ip_restrictions.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | IP Restrictions 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.ip_restrictions` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: IPRestrictionsClient 12 | :undoc-members: IPRestrictionsClient 13 | -------------------------------------------------------------------------------- /docs/_sources/reserved_addrs.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | Reserved Addresses 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.reserved_addrs` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: ReservedAddrsClient 12 | :undoc-members: ReservedAddrsClient 13 | -------------------------------------------------------------------------------- /docs/_sources/reserved_domains.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | Reserved Domains 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.reserved_domains` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: ReservedDomainsClient 12 | :undoc-members: ReservedDomainsClient 13 | -------------------------------------------------------------------------------- /docs/_sources/ssh_certificate_authorities.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | SSH Certificate Authorities 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.ssh_certificate_authorities` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: SSHCertificateAuthoritiesClient 12 | :undoc-members: SSHCertificateAuthoritiesClient 13 | -------------------------------------------------------------------------------- /docs/_sources/ssh_credentials.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | SSH Credentials 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.ssh_credentials` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: SSHCredentialsClient 12 | :undoc-members: SSHCredentialsClient 13 | -------------------------------------------------------------------------------- /docs/_sources/ssh_host_certificates.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | SSH Host Certificates 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.ssh_host_certificates` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: SSHHostCertificatesClient 12 | :undoc-members: SSHHostCertificatesClient 13 | -------------------------------------------------------------------------------- /docs/_sources/ssh_user_certificates.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | SSH User Certificates 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.ssh_user_certificates` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: SSHUserCertificatesClient 12 | :undoc-members: SSHUserCertificatesClient 13 | -------------------------------------------------------------------------------- /docs/_sources/static_backends.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | Static Backends 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.static_backends` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: StaticBackendsClient 12 | :undoc-members: StaticBackendsClient 13 | -------------------------------------------------------------------------------- /docs/_sources/tcp_edge_backend_module.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | TCP Edge Backend Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.tcp_edge_backend_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: TCPEdgeBackendModuleClient 12 | :undoc-members: TCPEdgeBackendModuleClient 13 | -------------------------------------------------------------------------------- /docs/_sources/tcp_edge_ip_restriction_module.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | TCP Edge IP Restriction Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.tcp_edge_ip_restriction_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: TCPEdgeIPRestrictionModuleClient 12 | :undoc-members: TCPEdgeIPRestrictionModuleClient 13 | -------------------------------------------------------------------------------- /docs/_sources/tcp_edge_policy_module.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | TCP Edge Policy Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.tcp_edge_policy_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: TCPEdgePolicyModuleClient 12 | :undoc-members: TCPEdgePolicyModuleClient 13 | -------------------------------------------------------------------------------- /docs/_sources/tcp_edge_traffic_policy_module.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | TCP Edge Traffic Policy Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.tcp_edge_traffic_policy_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: TCPEdgeTrafficPolicyModuleClient 12 | :undoc-members: TCPEdgeTrafficPolicyModuleClient 13 | -------------------------------------------------------------------------------- /docs/_sources/tls_certificates.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | TLS Certificates 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.tls_certificates` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: TLSCertificatesClient 12 | :undoc-members: TLSCertificatesClient 13 | -------------------------------------------------------------------------------- /docs/_sources/tls_edge_backend_module.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | TLS Edge Backend Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.tls_edge_backend_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: TLSEdgeBackendModuleClient 12 | :undoc-members: TLSEdgeBackendModuleClient 13 | -------------------------------------------------------------------------------- /docs/_sources/tls_edge_ip_restriction_module.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | TLS Edge IP Restriction Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.tls_edge_ip_restriction_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: TLSEdgeIPRestrictionModuleClient 12 | :undoc-members: TLSEdgeIPRestrictionModuleClient 13 | -------------------------------------------------------------------------------- /docs/_sources/tls_edge_mutual_tls_module.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | TLS Edge Mutual TLS Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.tls_edge_mutual_tls_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: TLSEdgeMutualTLSModuleClient 12 | :undoc-members: TLSEdgeMutualTLSModuleClient 13 | -------------------------------------------------------------------------------- /docs/_sources/tls_edge_policy_module.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | TLS Edge Policy Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.tls_edge_policy_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: TLSEdgePolicyModuleClient 12 | :undoc-members: TLSEdgePolicyModuleClient 13 | -------------------------------------------------------------------------------- /docs/_sources/tls_edge_tls_termination_module.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | TLS Edge TLS Termination Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.tls_edge_tls_termination_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: TLSEdgeTLSTerminationModuleClient 12 | :undoc-members: TLSEdgeTLSTerminationModuleClient 13 | -------------------------------------------------------------------------------- /docs/_sources/tls_edge_traffic_policy_module.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | TLS Edge Traffic Policy Module 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.tls_edge_traffic_policy_module` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: TLSEdgeTrafficPolicyModuleClient 12 | :undoc-members: TLSEdgeTrafficPolicyModuleClient 13 | -------------------------------------------------------------------------------- /docs/_sources/tunnel_group_backends.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | Tunnel Group Backends 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.tunnel_group_backends` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: TunnelGroupBackendsClient 12 | :undoc-members: TunnelGroupBackendsClient 13 | -------------------------------------------------------------------------------- /docs/_sources/tunnel_sessions.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | Tunnel Sessions 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.tunnel_sessions` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: TunnelSessionsClient 12 | :undoc-members: TunnelSessionsClient 13 | -------------------------------------------------------------------------------- /docs/_sources/tunnels.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | Tunnels 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.tunnels` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: TunnelsClient 12 | :undoc-members: TunnelsClient 13 | -------------------------------------------------------------------------------- /docs/_sources/weighted_backends.rst.txt: -------------------------------------------------------------------------------- 1 | .. 2 | Code generated for API Clients. DO NOT EDIT. 3 | 4 | Weighted Backends 5 | ===================================== 6 | 7 | Do not construct this object directly, instead access the 8 | :attr:`~ngrok.Client.weighted_backends` property of an :class:`ngrok.Client` object. 9 | 10 | .. automodule:: ngrok.services 11 | :members: WeightedBackendsClient 12 | :undoc-members: WeightedBackendsClient 13 | -------------------------------------------------------------------------------- /docs/_static/debug.css: -------------------------------------------------------------------------------- 1 | /* 2 | This CSS file should be overridden by the theme authors. It's 3 | meant for debugging and developing the skeleton that this theme provides. 4 | */ 5 | body { 6 | font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, 7 | "Apple Color Emoji", "Segoe UI Emoji"; 8 | background: lavender; 9 | } 10 | .sb-announcement { 11 | background: rgb(131, 131, 131); 12 | } 13 | .sb-announcement__inner { 14 | background: black; 15 | color: white; 16 | } 17 | .sb-header { 18 | background: lightskyblue; 19 | } 20 | .sb-header__inner { 21 | background: royalblue; 22 | color: white; 23 | } 24 | .sb-header-secondary { 25 | background: lightcyan; 26 | } 27 | .sb-header-secondary__inner { 28 | background: cornflowerblue; 29 | color: white; 30 | } 31 | .sb-sidebar-primary { 32 | background: lightgreen; 33 | } 34 | .sb-main { 35 | background: blanchedalmond; 36 | } 37 | .sb-main__inner { 38 | background: antiquewhite; 39 | } 40 | .sb-header-article { 41 | background: lightsteelblue; 42 | } 43 | .sb-article-container { 44 | background: snow; 45 | } 46 | .sb-article-main { 47 | background: white; 48 | } 49 | .sb-footer-article { 50 | background: lightpink; 51 | } 52 | .sb-sidebar-secondary { 53 | background: lightgoldenrodyellow; 54 | } 55 | .sb-footer-content { 56 | background: plum; 57 | } 58 | .sb-footer-content__inner { 59 | background: palevioletred; 60 | } 61 | .sb-footer { 62 | background: pink; 63 | } 64 | .sb-footer__inner { 65 | background: salmon; 66 | } 67 | .sb-article { 68 | background: white; 69 | } 70 | -------------------------------------------------------------------------------- /docs/_static/doctools.js: -------------------------------------------------------------------------------- 1 | /* 2 | * doctools.js 3 | * ~~~~~~~~~~~ 4 | * 5 | * Base JavaScript utilities for all Sphinx HTML documentation. 6 | * 7 | * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. 8 | * :license: BSD, see LICENSE for details. 9 | * 10 | */ 11 | "use strict"; 12 | 13 | const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([ 14 | "TEXTAREA", 15 | "INPUT", 16 | "SELECT", 17 | "BUTTON", 18 | ]); 19 | 20 | const _ready = (callback) => { 21 | if (document.readyState !== "loading") { 22 | callback(); 23 | } else { 24 | document.addEventListener("DOMContentLoaded", callback); 25 | } 26 | }; 27 | 28 | /** 29 | * Small JavaScript module for the documentation. 30 | */ 31 | const Documentation = { 32 | init: () => { 33 | Documentation.initDomainIndexTable(); 34 | Documentation.initOnKeyListeners(); 35 | }, 36 | 37 | /** 38 | * i18n support 39 | */ 40 | TRANSLATIONS: {}, 41 | PLURAL_EXPR: (n) => (n === 1 ? 0 : 1), 42 | LOCALE: "unknown", 43 | 44 | // gettext and ngettext don't access this so that the functions 45 | // can safely bound to a different name (_ = Documentation.gettext) 46 | gettext: (string) => { 47 | const translated = Documentation.TRANSLATIONS[string]; 48 | switch (typeof translated) { 49 | case "undefined": 50 | return string; // no translation 51 | case "string": 52 | return translated; // translation exists 53 | default: 54 | return translated[0]; // (singular, plural) translation tuple exists 55 | } 56 | }, 57 | 58 | ngettext: (singular, plural, n) => { 59 | const translated = Documentation.TRANSLATIONS[singular]; 60 | if (typeof translated !== "undefined") 61 | return translated[Documentation.PLURAL_EXPR(n)]; 62 | return n === 1 ? singular : plural; 63 | }, 64 | 65 | addTranslations: (catalog) => { 66 | Object.assign(Documentation.TRANSLATIONS, catalog.messages); 67 | Documentation.PLURAL_EXPR = new Function( 68 | "n", 69 | `return (${catalog.plural_expr})` 70 | ); 71 | Documentation.LOCALE = catalog.locale; 72 | }, 73 | 74 | /** 75 | * helper function to focus on search bar 76 | */ 77 | focusSearchBar: () => { 78 | document.querySelectorAll("input[name=q]")[0]?.focus(); 79 | }, 80 | 81 | /** 82 | * Initialise the domain index toggle buttons 83 | */ 84 | initDomainIndexTable: () => { 85 | const toggler = (el) => { 86 | const idNumber = el.id.substr(7); 87 | const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`); 88 | if (el.src.substr(-9) === "minus.png") { 89 | el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`; 90 | toggledRows.forEach((el) => (el.style.display = "none")); 91 | } else { 92 | el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`; 93 | toggledRows.forEach((el) => (el.style.display = "")); 94 | } 95 | }; 96 | 97 | const togglerElements = document.querySelectorAll("img.toggler"); 98 | togglerElements.forEach((el) => 99 | el.addEventListener("click", (event) => toggler(event.currentTarget)) 100 | ); 101 | togglerElements.forEach((el) => (el.style.display = "")); 102 | if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler); 103 | }, 104 | 105 | initOnKeyListeners: () => { 106 | // only install a listener if it is really needed 107 | if ( 108 | !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS && 109 | !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS 110 | ) 111 | return; 112 | 113 | document.addEventListener("keydown", (event) => { 114 | // bail for input elements 115 | if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; 116 | // bail with special keys 117 | if (event.altKey || event.ctrlKey || event.metaKey) return; 118 | 119 | if (!event.shiftKey) { 120 | switch (event.key) { 121 | case "ArrowLeft": 122 | if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; 123 | 124 | const prevLink = document.querySelector('link[rel="prev"]'); 125 | if (prevLink && prevLink.href) { 126 | window.location.href = prevLink.href; 127 | event.preventDefault(); 128 | } 129 | break; 130 | case "ArrowRight": 131 | if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; 132 | 133 | const nextLink = document.querySelector('link[rel="next"]'); 134 | if (nextLink && nextLink.href) { 135 | window.location.href = nextLink.href; 136 | event.preventDefault(); 137 | } 138 | break; 139 | } 140 | } 141 | 142 | // some keyboard layouts may need Shift to get / 143 | switch (event.key) { 144 | case "/": 145 | if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break; 146 | Documentation.focusSearchBar(); 147 | event.preventDefault(); 148 | } 149 | }); 150 | }, 151 | }; 152 | 153 | // quick alias for translations 154 | const _ = Documentation.gettext; 155 | 156 | _ready(Documentation.init); 157 | -------------------------------------------------------------------------------- /docs/_static/documentation_options.js: -------------------------------------------------------------------------------- 1 | var DOCUMENTATION_OPTIONS = { 2 | URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), 3 | VERSION: '', 4 | LANGUAGE: 'en', 5 | COLLAPSE_INDEX: false, 6 | BUILDER: 'html', 7 | FILE_SUFFIX: '.html', 8 | LINK_SUFFIX: '.html', 9 | HAS_SOURCE: true, 10 | SOURCELINK_SUFFIX: '.txt', 11 | NAVIGATION_WITH_KEYS: false, 12 | SHOW_SEARCH_SUMMARY: true, 13 | ENABLE_SEARCH_SHORTCUTS: true, 14 | }; -------------------------------------------------------------------------------- /docs/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngrok/ngrok-api-python/11967f08bace1ca6b0a705bb0e88ef8af3b78620/docs/_static/file.png -------------------------------------------------------------------------------- /docs/_static/language_data.js: -------------------------------------------------------------------------------- 1 | /* 2 | * language_data.js 3 | * ~~~~~~~~~~~~~~~~ 4 | * 5 | * This script contains the language-specific data used by searchtools.js, 6 | * namely the list of stopwords, stemmer, scorer and splitter. 7 | * 8 | * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. 9 | * :license: BSD, see LICENSE for details. 10 | * 11 | */ 12 | 13 | var stopwords = ["a", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "near", "no", "not", "of", "on", "or", "such", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", "with"]; 14 | 15 | 16 | /* Non-minified version is copied as a separate JS file, is available */ 17 | 18 | /** 19 | * Porter Stemmer 20 | */ 21 | var Stemmer = function() { 22 | 23 | var step2list = { 24 | ational: 'ate', 25 | tional: 'tion', 26 | enci: 'ence', 27 | anci: 'ance', 28 | izer: 'ize', 29 | bli: 'ble', 30 | alli: 'al', 31 | entli: 'ent', 32 | eli: 'e', 33 | ousli: 'ous', 34 | ization: 'ize', 35 | ation: 'ate', 36 | ator: 'ate', 37 | alism: 'al', 38 | iveness: 'ive', 39 | fulness: 'ful', 40 | ousness: 'ous', 41 | aliti: 'al', 42 | iviti: 'ive', 43 | biliti: 'ble', 44 | logi: 'log' 45 | }; 46 | 47 | var step3list = { 48 | icate: 'ic', 49 | ative: '', 50 | alize: 'al', 51 | iciti: 'ic', 52 | ical: 'ic', 53 | ful: '', 54 | ness: '' 55 | }; 56 | 57 | var c = "[^aeiou]"; // consonant 58 | var v = "[aeiouy]"; // vowel 59 | var C = c + "[^aeiouy]*"; // consonant sequence 60 | var V = v + "[aeiou]*"; // vowel sequence 61 | 62 | var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0 63 | var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1 64 | var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1 65 | var s_v = "^(" + C + ")?" + v; // vowel in stem 66 | 67 | this.stemWord = function (w) { 68 | var stem; 69 | var suffix; 70 | var firstch; 71 | var origword = w; 72 | 73 | if (w.length < 3) 74 | return w; 75 | 76 | var re; 77 | var re2; 78 | var re3; 79 | var re4; 80 | 81 | firstch = w.substr(0,1); 82 | if (firstch == "y") 83 | w = firstch.toUpperCase() + w.substr(1); 84 | 85 | // Step 1a 86 | re = /^(.+?)(ss|i)es$/; 87 | re2 = /^(.+?)([^s])s$/; 88 | 89 | if (re.test(w)) 90 | w = w.replace(re,"$1$2"); 91 | else if (re2.test(w)) 92 | w = w.replace(re2,"$1$2"); 93 | 94 | // Step 1b 95 | re = /^(.+?)eed$/; 96 | re2 = /^(.+?)(ed|ing)$/; 97 | if (re.test(w)) { 98 | var fp = re.exec(w); 99 | re = new RegExp(mgr0); 100 | if (re.test(fp[1])) { 101 | re = /.$/; 102 | w = w.replace(re,""); 103 | } 104 | } 105 | else if (re2.test(w)) { 106 | var fp = re2.exec(w); 107 | stem = fp[1]; 108 | re2 = new RegExp(s_v); 109 | if (re2.test(stem)) { 110 | w = stem; 111 | re2 = /(at|bl|iz)$/; 112 | re3 = new RegExp("([^aeiouylsz])\\1$"); 113 | re4 = new RegExp("^" + C + v + "[^aeiouwxy]$"); 114 | if (re2.test(w)) 115 | w = w + "e"; 116 | else if (re3.test(w)) { 117 | re = /.$/; 118 | w = w.replace(re,""); 119 | } 120 | else if (re4.test(w)) 121 | w = w + "e"; 122 | } 123 | } 124 | 125 | // Step 1c 126 | re = /^(.+?)y$/; 127 | if (re.test(w)) { 128 | var fp = re.exec(w); 129 | stem = fp[1]; 130 | re = new RegExp(s_v); 131 | if (re.test(stem)) 132 | w = stem + "i"; 133 | } 134 | 135 | // Step 2 136 | re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; 137 | if (re.test(w)) { 138 | var fp = re.exec(w); 139 | stem = fp[1]; 140 | suffix = fp[2]; 141 | re = new RegExp(mgr0); 142 | if (re.test(stem)) 143 | w = stem + step2list[suffix]; 144 | } 145 | 146 | // Step 3 147 | re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; 148 | if (re.test(w)) { 149 | var fp = re.exec(w); 150 | stem = fp[1]; 151 | suffix = fp[2]; 152 | re = new RegExp(mgr0); 153 | if (re.test(stem)) 154 | w = stem + step3list[suffix]; 155 | } 156 | 157 | // Step 4 158 | re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; 159 | re2 = /^(.+?)(s|t)(ion)$/; 160 | if (re.test(w)) { 161 | var fp = re.exec(w); 162 | stem = fp[1]; 163 | re = new RegExp(mgr1); 164 | if (re.test(stem)) 165 | w = stem; 166 | } 167 | else if (re2.test(w)) { 168 | var fp = re2.exec(w); 169 | stem = fp[1] + fp[2]; 170 | re2 = new RegExp(mgr1); 171 | if (re2.test(stem)) 172 | w = stem; 173 | } 174 | 175 | // Step 5 176 | re = /^(.+?)e$/; 177 | if (re.test(w)) { 178 | var fp = re.exec(w); 179 | stem = fp[1]; 180 | re = new RegExp(mgr1); 181 | re2 = new RegExp(meq1); 182 | re3 = new RegExp("^" + C + v + "[^aeiouwxy]$"); 183 | if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) 184 | w = stem; 185 | } 186 | re = /ll$/; 187 | re2 = new RegExp(mgr1); 188 | if (re.test(w) && re2.test(w)) { 189 | re = /.$/; 190 | w = w.replace(re,""); 191 | } 192 | 193 | // and turn initial Y back to y 194 | if (firstch == "y") 195 | w = firstch.toLowerCase() + w.substr(1); 196 | return w; 197 | } 198 | } 199 | 200 | -------------------------------------------------------------------------------- /docs/_static/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngrok/ngrok-api-python/11967f08bace1ca6b0a705bb0e88ef8af3b78620/docs/_static/minus.png -------------------------------------------------------------------------------- /docs/_static/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngrok/ngrok-api-python/11967f08bace1ca6b0a705bb0e88ef8af3b78620/docs/_static/plus.png -------------------------------------------------------------------------------- /docs/_static/pygments_dark.css: -------------------------------------------------------------------------------- 1 | pre { line-height: 125%; } 2 | td.linenos .normal { color: #aaaaaa; background-color: transparent; padding-left: 5px; padding-right: 5px; } 3 | span.linenos { color: #aaaaaa; background-color: transparent; padding-left: 5px; padding-right: 5px; } 4 | td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } 5 | span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } 6 | .highlight .hll { background-color: #404040 } 7 | .highlight { background: #202020; color: #d0d0d0 } 8 | .highlight .c { color: #999999; font-style: italic } /* Comment */ 9 | .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ 10 | .highlight .esc { color: #d0d0d0 } /* Escape */ 11 | .highlight .g { color: #d0d0d0 } /* Generic */ 12 | .highlight .k { color: #6ab825; font-weight: bold } /* Keyword */ 13 | .highlight .l { color: #d0d0d0 } /* Literal */ 14 | .highlight .n { color: #d0d0d0 } /* Name */ 15 | .highlight .o { color: #d0d0d0 } /* Operator */ 16 | .highlight .x { color: #d0d0d0 } /* Other */ 17 | .highlight .p { color: #d0d0d0 } /* Punctuation */ 18 | .highlight .ch { color: #999999; font-style: italic } /* Comment.Hashbang */ 19 | .highlight .cm { color: #999999; font-style: italic } /* Comment.Multiline */ 20 | .highlight .cp { color: #cd2828; font-weight: bold } /* Comment.Preproc */ 21 | .highlight .cpf { color: #999999; font-style: italic } /* Comment.PreprocFile */ 22 | .highlight .c1 { color: #999999; font-style: italic } /* Comment.Single */ 23 | .highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */ 24 | .highlight .gd { color: #d22323 } /* Generic.Deleted */ 25 | .highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */ 26 | .highlight .gr { color: #d22323 } /* Generic.Error */ 27 | .highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */ 28 | .highlight .gi { color: #589819 } /* Generic.Inserted */ 29 | .highlight .go { color: #cccccc } /* Generic.Output */ 30 | .highlight .gp { color: #aaaaaa } /* Generic.Prompt */ 31 | .highlight .gs { color: #d0d0d0; font-weight: bold } /* Generic.Strong */ 32 | .highlight .gu { color: #ffffff; text-decoration: underline } /* Generic.Subheading */ 33 | .highlight .gt { color: #d22323 } /* Generic.Traceback */ 34 | .highlight .kc { color: #6ab825; font-weight: bold } /* Keyword.Constant */ 35 | .highlight .kd { color: #6ab825; font-weight: bold } /* Keyword.Declaration */ 36 | .highlight .kn { color: #6ab825; font-weight: bold } /* Keyword.Namespace */ 37 | .highlight .kp { color: #6ab825 } /* Keyword.Pseudo */ 38 | .highlight .kr { color: #6ab825; font-weight: bold } /* Keyword.Reserved */ 39 | .highlight .kt { color: #6ab825; font-weight: bold } /* Keyword.Type */ 40 | .highlight .ld { color: #d0d0d0 } /* Literal.Date */ 41 | .highlight .m { color: #3677a9 } /* Literal.Number */ 42 | .highlight .s { color: #ed9d13 } /* Literal.String */ 43 | .highlight .na { color: #bbbbbb } /* Name.Attribute */ 44 | .highlight .nb { color: #24909d } /* Name.Builtin */ 45 | .highlight .nc { color: #447fcf; text-decoration: underline } /* Name.Class */ 46 | .highlight .no { color: #40ffff } /* Name.Constant */ 47 | .highlight .nd { color: #ffa500 } /* Name.Decorator */ 48 | .highlight .ni { color: #d0d0d0 } /* Name.Entity */ 49 | .highlight .ne { color: #bbbbbb } /* Name.Exception */ 50 | .highlight .nf { color: #447fcf } /* Name.Function */ 51 | .highlight .nl { color: #d0d0d0 } /* Name.Label */ 52 | .highlight .nn { color: #447fcf; text-decoration: underline } /* Name.Namespace */ 53 | .highlight .nx { color: #d0d0d0 } /* Name.Other */ 54 | .highlight .py { color: #d0d0d0 } /* Name.Property */ 55 | .highlight .nt { color: #6ab825; font-weight: bold } /* Name.Tag */ 56 | .highlight .nv { color: #40ffff } /* Name.Variable */ 57 | .highlight .ow { color: #6ab825; font-weight: bold } /* Operator.Word */ 58 | .highlight .w { color: #666666 } /* Text.Whitespace */ 59 | .highlight .mb { color: #3677a9 } /* Literal.Number.Bin */ 60 | .highlight .mf { color: #3677a9 } /* Literal.Number.Float */ 61 | .highlight .mh { color: #3677a9 } /* Literal.Number.Hex */ 62 | .highlight .mi { color: #3677a9 } /* Literal.Number.Integer */ 63 | .highlight .mo { color: #3677a9 } /* Literal.Number.Oct */ 64 | .highlight .sa { color: #ed9d13 } /* Literal.String.Affix */ 65 | .highlight .sb { color: #ed9d13 } /* Literal.String.Backtick */ 66 | .highlight .sc { color: #ed9d13 } /* Literal.String.Char */ 67 | .highlight .dl { color: #ed9d13 } /* Literal.String.Delimiter */ 68 | .highlight .sd { color: #ed9d13 } /* Literal.String.Doc */ 69 | .highlight .s2 { color: #ed9d13 } /* Literal.String.Double */ 70 | .highlight .se { color: #ed9d13 } /* Literal.String.Escape */ 71 | .highlight .sh { color: #ed9d13 } /* Literal.String.Heredoc */ 72 | .highlight .si { color: #ed9d13 } /* Literal.String.Interpol */ 73 | .highlight .sx { color: #ffa500 } /* Literal.String.Other */ 74 | .highlight .sr { color: #ed9d13 } /* Literal.String.Regex */ 75 | .highlight .s1 { color: #ed9d13 } /* Literal.String.Single */ 76 | .highlight .ss { color: #ed9d13 } /* Literal.String.Symbol */ 77 | .highlight .bp { color: #24909d } /* Name.Builtin.Pseudo */ 78 | .highlight .fm { color: #447fcf } /* Name.Function.Magic */ 79 | .highlight .vc { color: #40ffff } /* Name.Variable.Class */ 80 | .highlight .vg { color: #40ffff } /* Name.Variable.Global */ 81 | .highlight .vi { color: #40ffff } /* Name.Variable.Instance */ 82 | .highlight .vm { color: #40ffff } /* Name.Variable.Magic */ 83 | .highlight .il { color: #3677a9 } /* Literal.Number.Integer.Long */ -------------------------------------------------------------------------------- /docs/_static/scripts/furo-extensions.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngrok/ngrok-api-python/11967f08bace1ca6b0a705bb0e88ef8af3b78620/docs/_static/scripts/furo-extensions.js -------------------------------------------------------------------------------- /docs/_static/scripts/furo.js: -------------------------------------------------------------------------------- 1 | /*! For license information please see furo.js.LICENSE.txt */ 2 | (()=>{var t={212:function(t,e,n){var o,r;r=void 0!==n.g?n.g:"undefined"!=typeof window?window:this,o=function(){return function(t){"use strict";var e={navClass:"active",contentClass:"active",nested:!1,nestedClass:"active",offset:0,reflow:!1,events:!0},n=function(t,e,n){if(n.settings.events){var o=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});e.dispatchEvent(o)}},o=function(t){var e=0;if(t.offsetParent)for(;t;)e+=t.offsetTop,t=t.offsetParent;return e>=0?e:0},r=function(t){t&&t.sort((function(t,e){return o(t.content)=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)},l=function(t,e){var n=t[t.length-1];if(function(t,e){return!(!s()||!c(t.content,e,!0))}(n,e))return n;for(var o=t.length-1;o>=0;o--)if(c(t[o].content,e))return t[o]},a=function(t,e){if(e.nested&&t.parentNode){var n=t.parentNode.closest("li");n&&(n.classList.remove(e.nestedClass),a(n,e))}},i=function(t,e){if(t){var o=t.nav.closest("li");o&&(o.classList.remove(e.navClass),t.content.classList.remove(e.contentClass),a(o,e),n("gumshoeDeactivate",o,{link:t.nav,content:t.content,settings:e}))}},u=function(t,e){if(e.nested){var n=t.parentNode.closest("li");n&&(n.classList.add(e.nestedClass),u(n,e))}};return function(o,c){var s,a,d,f,m,v={setup:function(){s=document.querySelectorAll(o),a=[],Array.prototype.forEach.call(s,(function(t){var e=document.getElementById(decodeURIComponent(t.hash.substr(1)));e&&a.push({nav:t,content:e})})),r(a)},detect:function(){var t=l(a,m);t?d&&t.content===d.content||(i(d,m),function(t,e){if(t){var o=t.nav.closest("li");o&&(o.classList.add(e.navClass),t.content.classList.add(e.contentClass),u(o,e),n("gumshoeActivate",o,{link:t.nav,content:t.content,settings:e}))}}(t,m),d=t):d&&(i(d,m),d=null)}},h=function(e){f&&t.cancelAnimationFrame(f),f=t.requestAnimationFrame(v.detect)},g=function(e){f&&t.cancelAnimationFrame(f),f=t.requestAnimationFrame((function(){r(a),v.detect()}))};return v.destroy=function(){d&&i(d,m),t.removeEventListener("scroll",h,!1),m.reflow&&t.removeEventListener("resize",g,!1),a=null,s=null,d=null,f=null,m=null},m=function(){var t={};return Array.prototype.forEach.call(arguments,(function(e){for(var n in e){if(!e.hasOwnProperty(n))return;t[n]=e[n]}})),t}(e,c||{}),v.setup(),v.detect(),t.addEventListener("scroll",h,!1),m.reflow&&t.addEventListener("resize",g,!1),v}}(r)}.apply(e,[]),void 0===o||(t.exports=o)}},e={};function n(o){var r=e[o];if(void 0!==r)return r.exports;var c=e[o]={exports:{}};return t[o].call(c.exports,c,c.exports,n),c.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";var t=n(212),e=n.n(t),o=null,r=null,c=window.pageYOffset||document.documentElement.scrollTop;function s(){const t=localStorage.getItem("theme")||"auto";var e;"light"!==(e=window.matchMedia("(prefers-color-scheme: dark)").matches?"auto"===t?"light":"light"==t?"dark":"auto":"auto"===t?"dark":"dark"==t?"light":"auto")&&"dark"!==e&&"auto"!==e&&(console.error(`Got invalid theme mode: ${e}. Resetting to auto.`),e="auto"),document.body.dataset.theme=e,localStorage.setItem("theme",e),console.log(`Changed to ${e} mode.`)}function l(){!function(){const t=document.getElementsByClassName("theme-toggle");Array.from(t).forEach((t=>{t.addEventListener("click",s)}))}(),function(){let t=0,e=!1;window.addEventListener("scroll",(function(n){t=window.scrollY,e||(window.requestAnimationFrame((function(){var n;n=t,0==Math.floor(r.getBoundingClientRect().top)?r.classList.add("scrolled"):r.classList.remove("scrolled"),function(t){t<64?document.documentElement.classList.remove("show-back-to-top"):tc&&document.documentElement.classList.remove("show-back-to-top"),c=t}(n),function(t){null!==o&&(0==t?o.scrollTo(0,0):Math.ceil(t)>=Math.floor(document.documentElement.scrollHeight-window.innerHeight)?o.scrollTo(0,o.scrollHeight):document.querySelector(".scroll-current"))}(n),e=!1})),e=!0)})),window.scroll()}(),null!==o&&new(e())(".toc-tree a",{reflow:!0,recursive:!0,navClass:"scroll-current",offset:()=>{let t=parseFloat(getComputedStyle(document.documentElement).fontSize);return r.getBoundingClientRect().height+.5*t+1}})}document.addEventListener("DOMContentLoaded",(function(){document.body.parentNode.classList.remove("no-js"),r=document.querySelector("header"),o=document.querySelector(".toc-scroll"),l()}))})()})(); 3 | //# sourceMappingURL=furo.js.map -------------------------------------------------------------------------------- /docs/_static/scripts/furo.js.LICENSE.txt: -------------------------------------------------------------------------------- 1 | /*! 2 | * gumshoejs v5.1.2 (patched by @pradyunsg) 3 | * A simple, framework-agnostic scrollspy script. 4 | * (c) 2019 Chris Ferdinandi 5 | * MIT License 6 | * http://github.com/cferdinandi/gumshoe 7 | */ 8 | -------------------------------------------------------------------------------- /docs/_static/scripts/main.js: -------------------------------------------------------------------------------- 1 | !function(e,t){"function"==typeof define&&define.amd?define([],function(){return t(e)}):"object"==typeof exports?module.exports=t(e):e.Gumshoe=t(e)}("undefined"!=typeof global?global:"undefined"!=typeof window?window:this,function(u){"use strict";function d(e,t,n){n.settings.events&&(n=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n}),t.dispatchEvent(n))}function n(e){var t=0;if(e.offsetParent)for(;e;)t+=e.offsetTop,e=e.offsetParent;return 0<=t?t:0}function f(e){e&&e.sort(function(e,t){return n(e.content)=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)}function m(e,t){var n,o,r=e[e.length-1];if(n=r,o=t,!(!s()||!l(n.content,o,!0)))return r;for(var c=e.length-1;0<=c;c--)if(l(e[c].content,t))return e[c]}function v(e,t){var n;!e||(n=e.nav.closest("li"))&&(n.classList.remove(t.navClass),e.content.classList.remove(t.contentClass),o(n,t),d("gumshoeDeactivate",n,{link:e.nav,content:e.content,settings:t}))}var h={navClass:"active",contentClass:"active",nested:!1,nestedClass:"active",offset:0,reflow:!1,events:!0},o=function(e,t){t.nested&&e.parentNode&&((e=e.parentNode.closest("li"))&&(e.classList.remove(t.nestedClass),o(e,t)))},p=function(e,t){!t.nested||(e=e.parentNode.closest("li"))&&(e.classList.add(t.nestedClass),p(e,t))};return function(e,t){var n,r,c,o,l,s={setup:function(){n=document.querySelectorAll(e),r=[],Array.prototype.forEach.call(n,function(e){var t=document.getElementById(decodeURIComponent(e.hash.substr(1)));t&&r.push({nav:e,content:t})}),f(r)}};s.detect=function(){var e,t,n,o=m(r,l);o?c&&o.content===c.content||(v(c,l),t=l,!(e=o)||(n=e.nav.closest("li"))&&(n.classList.add(t.navClass),e.content.classList.add(t.contentClass),p(n,t),d("gumshoeActivate",n,{link:e.nav,content:e.content,settings:t})),c=o):c&&(v(c,l),c=null)};function i(e){o&&u.cancelAnimationFrame(o),o=u.requestAnimationFrame(s.detect)}function a(e){o&&u.cancelAnimationFrame(o),o=u.requestAnimationFrame(function(){f(r),s.detect()})}s.destroy=function(){c&&v(c,l),u.removeEventListener("scroll",i,!1),l.reflow&&u.removeEventListener("resize",a,!1),l=o=c=n=r=null};return l=function(){var n={};return Array.prototype.forEach.call(arguments,function(e){for(var t in e){if(!e.hasOwnProperty(t))return;n[t]=e[t]}}),n}(h,t||{}),s.setup(),s.detect(),u.addEventListener("scroll",i,!1),l.reflow&&u.addEventListener("resize",a,!1),s}});var tocScroll=null,header=null;function scrollHandlerForHeader(){0==Math.floor(header.getBoundingClientRect().top)?header.classList.add("scrolled"):header.classList.remove("scrolled")}function scrollHandlerForTOC(e){null!==tocScroll&&(0==e?tocScroll.scrollTo(0,0):Math.ceil(e)>=Math.floor(document.documentElement.scrollHeight-window.innerHeight)?tocScroll.scrollTo(0,tocScroll.scrollHeight):document.querySelector(".scroll-current"))}function scrollHandler(e){scrollHandlerForHeader(),scrollHandlerForTOC(e)}function setupScrollHandler(){var t,n=!1;window.addEventListener("scroll",function(e){t=window.scrollY,n||(window.requestAnimationFrame(function(){scrollHandler(t),n=!1}),n=!0)}),window.scroll()}function setupScrollSpy(){null!==tocScroll&&new Gumshoe(".toc-tree a",{reflow:!0,recursive:!0,navClass:"scroll-current"})}function setup(){setupScrollHandler(),setupScrollSpy()}function main(){document.body.parentNode.classList.remove("no-js"),header=document.querySelector("header"),tocScroll=document.querySelector(".toc-scroll"),setup()}document.addEventListener("DOMContentLoaded",main); 2 | //# sourceMappingURL=main.js.map 3 | -------------------------------------------------------------------------------- /docs/_static/skeleton.css: -------------------------------------------------------------------------------- 1 | /* Some sane resets. */ 2 | html { 3 | height: 100%; 4 | } 5 | 6 | body { 7 | margin: 0; 8 | min-height: 100%; 9 | } 10 | 11 | /* All the flexbox magic! */ 12 | body, 13 | .sb-announcement, 14 | .sb-content, 15 | .sb-main, 16 | .sb-container, 17 | .sb-container__inner, 18 | .sb-article-container, 19 | .sb-footer-content, 20 | .sb-header, 21 | .sb-header-secondary, 22 | .sb-footer { 23 | display: flex; 24 | } 25 | 26 | /* These order things vertically */ 27 | body, 28 | .sb-main, 29 | .sb-article-container { 30 | flex-direction: column; 31 | } 32 | 33 | /* Put elements in the center */ 34 | .sb-header, 35 | .sb-header-secondary, 36 | .sb-container, 37 | .sb-content, 38 | .sb-footer, 39 | .sb-footer-content { 40 | justify-content: center; 41 | } 42 | /* Put elements at the ends */ 43 | .sb-article-container { 44 | justify-content: space-between; 45 | } 46 | 47 | /* These elements grow. */ 48 | .sb-main, 49 | .sb-content, 50 | .sb-container, 51 | article { 52 | flex-grow: 1; 53 | } 54 | 55 | /* Because padding making this wider is not fun */ 56 | article { 57 | box-sizing: border-box; 58 | } 59 | 60 | /* The announcements element should never be wider than the page. */ 61 | .sb-announcement { 62 | max-width: 100%; 63 | } 64 | 65 | .sb-sidebar-primary, 66 | .sb-sidebar-secondary { 67 | flex-shrink: 0; 68 | width: 17rem; 69 | } 70 | 71 | .sb-announcement__inner { 72 | justify-content: center; 73 | 74 | box-sizing: border-box; 75 | height: 3rem; 76 | 77 | overflow-x: auto; 78 | white-space: nowrap; 79 | } 80 | 81 | /* Sidebars, with checkbox-based toggle */ 82 | .sb-sidebar-primary, 83 | .sb-sidebar-secondary { 84 | position: fixed; 85 | height: 100%; 86 | top: 0; 87 | } 88 | 89 | .sb-sidebar-primary { 90 | left: -17rem; 91 | transition: left 250ms ease-in-out; 92 | } 93 | .sb-sidebar-secondary { 94 | right: -17rem; 95 | transition: right 250ms ease-in-out; 96 | } 97 | 98 | .sb-sidebar-toggle { 99 | display: none; 100 | } 101 | .sb-sidebar-overlay { 102 | position: fixed; 103 | top: 0; 104 | width: 0; 105 | height: 0; 106 | 107 | transition: width 0ms ease 250ms, height 0ms ease 250ms, opacity 250ms ease; 108 | 109 | opacity: 0; 110 | background-color: rgba(0, 0, 0, 0.54); 111 | } 112 | 113 | #sb-sidebar-toggle--primary:checked 114 | ~ .sb-sidebar-overlay[for="sb-sidebar-toggle--primary"], 115 | #sb-sidebar-toggle--secondary:checked 116 | ~ .sb-sidebar-overlay[for="sb-sidebar-toggle--secondary"] { 117 | width: 100%; 118 | height: 100%; 119 | opacity: 1; 120 | transition: width 0ms ease, height 0ms ease, opacity 250ms ease; 121 | } 122 | 123 | #sb-sidebar-toggle--primary:checked ~ .sb-container .sb-sidebar-primary { 124 | left: 0; 125 | } 126 | #sb-sidebar-toggle--secondary:checked ~ .sb-container .sb-sidebar-secondary { 127 | right: 0; 128 | } 129 | 130 | /* Full-width mode */ 131 | .drop-secondary-sidebar-for-full-width-content 132 | .hide-when-secondary-sidebar-shown { 133 | display: none !important; 134 | } 135 | .drop-secondary-sidebar-for-full-width-content .sb-sidebar-secondary { 136 | display: none !important; 137 | } 138 | 139 | /* Mobile views */ 140 | .sb-page-width { 141 | width: 100%; 142 | } 143 | 144 | .sb-article-container, 145 | .sb-footer-content__inner, 146 | .drop-secondary-sidebar-for-full-width-content .sb-article, 147 | .drop-secondary-sidebar-for-full-width-content .match-content-width { 148 | width: 100vw; 149 | } 150 | 151 | .sb-article, 152 | .match-content-width { 153 | padding: 0 1rem; 154 | box-sizing: border-box; 155 | } 156 | 157 | @media (min-width: 32rem) { 158 | .sb-article, 159 | .match-content-width { 160 | padding: 0 2rem; 161 | } 162 | } 163 | 164 | /* Tablet views */ 165 | @media (min-width: 42rem) { 166 | .sb-article-container { 167 | width: auto; 168 | } 169 | .sb-footer-content__inner, 170 | .drop-secondary-sidebar-for-full-width-content .sb-article, 171 | .drop-secondary-sidebar-for-full-width-content .match-content-width { 172 | width: 42rem; 173 | } 174 | .sb-article, 175 | .match-content-width { 176 | width: 42rem; 177 | } 178 | } 179 | @media (min-width: 46rem) { 180 | .sb-footer-content__inner, 181 | .drop-secondary-sidebar-for-full-width-content .sb-article, 182 | .drop-secondary-sidebar-for-full-width-content .match-content-width { 183 | width: 46rem; 184 | } 185 | .sb-article, 186 | .match-content-width { 187 | width: 46rem; 188 | } 189 | } 190 | @media (min-width: 50rem) { 191 | .sb-footer-content__inner, 192 | .drop-secondary-sidebar-for-full-width-content .sb-article, 193 | .drop-secondary-sidebar-for-full-width-content .match-content-width { 194 | width: 50rem; 195 | } 196 | .sb-article, 197 | .match-content-width { 198 | width: 50rem; 199 | } 200 | } 201 | 202 | /* Tablet views */ 203 | @media (min-width: 59rem) { 204 | .sb-sidebar-secondary { 205 | position: static; 206 | } 207 | .hide-when-secondary-sidebar-shown { 208 | display: none !important; 209 | } 210 | .sb-footer-content__inner, 211 | .drop-secondary-sidebar-for-full-width-content .sb-article, 212 | .drop-secondary-sidebar-for-full-width-content .match-content-width { 213 | width: 59rem; 214 | } 215 | .sb-article, 216 | .match-content-width { 217 | width: 42rem; 218 | } 219 | } 220 | @media (min-width: 63rem) { 221 | .sb-footer-content__inner, 222 | .drop-secondary-sidebar-for-full-width-content .sb-article, 223 | .drop-secondary-sidebar-for-full-width-content .match-content-width { 224 | width: 63rem; 225 | } 226 | .sb-article, 227 | .match-content-width { 228 | width: 46rem; 229 | } 230 | } 231 | @media (min-width: 67rem) { 232 | .sb-footer-content__inner, 233 | .drop-secondary-sidebar-for-full-width-content .sb-article, 234 | .drop-secondary-sidebar-for-full-width-content .match-content-width { 235 | width: 67rem; 236 | } 237 | .sb-article, 238 | .match-content-width { 239 | width: 50rem; 240 | } 241 | } 242 | 243 | /* Desktop views */ 244 | @media (min-width: 76rem) { 245 | .sb-sidebar-primary { 246 | position: static; 247 | } 248 | .hide-when-primary-sidebar-shown { 249 | display: none !important; 250 | } 251 | .sb-footer-content__inner, 252 | .drop-secondary-sidebar-for-full-width-content .sb-article, 253 | .drop-secondary-sidebar-for-full-width-content .match-content-width { 254 | width: 59rem; 255 | } 256 | .sb-article, 257 | .match-content-width { 258 | width: 42rem; 259 | } 260 | } 261 | 262 | /* Full desktop views */ 263 | @media (min-width: 80rem) { 264 | .sb-article, 265 | .match-content-width { 266 | width: 46rem; 267 | } 268 | .sb-footer-content__inner, 269 | .drop-secondary-sidebar-for-full-width-content .sb-article, 270 | .drop-secondary-sidebar-for-full-width-content .match-content-width { 271 | width: 63rem; 272 | } 273 | } 274 | 275 | @media (min-width: 84rem) { 276 | .sb-article, 277 | .match-content-width { 278 | width: 50rem; 279 | } 280 | .sb-footer-content__inner, 281 | .drop-secondary-sidebar-for-full-width-content .sb-article, 282 | .drop-secondary-sidebar-for-full-width-content .match-content-width { 283 | width: 67rem; 284 | } 285 | } 286 | 287 | @media (min-width: 88rem) { 288 | .sb-footer-content__inner, 289 | .drop-secondary-sidebar-for-full-width-content .sb-article, 290 | .drop-secondary-sidebar-for-full-width-content .match-content-width { 291 | width: 67rem; 292 | } 293 | .sb-page-width { 294 | width: 88rem; 295 | } 296 | } 297 | -------------------------------------------------------------------------------- /docs/_static/sphinx_highlight.js: -------------------------------------------------------------------------------- 1 | /* Highlighting utilities for Sphinx HTML documentation. */ 2 | "use strict"; 3 | 4 | const SPHINX_HIGHLIGHT_ENABLED = true 5 | 6 | /** 7 | * highlight a given string on a node by wrapping it in 8 | * span elements with the given class name. 9 | */ 10 | const _highlight = (node, addItems, text, className) => { 11 | if (node.nodeType === Node.TEXT_NODE) { 12 | const val = node.nodeValue; 13 | const parent = node.parentNode; 14 | const pos = val.toLowerCase().indexOf(text); 15 | if ( 16 | pos >= 0 && 17 | !parent.classList.contains(className) && 18 | !parent.classList.contains("nohighlight") 19 | ) { 20 | let span; 21 | 22 | const closestNode = parent.closest("body, svg, foreignObject"); 23 | const isInSVG = closestNode && closestNode.matches("svg"); 24 | if (isInSVG) { 25 | span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); 26 | } else { 27 | span = document.createElement("span"); 28 | span.classList.add(className); 29 | } 30 | 31 | span.appendChild(document.createTextNode(val.substr(pos, text.length))); 32 | parent.insertBefore( 33 | span, 34 | parent.insertBefore( 35 | document.createTextNode(val.substr(pos + text.length)), 36 | node.nextSibling 37 | ) 38 | ); 39 | node.nodeValue = val.substr(0, pos); 40 | 41 | if (isInSVG) { 42 | const rect = document.createElementNS( 43 | "http://www.w3.org/2000/svg", 44 | "rect" 45 | ); 46 | const bbox = parent.getBBox(); 47 | rect.x.baseVal.value = bbox.x; 48 | rect.y.baseVal.value = bbox.y; 49 | rect.width.baseVal.value = bbox.width; 50 | rect.height.baseVal.value = bbox.height; 51 | rect.setAttribute("class", className); 52 | addItems.push({ parent: parent, target: rect }); 53 | } 54 | } 55 | } else if (node.matches && !node.matches("button, select, textarea")) { 56 | node.childNodes.forEach((el) => _highlight(el, addItems, text, className)); 57 | } 58 | }; 59 | const _highlightText = (thisNode, text, className) => { 60 | let addItems = []; 61 | _highlight(thisNode, addItems, text, className); 62 | addItems.forEach((obj) => 63 | obj.parent.insertAdjacentElement("beforebegin", obj.target) 64 | ); 65 | }; 66 | 67 | /** 68 | * Small JavaScript module for the documentation. 69 | */ 70 | const SphinxHighlight = { 71 | 72 | /** 73 | * highlight the search words provided in localstorage in the text 74 | */ 75 | highlightSearchWords: () => { 76 | if (!SPHINX_HIGHLIGHT_ENABLED) return; // bail if no highlight 77 | 78 | // get and clear terms from localstorage 79 | const url = new URL(window.location); 80 | const highlight = 81 | localStorage.getItem("sphinx_highlight_terms") 82 | || url.searchParams.get("highlight") 83 | || ""; 84 | localStorage.removeItem("sphinx_highlight_terms") 85 | url.searchParams.delete("highlight"); 86 | window.history.replaceState({}, "", url); 87 | 88 | // get individual terms from highlight string 89 | const terms = highlight.toLowerCase().split(/\s+/).filter(x => x); 90 | if (terms.length === 0) return; // nothing to do 91 | 92 | // There should never be more than one element matching "div.body" 93 | const divBody = document.querySelectorAll("div.body"); 94 | const body = divBody.length ? divBody[0] : document.querySelector("body"); 95 | window.setTimeout(() => { 96 | terms.forEach((term) => _highlightText(body, term, "highlighted")); 97 | }, 10); 98 | 99 | const searchBox = document.getElementById("searchbox"); 100 | if (searchBox === null) return; 101 | searchBox.appendChild( 102 | document 103 | .createRange() 104 | .createContextualFragment( 105 | '" 109 | ) 110 | ); 111 | }, 112 | 113 | /** 114 | * helper function to hide the search marks again 115 | */ 116 | hideSearchWords: () => { 117 | document 118 | .querySelectorAll("#searchbox .highlight-link") 119 | .forEach((el) => el.remove()); 120 | document 121 | .querySelectorAll("span.highlighted") 122 | .forEach((el) => el.classList.remove("highlighted")); 123 | localStorage.removeItem("sphinx_highlight_terms") 124 | }, 125 | 126 | initEscapeListener: () => { 127 | // only install a listener if it is really needed 128 | if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return; 129 | 130 | document.addEventListener("keydown", (event) => { 131 | // bail for input elements 132 | if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; 133 | // bail with special keys 134 | if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return; 135 | if (DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS && (event.key === "Escape")) { 136 | SphinxHighlight.hideSearchWords(); 137 | event.preventDefault(); 138 | } 139 | }); 140 | }, 141 | }; 142 | 143 | _ready(SphinxHighlight.highlightSearchWords); 144 | _ready(SphinxHighlight.initEscapeListener); 145 | -------------------------------------------------------------------------------- /docs/_static/styles/furo-extensions.css: -------------------------------------------------------------------------------- 1 | #furo-sidebar-ad-placement{padding:var(--sidebar-item-spacing-vertical) var(--sidebar-item-spacing-horizontal)}#furo-sidebar-ad-placement .ethical-sidebar{background:var(--color-background-secondary);border:none;box-shadow:none}#furo-sidebar-ad-placement .ethical-sidebar:hover{background:var(--color-background-hover)}#furo-sidebar-ad-placement .ethical-sidebar a{color:var(--color-foreground-primary)}#furo-sidebar-ad-placement .ethical-callout a{color:var(--color-foreground-secondary)!important}#furo-readthedocs-versions{background:transparent;display:block;position:static;width:100%}#furo-readthedocs-versions .rst-versions{background:#1a1c1e}#furo-readthedocs-versions .rst-current-version{background:var(--color-sidebar-item-background);cursor:unset}#furo-readthedocs-versions .rst-current-version:hover{background:var(--color-sidebar-item-background)}#furo-readthedocs-versions .rst-current-version .fa-book{color:var(--color-foreground-primary)}#furo-readthedocs-versions>.rst-other-versions{padding:0}#furo-readthedocs-versions>.rst-other-versions small{opacity:1}#furo-readthedocs-versions .injected .rst-versions{position:unset}#furo-readthedocs-versions:focus-within,#furo-readthedocs-versions:hover{box-shadow:0 0 0 1px var(--color-sidebar-background-border)}#furo-readthedocs-versions:focus-within .rst-current-version,#furo-readthedocs-versions:hover .rst-current-version{background:#1a1c1e;font-size:inherit;height:auto;line-height:inherit;padding:12px;text-align:right}#furo-readthedocs-versions:focus-within .rst-current-version .fa-book,#furo-readthedocs-versions:hover .rst-current-version .fa-book{color:#fff;float:left}#furo-readthedocs-versions:focus-within .fa-caret-down,#furo-readthedocs-versions:hover .fa-caret-down{display:none}#furo-readthedocs-versions:focus-within .injected,#furo-readthedocs-versions:focus-within .rst-current-version,#furo-readthedocs-versions:focus-within .rst-other-versions,#furo-readthedocs-versions:hover .injected,#furo-readthedocs-versions:hover .rst-current-version,#furo-readthedocs-versions:hover .rst-other-versions{display:block}#furo-readthedocs-versions:focus-within>.rst-current-version,#furo-readthedocs-versions:hover>.rst-current-version{display:none}.highlight:hover button.copybtn{color:var(--color-code-foreground)}.highlight button.copybtn{align-items:center;background-color:var(--color-code-background);border:none;color:var(--color-background-item);cursor:pointer;height:1.25em;opacity:1;right:.5rem;top:.625rem;transition:color .3s,opacity .3s;width:1.25em}.highlight button.copybtn:hover{background-color:var(--color-code-background);color:var(--color-brand-content)}.highlight button.copybtn:after{background-color:transparent;color:var(--color-code-foreground);display:none}.highlight button.copybtn.success{color:#22863a;transition:color 0ms}.highlight button.copybtn.success:after{display:block}.highlight button.copybtn svg{padding:0}body{--sd-color-primary:var(--color-brand-primary);--sd-color-primary-highlight:var(--color-brand-content);--sd-color-primary-text:var(--color-background-primary);--sd-color-shadow:rgba(0,0,0,.05);--sd-color-card-border:var(--color-card-border);--sd-color-card-border-hover:var(--color-brand-content);--sd-color-card-background:var(--color-card-background);--sd-color-card-text:var(--color-foreground-primary);--sd-color-card-header:var(--color-card-marginals-background);--sd-color-card-footer:var(--color-card-marginals-background);--sd-color-tabs-label-active:var(--color-brand-content);--sd-color-tabs-label-hover:var(--color-foreground-muted);--sd-color-tabs-label-inactive:var(--color-foreground-muted);--sd-color-tabs-underline-active:var(--color-brand-content);--sd-color-tabs-underline-hover:var(--color-foreground-border);--sd-color-tabs-underline-inactive:var(--color-background-border);--sd-color-tabs-overline:var(--color-background-border);--sd-color-tabs-underline:var(--color-background-border)}.sd-tab-content{box-shadow:0 -2px var(--sd-color-tabs-overline),0 1px var(--sd-color-tabs-underline)}.sd-card{box-shadow:0 .1rem .25rem var(--sd-color-shadow),0 0 .0625rem rgba(0,0,0,.1)}.sd-shadow-sm{box-shadow:0 .1rem .25rem var(--sd-color-shadow),0 0 .0625rem rgba(0,0,0,.1)!important}.sd-shadow-md{box-shadow:0 .3rem .75rem var(--sd-color-shadow),0 0 .0625rem rgba(0,0,0,.1)!important}.sd-shadow-lg{box-shadow:0 .6rem 1.5rem var(--sd-color-shadow),0 0 .0625rem rgba(0,0,0,.1)!important}.sd-card-hover:hover{transform:none}.sd-cards-carousel{gap:.25rem;padding:.25rem}body{--tabs--label-text:var(--color-foreground-muted);--tabs--label-text--hover:var(--color-foreground-muted);--tabs--label-text--active:var(--color-brand-content);--tabs--label-text--active--hover:var(--color-brand-content);--tabs--label-background:transparent;--tabs--label-background--hover:transparent;--tabs--label-background--active:transparent;--tabs--label-background--active--hover:transparent;--tabs--padding-x:0.25em;--tabs--margin-x:1em;--tabs--border:var(--color-background-border);--tabs--label-border:transparent;--tabs--label-border--hover:var(--color-foreground-muted);--tabs--label-border--active:var(--color-brand-content);--tabs--label-border--active--hover:var(--color-brand-content)}[role=main] .container{max-width:none;padding-left:0;padding-right:0}.shadow.docutils{border:none;box-shadow:0 .2rem .5rem rgba(0,0,0,.05),0 0 .0625rem rgba(0,0,0,.1)!important}.sphinx-bs .card{background-color:var(--color-background-secondary);color:var(--color-foreground)} 2 | /*# sourceMappingURL=furo-extensions.css.map*/ -------------------------------------------------------------------------------- /docs/_static/styles/furo-extensions.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"styles/furo-extensions.css","mappings":"AAGA,2BACE,oFACA,4CAKE,6CAHA,YACA,eAEA,CACA,kDACE,yCAEF,8CACE,sCAEJ,8CACE,kDAEJ,2BAGE,uBACA,cAHA,gBACA,UAEA,CAGA,yCACE,mBAEF,gDAEE,gDADA,YACA,CACA,sDACE,gDACF,yDACE,sCAEJ,+CACE,UACA,qDACE,UAGF,mDACE,eAEJ,yEAEE,4DAEA,mHASE,mBAPA,kBAEA,YADA,oBAGA,aADA,gBAIA,CAEA,qIAEE,WADA,UACA,CAEJ,uGACE,aAEF,iUAGE,cAEF,mHACE,aC1EJ,gCACE,mCAEF,0BAKE,mBAUA,8CACA,YAFA,mCAKA,eAZA,cALA,UASA,YADA,YAYA,iCAdA,YAcA,CAEA,gCAEE,8CADA,gCACA,CAEF,gCAGE,6BADA,mCADA,YAEA,CAEF,kCAEE,cADA,oBACA,CACA,wCACE,cAEJ,8BACE,UC5CN,KAEE,6CAA8C,CAC9C,uDAAwD,CACxD,uDAAwD,CAGxD,iCAAsC,CAGtC,+CAAgD,CAChD,uDAAwD,CACxD,uDAAwD,CACxD,oDAAqD,CACrD,6DAA8D,CAC9D,6DAA8D,CAG9D,uDAAwD,CACxD,yDAA0D,CAC1D,4DAA6D,CAC7D,2DAA4D,CAC5D,8DAA+D,CAC/D,iEAAkE,CAClE,uDAAwD,CACxD,wDAAyD,CAG3D,gBACE,qFAGF,SACE,6EAEF,cACE,uFAEF,cACE,uFAEF,cACE,uFAGF,qBACE,eAEF,mBACE,WACA,eChDF,KACE,gDAAiD,CACjD,uDAAwD,CACxD,qDAAsD,CACtD,4DAA6D,CAC7D,oCAAqC,CACrC,2CAA4C,CAC5C,4CAA6C,CAC7C,mDAAoD,CACpD,wBAAyB,CACzB,oBAAqB,CACrB,6CAA8C,CAC9C,gCAAiC,CACjC,yDAA0D,CAC1D,uDAAwD,CACxD,8DAA+D,CCbjE,uBACE,eACA,eACA,gBAGF,iBACE,YACA,+EAGF,iBACE,mDACA","sources":["webpack:///./src/furo/assets/styles/extensions/_readthedocs.sass","webpack:///./src/furo/assets/styles/extensions/_copybutton.sass","webpack:///./src/furo/assets/styles/extensions/_sphinx-design.sass","webpack:///./src/furo/assets/styles/extensions/_sphinx-inline-tabs.sass","webpack:///./src/furo/assets/styles/extensions/_sphinx-panels.sass"],"sourcesContent":["// This file contains the styles used for tweaking how ReadTheDoc's embedded\n// contents would show up inside the theme.\n\n#furo-sidebar-ad-placement\n padding: var(--sidebar-item-spacing-vertical) var(--sidebar-item-spacing-horizontal)\n .ethical-sidebar\n // Remove the border and box-shadow.\n border: none\n box-shadow: none\n // Manage the background colors.\n background: var(--color-background-secondary)\n &:hover\n background: var(--color-background-hover)\n // Ensure the text is legible.\n a\n color: var(--color-foreground-primary)\n\n .ethical-callout a\n color: var(--color-foreground-secondary) !important\n\n#furo-readthedocs-versions\n position: static\n width: 100%\n background: transparent\n display: block\n\n // Make the background color fit with the theme's aesthetic.\n .rst-versions\n background: rgb(26, 28, 30)\n\n .rst-current-version\n cursor: unset\n background: var(--color-sidebar-item-background)\n &:hover\n background: var(--color-sidebar-item-background)\n .fa-book\n color: var(--color-foreground-primary)\n\n > .rst-other-versions\n padding: 0\n small\n opacity: 1\n\n .injected\n .rst-versions\n position: unset\n\n &:hover,\n &:focus-within\n box-shadow: 0 0 0 1px var(--color-sidebar-background-border)\n\n .rst-current-version\n // Undo the tweaks done in RTD's CSS\n font-size: inherit\n line-height: inherit\n height: auto\n text-align: right\n padding: 12px\n\n // Match the rest of the body\n background: #1a1c1e\n\n .fa-book\n float: left\n color: white\n\n .fa-caret-down\n display: none\n\n .rst-current-version,\n .rst-other-versions,\n .injected\n display: block\n\n > .rst-current-version\n display: none\n",".highlight\n &:hover button.copybtn\n color: var(--color-code-foreground)\n\n button.copybtn\n // Make it visible\n opacity: 1\n\n // Align things correctly\n align-items: center\n\n height: 1.25em\n width: 1.25em\n\n top: 0.625rem // $code-spacing-vertical\n right: 0.5rem\n\n // Make it look better\n color: var(--color-background-item)\n background-color: var(--color-code-background)\n border: none\n\n // Change to cursor to make it obvious that you can click on it\n cursor: pointer\n\n // Transition smoothly, for aesthetics\n transition: color 300ms, opacity 300ms\n\n &:hover\n color: var(--color-brand-content)\n background-color: var(--color-code-background)\n\n &::after\n display: none\n color: var(--color-code-foreground)\n background-color: transparent\n\n &.success\n transition: color 0ms\n color: #22863a\n &::after\n display: block\n\n svg\n padding: 0\n","body\n // Colors\n --sd-color-primary: var(--color-brand-primary)\n --sd-color-primary-highlight: var(--color-brand-content)\n --sd-color-primary-text: var(--color-background-primary)\n\n // Shadows\n --sd-color-shadow: rgba(0, 0, 0, 0.05)\n\n // Cards\n --sd-color-card-border: var(--color-card-border)\n --sd-color-card-border-hover: var(--color-brand-content)\n --sd-color-card-background: var(--color-card-background)\n --sd-color-card-text: var(--color-foreground-primary)\n --sd-color-card-header: var(--color-card-marginals-background)\n --sd-color-card-footer: var(--color-card-marginals-background)\n\n // Tabs\n --sd-color-tabs-label-active: var(--color-brand-content)\n --sd-color-tabs-label-hover: var(--color-foreground-muted)\n --sd-color-tabs-label-inactive: var(--color-foreground-muted)\n --sd-color-tabs-underline-active: var(--color-brand-content)\n --sd-color-tabs-underline-hover: var(--color-foreground-border)\n --sd-color-tabs-underline-inactive: var(--color-background-border)\n --sd-color-tabs-overline: var(--color-background-border)\n --sd-color-tabs-underline: var(--color-background-border)\n\n// Tabs\n.sd-tab-content\n box-shadow: 0 -2px var(--sd-color-tabs-overline), 0 1px var(--sd-color-tabs-underline)\n\n// Shadows\n.sd-card // Have a shadow by default\n box-shadow: 0 0.1rem 0.25rem var(--sd-color-shadow), 0 0 0.0625rem rgba(0, 0, 0, 0.1)\n\n.sd-shadow-sm\n box-shadow: 0 0.1rem 0.25rem var(--sd-color-shadow), 0 0 0.0625rem rgba(0, 0, 0, 0.1) !important\n\n.sd-shadow-md\n box-shadow: 0 0.3rem 0.75rem var(--sd-color-shadow), 0 0 0.0625rem rgba(0, 0, 0, 0.1) !important\n\n.sd-shadow-lg\n box-shadow: 0 0.6rem 1.5rem var(--sd-color-shadow), 0 0 0.0625rem rgba(0, 0, 0, 0.1) !important\n\n// Cards\n.sd-card-hover:hover // Don't change scale on hover\n transform: none\n\n.sd-cards-carousel // Have a bit of gap in the carousel by default\n gap: 0.25rem\n padding: 0.25rem\n","// This file contains styles to tweak sphinx-inline-tabs to work well with Furo.\n\nbody\n --tabs--label-text: var(--color-foreground-muted)\n --tabs--label-text--hover: var(--color-foreground-muted)\n --tabs--label-text--active: var(--color-brand-content)\n --tabs--label-text--active--hover: var(--color-brand-content)\n --tabs--label-background: transparent\n --tabs--label-background--hover: transparent\n --tabs--label-background--active: transparent\n --tabs--label-background--active--hover: transparent\n --tabs--padding-x: 0.25em\n --tabs--margin-x: 1em\n --tabs--border: var(--color-background-border)\n --tabs--label-border: transparent\n --tabs--label-border--hover: var(--color-foreground-muted)\n --tabs--label-border--active: var(--color-brand-content)\n --tabs--label-border--active--hover: var(--color-brand-content)\n","// This file contains styles to tweak sphinx-panels to work well with Furo.\n\n// sphinx-panels includes Bootstrap 4, which uses .container which can conflict\n// with docutils' `.. container::` directive.\n[role=\"main\"] .container\n max-width: initial\n padding-left: initial\n padding-right: initial\n\n// Make the panels look nicer!\n.shadow.docutils\n border: none\n box-shadow: 0 0.2rem 0.5rem rgba(0, 0, 0, 0.05), 0 0 0.0625rem rgba(0, 0, 0, 0.1) !important\n\n// Make panel colors respond to dark mode\n.sphinx-bs .card\n background-color: var(--color-background-secondary)\n color: var(--color-foreground)\n"],"names":[],"sourceRoot":""} -------------------------------------------------------------------------------- /docs/objects.inv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngrok/ngrok-api-python/11967f08bace1ca6b0a705bb0e88ef8af3b78620/docs/objects.inv -------------------------------------------------------------------------------- /docs/search.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Search - ngrok-api documentation 8 | 9 | 10 | 11 | 12 | 13 | 14 | 35 | 36 | 37 | 40 | 41 | 42 | 43 | 44 | Contents 45 | 46 | 47 | 48 | 49 | 50 | Menu 51 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | Expand 60 | 62 | 63 | 64 | 65 | 66 | Light mode 67 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | Dark mode 82 | 84 | 85 | 86 | 87 | 88 | 89 | Auto light/dark mode 90 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 108 | 111 | 112 | 113 | 114 |
115 |
116 |
117 | 121 |
122 | 125 |
126 |
127 | 133 |
134 | 138 |
139 |
140 | 227 |
228 |
229 |
230 | 231 | 232 | 233 | 234 | Back to top 235 | 236 |
237 |
238 | 244 |
245 | 249 |
250 |
251 | 252 | 260 | 261 |
262 | 263 |
264 |
265 |
266 | 267 | 271 |
272 |
273 | 276 | Made with Sphinx and @pradyunsg's 277 | 278 | Furo 279 | 280 |
281 |
282 | 283 |
284 |
285 | 286 |
287 |
288 | 293 |
294 |
295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | -------------------------------------------------------------------------------- /mypy.ini: -------------------------------------------------------------------------------- 1 | # Code generated for API Clients. DO NOT EDIT. 2 | 3 | [mypy] 4 | # TODO: update our codebase's types and remove this 5 | implicit_optional = True 6 | -------------------------------------------------------------------------------- /ngrok/__init__.py: -------------------------------------------------------------------------------- 1 | # Code generated for API Clients. DO NOT EDIT. 2 | 3 | from .client import Client 4 | from .error import Error, NotFoundError 5 | 6 | __version__ = "0.0.0" 7 | -------------------------------------------------------------------------------- /ngrok/client.py: -------------------------------------------------------------------------------- 1 | # Code generated for API Clients. DO NOT EDIT. 2 | 3 | 4 | from __future__ import annotations 5 | import collections 6 | import os 7 | from .services import * 8 | 9 | 10 | class Client(object): 11 | def __init__(self, api_key: str, base_url: str = "https://api.ngrok.com"): 12 | self.http_client = HTTPClient(api_key, base_url) 13 | 14 | @property 15 | def abuse_reports(self) -> AbuseReportsClient: 16 | """Abuse Reports allow you to submit take-down requests for URLs hosted by 17 | ngrok that violate ngrok's terms of service.""" 18 | return AbuseReportsClient(self) 19 | 20 | @property 21 | def agent_ingresses(self) -> AgentIngressesClient: 22 | return AgentIngressesClient(self) 23 | 24 | @property 25 | def api_keys(self) -> APIKeysClient: 26 | """API Keys are used to authenticate to the `ngrok 27 | API `_. You may use the API itself 28 | to provision and manage API Keys but you'll need to provision your first API 29 | key from the `API Keys page `_ on your 30 | ngrok.com dashboard.""" 31 | return APIKeysClient(self) 32 | 33 | @property 34 | def application_sessions(self) -> ApplicationSessionsClient: 35 | return ApplicationSessionsClient(self) 36 | 37 | @property 38 | def application_users(self) -> ApplicationUsersClient: 39 | return ApplicationUsersClient(self) 40 | 41 | @property 42 | def tunnel_sessions(self) -> TunnelSessionsClient: 43 | """Tunnel Sessions represent instances of ngrok agents or SSH reverse tunnel 44 | sessions that are running and connected to the ngrok service. Each tunnel 45 | session can include one or more Tunnels.""" 46 | return TunnelSessionsClient(self) 47 | 48 | @property 49 | def bot_users(self) -> BotUsersClient: 50 | return BotUsersClient(self) 51 | 52 | @property 53 | def certificate_authorities(self) -> CertificateAuthoritiesClient: 54 | """Certificate Authorities are x509 certificates that are used to sign other 55 | x509 certificates. Attach a Certificate Authority to the Mutual TLS module 56 | to verify that the TLS certificate presented by a client has been signed by 57 | this CA. Certificate Authorities are used only for mTLS validation only and 58 | thus a private key is not included in the resource.""" 59 | return CertificateAuthoritiesClient(self) 60 | 61 | @property 62 | def credentials(self) -> CredentialsClient: 63 | """Tunnel Credentials are ngrok agent authtokens. They authorize the ngrok 64 | agent to connect the ngrok service as your account. They are installed with 65 | the ``ngrok config add-authtoken`` command or by specifying it in the ``ngrok.yml`` 66 | configuration file with the ``authtoken`` property.""" 67 | return CredentialsClient(self) 68 | 69 | @property 70 | def endpoints(self) -> EndpointsClient: 71 | """Endpoints provides an API for querying the endpoint objects 72 | which define what tunnel or edge is used to serve a hostport. 73 | Only active endpoints associated with a tunnel or backend are returned.""" 74 | return EndpointsClient(self) 75 | 76 | @property 77 | def event_destinations(self) -> EventDestinationsClient: 78 | return EventDestinationsClient(self) 79 | 80 | @property 81 | def event_subscriptions(self) -> EventSubscriptionsClient: 82 | return EventSubscriptionsClient(self) 83 | 84 | @property 85 | def event_sources(self) -> EventSourcesClient: 86 | return EventSourcesClient(self) 87 | 88 | @property 89 | def ip_policies(self) -> IPPoliciesClient: 90 | """IP Policies are reusable groups of CIDR ranges with an ``allow`` or ``deny`` 91 | action. They can be attached to endpoints via the Endpoint Configuration IP 92 | Policy module. They can also be used with IP Restrictions to control source 93 | IP ranges that can start tunnel sessions and connect to the API and dashboard.""" 94 | return IPPoliciesClient(self) 95 | 96 | @property 97 | def ip_policy_rules(self) -> IPPolicyRulesClient: 98 | """IP Policy Rules are the IPv4 or IPv6 CIDRs entries that 99 | make up an IP Policy.""" 100 | return IPPolicyRulesClient(self) 101 | 102 | @property 103 | def ip_restrictions(self) -> IPRestrictionsClient: 104 | """An IP restriction is a restriction placed on the CIDRs that are allowed to 105 | initiate traffic to a specific aspect of your ngrok account. An IP 106 | restriction has a type which defines the ingress it applies to. IP 107 | restrictions can be used to enforce the source IPs that can make API 108 | requests, log in to the dashboard, start ngrok agents, and connect to your 109 | public-facing endpoints.""" 110 | return IPRestrictionsClient(self) 111 | 112 | @property 113 | def reserved_addrs(self) -> ReservedAddrsClient: 114 | """Reserved Addresses are TCP addresses that can be used to listen for traffic. 115 | TCP address hostnames and ports are assigned by ngrok, they cannot be 116 | chosen.""" 117 | return ReservedAddrsClient(self) 118 | 119 | @property 120 | def reserved_domains(self) -> ReservedDomainsClient: 121 | """Reserved Domains are hostnames that you can listen for traffic on. Domains 122 | can be used to listen for http, https or tls traffic. You may use a domain 123 | that you own by creating a CNAME record specified in the returned resource. 124 | This CNAME record points traffic for that domain to ngrok's edge servers.""" 125 | return ReservedDomainsClient(self) 126 | 127 | @property 128 | def ssh_certificate_authorities(self) -> SSHCertificateAuthoritiesClient: 129 | """An SSH Certificate Authority is a pair of an SSH Certificate and its private 130 | key that can be used to sign other SSH host and user certificates.""" 131 | return SSHCertificateAuthoritiesClient(self) 132 | 133 | @property 134 | def ssh_credentials(self) -> SSHCredentialsClient: 135 | """SSH Credentials are SSH public keys that can be used to start SSH tunnels 136 | via the ngrok SSH tunnel gateway.""" 137 | return SSHCredentialsClient(self) 138 | 139 | @property 140 | def ssh_host_certificates(self) -> SSHHostCertificatesClient: 141 | """SSH Host Certificates along with the corresponding private key allows an SSH 142 | server to assert its authenticity to connecting SSH clients who trust the 143 | SSH Certificate Authority that was used to sign the certificate.""" 144 | return SSHHostCertificatesClient(self) 145 | 146 | @property 147 | def ssh_user_certificates(self) -> SSHUserCertificatesClient: 148 | """SSH User Certificates are presented by SSH clients when connecting to an SSH 149 | server to authenticate their connection. The SSH server must trust the SSH 150 | Certificate Authority used to sign the certificate.""" 151 | return SSHUserCertificatesClient(self) 152 | 153 | @property 154 | def tls_certificates(self) -> TLSCertificatesClient: 155 | """TLS Certificates are pairs of x509 certificates and their matching private 156 | key that can be used to terminate TLS traffic. TLS certificates are unused 157 | until they are attached to a Domain. TLS Certificates may also be 158 | provisioned by ngrok automatically for domains on which you have enabled 159 | automated certificate provisioning.""" 160 | return TLSCertificatesClient(self) 161 | 162 | @property 163 | def tunnels(self) -> TunnelsClient: 164 | """Tunnels provide endpoints to access services exposed by a running ngrok 165 | agent tunnel session or an SSH reverse tunnel session.""" 166 | return TunnelsClient(self) 167 | 168 | @property 169 | def backends(self): 170 | ns = collections.namedtuple( 171 | "Namespace", 172 | [ 173 | "failover", 174 | "http_response", 175 | "static_address", 176 | "tunnel_group", 177 | "weighted", 178 | ], 179 | ) 180 | return ns( 181 | failover=FailoverBackendsClient(self), 182 | http_response=HTTPResponseBackendsClient(self), 183 | static_address=StaticBackendsClient(self), 184 | tunnel_group=TunnelGroupBackendsClient(self), 185 | weighted=WeightedBackendsClient(self), 186 | ) 187 | 188 | @property 189 | def edges(self): 190 | ns = collections.namedtuple( 191 | "Namespace", 192 | [ 193 | "https_routes", 194 | "https", 195 | "tcp", 196 | "tls", 197 | ], 198 | ) 199 | return ns( 200 | https_routes=EdgesHTTPSRoutesClient(self), 201 | https=EdgesHTTPSClient(self), 202 | tcp=EdgesTCPClient(self), 203 | tls=EdgesTLSClient(self), 204 | ) 205 | 206 | @property 207 | def edge_modules(self): 208 | ns = collections.namedtuple( 209 | "Namespace", 210 | [ 211 | "https_edge_mutual_tls", 212 | "https_edge_tls_termination", 213 | "https_edge_route_backend", 214 | "https_edge_route_ip_restriction", 215 | "https_edge_route_request_headers", 216 | "https_edge_route_response_headers", 217 | "https_edge_route_compression", 218 | "https_edge_route_circuit_breaker", 219 | "https_edge_route_webhook_verification", 220 | "https_edge_route_oauth", 221 | "https_edge_route_saml", 222 | "https_edge_route_oidc", 223 | "https_edge_route_websocket_tcp_converter", 224 | "https_edge_route_user_agent_filter", 225 | "https_edge_route_traffic_policy", 226 | "tcp_edge_backend", 227 | "tcp_edge_ip_restriction", 228 | "tcp_edge_traffic_policy", 229 | "tls_edge_backend", 230 | "tls_edge_ip_restriction", 231 | "tls_edge_mutual_tls", 232 | "tls_edge_tls_termination", 233 | "tls_edge_traffic_policy", 234 | ], 235 | ) 236 | return ns( 237 | https_edge_mutual_tls=HTTPSEdgeMutualTLSModuleClient(self), 238 | https_edge_tls_termination=HTTPSEdgeTLSTerminationModuleClient(self), 239 | https_edge_route_backend=EdgeRouteBackendModuleClient(self), 240 | https_edge_route_ip_restriction=EdgeRouteIPRestrictionModuleClient(self), 241 | https_edge_route_request_headers=EdgeRouteRequestHeadersModuleClient(self), 242 | https_edge_route_response_headers=EdgeRouteResponseHeadersModuleClient( 243 | self 244 | ), 245 | https_edge_route_compression=EdgeRouteCompressionModuleClient(self), 246 | https_edge_route_circuit_breaker=EdgeRouteCircuitBreakerModuleClient(self), 247 | https_edge_route_webhook_verification=EdgeRouteWebhookVerificationModuleClient( 248 | self 249 | ), 250 | https_edge_route_oauth=EdgeRouteOAuthModuleClient(self), 251 | https_edge_route_saml=EdgeRouteSAMLModuleClient(self), 252 | https_edge_route_oidc=EdgeRouteOIDCModuleClient(self), 253 | https_edge_route_websocket_tcp_converter=EdgeRouteWebsocketTCPConverterModuleClient( 254 | self 255 | ), 256 | https_edge_route_user_agent_filter=EdgeRouteUserAgentFilterModuleClient( 257 | self 258 | ), 259 | https_edge_route_traffic_policy=EdgeRouteTrafficPolicyModuleClient(self), 260 | tcp_edge_backend=TCPEdgeBackendModuleClient(self), 261 | tcp_edge_ip_restriction=TCPEdgeIPRestrictionModuleClient(self), 262 | tcp_edge_traffic_policy=TCPEdgeTrafficPolicyModuleClient(self), 263 | tls_edge_backend=TLSEdgeBackendModuleClient(self), 264 | tls_edge_ip_restriction=TLSEdgeIPRestrictionModuleClient(self), 265 | tls_edge_mutual_tls=TLSEdgeMutualTLSModuleClient(self), 266 | tls_edge_tls_termination=TLSEdgeTLSTerminationModuleClient(self), 267 | tls_edge_traffic_policy=TLSEdgeTrafficPolicyModuleClient(self), 268 | ) 269 | -------------------------------------------------------------------------------- /ngrok/error.py: -------------------------------------------------------------------------------- 1 | # Code generated for API Clients. DO NOT EDIT. 2 | 3 | from typing import Any, Optional 4 | 5 | 6 | class Error(Exception): 7 | """Raised by failed ngrok API operations. 8 | 9 | This class encapsulates details about the error to make it simple for callers 10 | to introspect the error and take action on it. 11 | 12 | :param error_code: The unique ngrok error code indicating why the operation failed. 13 | :param message: Human-readable string explaining the error. 14 | :param http_status_code: HTTP status code returned by the server. 15 | :param details: Arbitrary additional details about the error. 16 | """ 17 | 18 | def __init__( 19 | self, 20 | error_code: Optional[int], 21 | message: str, 22 | http_status_code: int, 23 | details: Any, 24 | ): 25 | super().__init__(self, message) 26 | self.error_code = error_code 27 | self.http_status_code = http_status_code 28 | self.details = details 29 | 30 | @property 31 | def operation_id(self): 32 | """ 33 | OperationID returns the unique trace ID assigned by ngrok to this API 34 | request. 35 | """ 36 | return self.details.get("operation_id") 37 | 38 | 39 | class NotFoundError(Error): 40 | """Raised if the http_status_code of an API operation is 404. 41 | This is a separate class to make this common condition easier to handle. 42 | """ 43 | 44 | pass 45 | -------------------------------------------------------------------------------- /ngrok/http_client.py: -------------------------------------------------------------------------------- 1 | # Code generated for API Clients. DO NOT EDIT. 2 | 3 | from __future__ import annotations 4 | from collections.abc import Iterator 5 | from typing import Any, Mapping, Dict, Generic, Optional 6 | from platform import python_version 7 | import os 8 | import requests 9 | import sys 10 | 11 | from .error import Error, NotFoundError 12 | 13 | 14 | class HTTPClient(object): 15 | """low-level api client for communicating with ngrok's http api. 16 | do not use this object directly, it is intended for internal use only and no 17 | guarantees are made about the stability of its APIs 18 | """ 19 | 20 | def __init__(self, api_key: str, base_url: str): 21 | self.api_key = api_key 22 | self.base_url = base_url 23 | 24 | def get(self, path: str, params: Mapping[str, str]) -> Dict[str, Any]: 25 | return self.jsonDo("get", path, query_params=params) 26 | 27 | def post(self, path: str, data: Mapping[str, Any]) -> Dict[str, Any]: 28 | return self.jsonDo("post", path, payload=data) 29 | 30 | def put(self, path: str, data: Mapping[str, Any]): 31 | return self.jsonDo("put", path, payload=data) 32 | 33 | def patch(self, path: str, data: Mapping[str, Any]): 34 | return self.jsonDo("patch", path, payload=data) 35 | 36 | def delete(self, path, data: Mapping[str, Any]) -> None: 37 | self.do("delete", path, payload=data) 38 | 39 | def jsonDo( 40 | self, 41 | method: str, 42 | path: str, 43 | query_params: Mapping[str, str] = None, 44 | payload: Mapping[str, Any] = None, 45 | ) -> Dict[str, Any]: 46 | """like do, but expects a return value""" 47 | resp = self.do(method, path, query_params, payload) 48 | if resp is None: 49 | raise RuntimeError("server returned unexpected 204 response") 50 | return resp 51 | 52 | def getUserAgentString(self): 53 | package_version = "0.0.0" 54 | py_version = "0.0.0" 55 | 56 | try: 57 | package_version = sys.modules["ngrok"].__version__ 58 | py_version = python_version() 59 | finally: 60 | user_agent = "ngrok-api-python/{0}/{1}".format(package_version, py_version) 61 | return user_agent 62 | 63 | def do( 64 | self, 65 | method: str, 66 | path: str, 67 | query_params: Mapping[str, str] = None, 68 | payload: Mapping[str, Any] = None, 69 | ) -> Optional[Dict[str, Any]]: 70 | url = self.base_url + path 71 | resp = requests.request( 72 | method, 73 | url, 74 | params={k: v for k, v in query_params.items() if v} 75 | if query_params 76 | else None, 77 | headers={ 78 | "User-Agent": self.getUserAgentString(), 79 | "ngrok-version": "2", 80 | "authorization": "Bearer " + self.api_key, 81 | }, 82 | json={k: v for k, v in payload.items() if v is not None} 83 | if payload 84 | else None, 85 | ) 86 | if not resp.ok: 87 | self._throw_error(resp) 88 | return None 89 | elif resp.status_code == 204: 90 | return None 91 | else: 92 | return resp.json() 93 | 94 | def request(self, method: str, url: str) -> Dict[str, Any]: 95 | """makes an authenticated request to a URL 96 | this is used for paging where we already have a full url and don't need to construct one 97 | """ 98 | resp = requests.request( 99 | method, 100 | url, 101 | headers={ 102 | "User-Agent": self.getUserAgentString(), 103 | "ngrok-version": "2", 104 | "authorization": "Bearer " + self.api_key, 105 | }, 106 | ) 107 | if not resp.ok: 108 | self._throw_error(resp) 109 | return resp.json() 110 | 111 | def _throw_error(self, resp: requests.Response) -> None: 112 | if resp.status_code >= 500: 113 | raise RuntimeError( 114 | "Server failed with {} and body '{}'".format( 115 | resp.status_code, resp.text 116 | ) 117 | ) 118 | 119 | try: 120 | err = resp.json() 121 | except: 122 | raise RuntimeError( 123 | "Server failed with {} and body '{}'".format( 124 | resp.status_code, resp.text 125 | ) 126 | ) 127 | 128 | if resp.status_code == 404: 129 | raise NotFoundError( 130 | error_code=err.get("error_code"), 131 | http_status_code=err["status_code"], 132 | message=err["msg"], 133 | details=err["details"], 134 | ) 135 | else: 136 | raise Error( 137 | error_code=err.get("error_code"), 138 | http_status_code=err["status_code"], 139 | message=err["msg"], 140 | details=err["details"], 141 | ) 142 | -------------------------------------------------------------------------------- /ngrok/iterator.py: -------------------------------------------------------------------------------- 1 | # Code generated for API Clients. DO NOT EDIT. 2 | 3 | 4 | class PagedIterator(object): 5 | def __init__(self, client, page, list_property): 6 | self.n = 0 7 | self.list_property = list_property 8 | self.client = client 9 | self.page = page 10 | 11 | def __next__(self): 12 | try: 13 | item = self.page._props[self.list_property][self.n] 14 | self.n += 1 15 | return item 16 | except IndexError: 17 | if self.page.next_page_uri is None: 18 | raise StopIteration 19 | else: 20 | props = self.client.http_client.request("get", self.page.next_page_uri) 21 | self.n = 0 22 | self.page = self.page.__class__(self.client, props) 23 | return self.__next__() 24 | -------------------------------------------------------------------------------- /ngrok/utils.py: -------------------------------------------------------------------------------- 1 | # Code generated for API Clients. DO NOT EDIT. 2 | 3 | from typing import Any, Optional 4 | 5 | 6 | def extract_props(value: Optional[Any]) -> Any: 7 | if value: 8 | return value._props 9 | return None 10 | -------------------------------------------------------------------------------- /py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngrok/ngrok-api-python/11967f08bace1ca6b0a705bb0e88ef8af3b78620/py.typed -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | # Code generated for API Clients. DO NOT EDIT. 2 | 3 | [build-system] 4 | requires = [ 5 | "setuptools>=42", 6 | "wheel" 7 | ] 8 | build-backend = "setuptools.build_meta" 9 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | # Code generated for API Clients. DO NOT EDIT. 2 | 3 | import os.path 4 | 5 | from setuptools import find_packages, setup 6 | 7 | 8 | def read_file(filename): 9 | path = os.path.join(os.path.dirname(__file__), filename) 10 | with open(path) as f: 11 | return f.read() 12 | 13 | 14 | setup( 15 | name="ngrok-api", 16 | version="0.14.0", 17 | description="ngrok HTTP API client library", 18 | long_description=read_file("README.md"), 19 | long_description_content_type="text/markdown", 20 | author="Alan Shreve", 21 | author_email="alan@ngrok.com", 22 | packages=find_packages(exclude=["tests"]), 23 | package_data={"ngrok": ["py.typed"]}, 24 | url="https://github.com/ngrok/ngrok-api-python", 25 | include_package_data=True, 26 | classifiers=[ 27 | "Programming Language :: Python :: 3", 28 | "License :: OSI Approved :: MIT License", 29 | "Operating System :: OS Independent", 30 | ], 31 | python_requires=">=3.7", 32 | install_requires=[ 33 | "requests==2.25.1", 34 | ], 35 | extras_require={ 36 | "tox": ["tox==3.23.0"], 37 | "doc": [ 38 | "black==21.5b1", 39 | "isort==5.11.5", 40 | "click==8.0.4", 41 | "furo==2022.12.7", 42 | "sphinx==6.1.3", 43 | "sphinx-autodoc-typehints==1.12.0", 44 | "sphinx-readable-theme==1.3.0", 45 | # Pin separately for https://github.com/sphinx-doc/sphinx/issues/10291 46 | "Jinja2==3.0.3", 47 | ], 48 | }, 49 | ) 50 | -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- 1 | # Code generated for API Clients. DO NOT EDIT. 2 | -------------------------------------------------------------------------------- /tox.ini: -------------------------------------------------------------------------------- 1 | # Code generated for API Clients. DO NOT EDIT. 2 | 3 | [tox] 4 | envlist = py311 5 | minversion = 3.23.0 6 | #skip_missing_interpreters = true 7 | 8 | [testenv] 9 | # uncomment out to test against the live API 10 | #setenv = TEST_NO_MOCK=true 11 | # uncomment this along with uncommenting TEST_NO_MOCK 12 | # to capture live responses from the live API to aid in creating 13 | # mocks 14 | #setenv = TEST_DEBUG=true 15 | passenv = NGROK_API_KEY 16 | deps = 17 | pytest==7.2.1 18 | mypy==1.0.0 19 | types-requests==2.25.1 20 | 21 | commands = 22 | mypy ngrok 23 | pytest -s 24 | --------------------------------------------------------------------------------