pyngrok


Namepyngrok JSON
Version 7.1.6 PyPI version JSON
download
home_pageNone
SummaryA Python wrapper for ngrok.
upload_time2024-03-24 13:41:12
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT License Copyright (c) 2018-2024 Alex Laird 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: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 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.
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center"><img alt="pyngrok - a Python wrapper for ngrok" src="https://pyngrok.readthedocs.io/en/latest/_images/logo.png" /></p>

[![Version](https://img.shields.io/pypi/v/pyngrok)](https://pypi.org/project/pyngrok)
[![Python Versions](https://img.shields.io/pypi/pyversions/pyngrok.svg)](https://pypi.org/project/pyngrok)
[![Coverage](https://img.shields.io/codecov/c/github/alexdlaird/pyngrok)](https://codecov.io/gh/alexdlaird/pyngrok)
[![Build](https://img.shields.io/github/actions/workflow/status/alexdlaird/pyngrok/build.yml)](https://github.com/alexdlaird/pyngrok/actions/workflows/build.yml)
[![Docs](https://img.shields.io/readthedocs/pyngrok)](https://pyngrok.readthedocs.io/en/latest)
[![GitHub License](https://img.shields.io/github/license/alexdlaird/pyngrok)](https://github.com/alexdlaird/pyngrok/blob/main/LICENSE)

`pyngrok` is a Python wrapper for `ngrok` that manages its own binary, making `ngrok` available via a convenient Python
API.

[`ngrok`](https://ngrok.com) is a reverse proxy tool that opens secure tunnels from public URLs to localhost, perfect
for exposing local web servers, building webhook integrations, enabling SSH access, testing chatbots, demoing from
your own machine, and more, and its made even more powerful with native Python integration through `pyngrok`.

## Installation

`pyngrok` is available on [PyPI](https://pypi.org/project/pyngrok/) and can be installed
using `pip`:

```sh
pip install pyngrok
```

or `conda`:

```sh
conda install -c conda-forge pyngrok
```

That's it! `pyngrok` is now available as a package to our Python projects, and `ngrok` is now available from
the command line.

## Basic Usage

To open a tunnel, use the [`connect`](https://pyngrok.readthedocs.io/en/latest/api.html#pyngrok.ngrok.connect) method,
which returns a `NgrokTunnel`, and this returned object has a reference to the public URL generated by `ngrok` in its
`public_url` attribute.

```python
from pyngrok import ngrok

# Open a HTTP tunnel on the default port 80
# <NgrokTunnel: "https://<public_sub>.ngrok.io" -> "http://localhost:80">
http_tunnel = ngrok.connect()

# Open a SSH tunnel
# <NgrokTunnel: "tcp://0.tcp.ngrok.io:12345" -> "localhost:22">
ssh_tunnel = ngrok.connect("22", "tcp")

# Open a named tunnel from the config file
named_tunnel = ngrok.connect(name="my_tunnel_name")
```

The [`connect`](https://pyngrok.readthedocs.io/en/latest/api.html#pyngrok.ngrok.connect) method takes `kwargs` as
well, which allows us to pass additional properties that are [supported by `ngrok`](https://ngrok.com/docs/secure-tunnels/ngrok-agent/reference/config/#tunnel-definitions).

This package puts the default `ngrok` binary on our path, so all features of `ngrok` are
available on the command line.

```sh
ngrok http 80
```

For details on how to fully leverage `ngrok` from the command line, see [`ngrok`'s official documentation](https://ngrok.com/docs).

## Documentation

For more advanced usage, `pyngrok`'s official documentation is available at [http://pyngrok.readthedocs.io](http://pyngrok.readthedocs.io).

### `ngrok` Version Compatibility

`pyngrok` is compatible with `ngrok` v2 and v3, but by default it will install v3. To install v2 instead,
[set `ngrok_version` to "v2" in `PyngrokConfig`](https://pyngrok.readthedocs.io/en/latest/index.html#ngrok-version-compatibility).

## Contributing

If you would like to get involved, be sure to review the [Contribution Guide](https://github.com/alexdlaird/pyngrok/blob/main/CONTRIBUTING.rst).

Want to contribute financially? If you've found `pyngrok` useful, [sponsorship](https://github.com/sponsors/alexdlaird) would
also be greatly appreciated!

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pyngrok",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "Alex Laird <contact@alexlaird.com>",
    "keywords": null,
    "author": null,
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/c5/31/f9afa1035fbd27d7a439c1a0c8f8987d6b257f40a6a12ec4dfc9affc38ff/pyngrok-7.1.6.tar.gz",
    "platform": null,
    "description": "<p align=\"center\"><img alt=\"pyngrok - a Python wrapper for ngrok\" src=\"https://pyngrok.readthedocs.io/en/latest/_images/logo.png\" /></p>\n\n[![Version](https://img.shields.io/pypi/v/pyngrok)](https://pypi.org/project/pyngrok)\n[![Python Versions](https://img.shields.io/pypi/pyversions/pyngrok.svg)](https://pypi.org/project/pyngrok)\n[![Coverage](https://img.shields.io/codecov/c/github/alexdlaird/pyngrok)](https://codecov.io/gh/alexdlaird/pyngrok)\n[![Build](https://img.shields.io/github/actions/workflow/status/alexdlaird/pyngrok/build.yml)](https://github.com/alexdlaird/pyngrok/actions/workflows/build.yml)\n[![Docs](https://img.shields.io/readthedocs/pyngrok)](https://pyngrok.readthedocs.io/en/latest)\n[![GitHub License](https://img.shields.io/github/license/alexdlaird/pyngrok)](https://github.com/alexdlaird/pyngrok/blob/main/LICENSE)\n\n`pyngrok` is a Python wrapper for `ngrok` that manages its own binary, making `ngrok` available via a convenient Python\nAPI.\n\n[`ngrok`](https://ngrok.com) is a reverse proxy tool that opens secure tunnels from public URLs to localhost, perfect\nfor exposing local web servers, building webhook integrations, enabling SSH access, testing chatbots, demoing from\nyour own machine, and more, and its made even more powerful with native Python integration through `pyngrok`.\n\n## Installation\n\n`pyngrok` is available on [PyPI](https://pypi.org/project/pyngrok/) and can be installed\nusing `pip`:\n\n```sh\npip install pyngrok\n```\n\nor `conda`:\n\n```sh\nconda install -c conda-forge pyngrok\n```\n\nThat's it! `pyngrok` is now available as a package to our Python projects, and `ngrok` is now available from\nthe command line.\n\n## Basic Usage\n\nTo open a tunnel, use the [`connect`](https://pyngrok.readthedocs.io/en/latest/api.html#pyngrok.ngrok.connect) method,\nwhich returns a `NgrokTunnel`, and this returned object has a reference to the public URL generated by `ngrok` in its\n`public_url` attribute.\n\n```python\nfrom pyngrok import ngrok\n\n# Open a HTTP tunnel on the default port 80\n# <NgrokTunnel: \"https://<public_sub>.ngrok.io\" -> \"http://localhost:80\">\nhttp_tunnel = ngrok.connect()\n\n# Open a SSH tunnel\n# <NgrokTunnel: \"tcp://0.tcp.ngrok.io:12345\" -> \"localhost:22\">\nssh_tunnel = ngrok.connect(\"22\", \"tcp\")\n\n# Open a named tunnel from the config file\nnamed_tunnel = ngrok.connect(name=\"my_tunnel_name\")\n```\n\nThe [`connect`](https://pyngrok.readthedocs.io/en/latest/api.html#pyngrok.ngrok.connect) method takes `kwargs` as\nwell, which allows us to pass additional properties that are [supported by `ngrok`](https://ngrok.com/docs/secure-tunnels/ngrok-agent/reference/config/#tunnel-definitions).\n\nThis package puts the default `ngrok` binary on our path, so all features of `ngrok` are\navailable on the command line.\n\n```sh\nngrok http 80\n```\n\nFor details on how to fully leverage `ngrok` from the command line, see [`ngrok`'s official documentation](https://ngrok.com/docs).\n\n## Documentation\n\nFor more advanced usage, `pyngrok`'s official documentation is available at [http://pyngrok.readthedocs.io](http://pyngrok.readthedocs.io).\n\n### `ngrok` Version Compatibility\n\n`pyngrok` is compatible with `ngrok` v2 and v3, but by default it will install v3. To install v2 instead,\n[set `ngrok_version` to \"v2\" in `PyngrokConfig`](https://pyngrok.readthedocs.io/en/latest/index.html#ngrok-version-compatibility).\n\n## Contributing\n\nIf you would like to get involved, be sure to review the [Contribution Guide](https://github.com/alexdlaird/pyngrok/blob/main/CONTRIBUTING.rst).\n\nWant to contribute financially? If you've found `pyngrok` useful, [sponsorship](https://github.com/sponsors/alexdlaird) would\nalso be greatly appreciated!\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2018-2024 Alex Laird  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:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  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. ",
    "summary": "A Python wrapper for ngrok.",
    "version": "7.1.6",
    "project_urls": {
        "Changelog": "https://github.com/alexdlaird/pyngrok/blob/main/CHANGELOG.md",
        "Documentation": "https://pyngrok.readthedocs.io",
        "Source Code": "https://github.com/alexdlaird/pyngrok",
        "Sponsor": "https://github.com/sponsors/alexdlaird"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cb5568b89d526e8331724665dcded0a32a76d73d6bcac41cc56084fda8e25486",
                "md5": "71956fd50a9e4dbbe9dcc16771dca41f",
                "sha256": "422ac7c339622fef51308f0c493a1f5a05d0f403eee5bdd183fb4021a6cb90d4"
            },
            "downloads": -1,
            "filename": "pyngrok-7.1.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "71956fd50a9e4dbbe9dcc16771dca41f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 22345,
            "upload_time": "2024-03-24T13:41:09",
            "upload_time_iso_8601": "2024-03-24T13:41:09.339240Z",
            "url": "https://files.pythonhosted.org/packages/cb/55/68b89d526e8331724665dcded0a32a76d73d6bcac41cc56084fda8e25486/pyngrok-7.1.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c531f9afa1035fbd27d7a439c1a0c8f8987d6b257f40a6a12ec4dfc9affc38ff",
                "md5": "3824b9044d6febf49ff1fb0b8e36c488",
                "sha256": "05c0fca6340913658abddc623a0a53927aced93e27ffef801d24814bcb180eaa"
            },
            "downloads": -1,
            "filename": "pyngrok-7.1.6.tar.gz",
            "has_sig": false,
            "md5_digest": "3824b9044d6febf49ff1fb0b8e36c488",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 36416,
            "upload_time": "2024-03-24T13:41:12",
            "upload_time_iso_8601": "2024-03-24T13:41:12.235099Z",
            "url": "https://files.pythonhosted.org/packages/c5/31/f9afa1035fbd27d7a439c1a0c8f8987d6b257f40a6a12ec4dfc9affc38ff/pyngrok-7.1.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-24 13:41:12",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "alexdlaird",
    "github_project": "pyngrok",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pyngrok"
}
        
Elapsed time: 0.27704s