aiostun


Nameaiostun JSON
Version 0.4.1 PyPI version JSON
download
home_pagehttps://github.com/dmachard/python-aiostun
SummaryAsynchronous STUN client for Python with UDP, TCP and TLS support
upload_time2024-07-01 06:13:20
maintainerNone
docs_urlNone
authorDenis MACHARD
requires_pythonNone
licenseNone
keywords stun client
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Async STUN client for Python

## Key Features

- [x] Support RFC3489
- [x] Transports UDP, TCP and TLS
- [x] IPv4 and IPv6 support
- [ ] Support RFC5389
- [ ] Support RFC5780
- [ ] Support RFC8489

## Installation

This module can be installed from [pypi](https://pypi.org/project/aiostun/) website

```python
pip install aiostun
```

## Getting your mapped address

```python
import aiostun
import asyncio

async def main():

    async with aiostun.Client(host='openrelay.metered.ca', port=443, ipproto=aiostun.TLS) as stunc:
        mapped_addr = await stunc.get_mapped_address()
        print(mapped_addr)
        {'family': 'IPv4', 'port': 38778, 'ip': 'xx.xx.xx.xx'}

asyncio.run(main())
```

Default constants for family:
- `aiostun.IP4` (default)
- `aiostun.IP6`

Default constants for IP protocol:
- `aiostun.UDP` (default)
- `aiostun.TCP`
- `aiostun.TLS`

The default remote port is `3478` with a timeout connection of `2 seconds`.

## For developers

Running all test units.

```bash
python3 -m unittest discover tests/ -v
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/dmachard/python-aiostun",
    "name": "aiostun",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "stun client",
    "author": "Denis MACHARD",
    "author_email": "d.machard@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/79/27/30edf9575778ced5717628795433c6d228f53485825485b20e510b5f4dad/aiostun-0.4.1.tar.gz",
    "platform": "any",
    "description": "# Async STUN client for Python\n\n## Key Features\n\n- [x] Support RFC3489\n- [x] Transports UDP, TCP and TLS\n- [x] IPv4 and IPv6 support\n- [ ] Support RFC5389\n- [ ] Support RFC5780\n- [ ] Support RFC8489\n\n## Installation\n\nThis module can be installed from [pypi](https://pypi.org/project/aiostun/) website\n\n```python\npip install aiostun\n```\n\n## Getting your mapped address\n\n```python\nimport aiostun\nimport asyncio\n\nasync def main():\n\n    async with aiostun.Client(host='openrelay.metered.ca', port=443, ipproto=aiostun.TLS) as stunc:\n        mapped_addr = await stunc.get_mapped_address()\n        print(mapped_addr)\n        {'family': 'IPv4', 'port': 38778, 'ip': 'xx.xx.xx.xx'}\n\nasyncio.run(main())\n```\n\nDefault constants for family:\n- `aiostun.IP4` (default)\n- `aiostun.IP6`\n\nDefault constants for IP protocol:\n- `aiostun.UDP` (default)\n- `aiostun.TCP`\n- `aiostun.TLS`\n\nThe default remote port is `3478` with a timeout connection of `2 seconds`.\n\n## For developers\n\nRunning all test units.\n\n```bash\npython3 -m unittest discover tests/ -v\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Asynchronous STUN client for Python with UDP, TCP and TLS support",
    "version": "0.4.1",
    "project_urls": {
        "Homepage": "https://github.com/dmachard/python-aiostun"
    },
    "split_keywords": [
        "stun",
        "client"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "676c73c0ae67eef9dc3493f506c92c59a7d3ee43685099f2dbd53f5b29e0fe2f",
                "md5": "cff33f9a163923466ed949daa11a2edc",
                "sha256": "598aa5f9fec2c9ab51884ed1023d471432ff3c14338bc78a25d39e59e7c39f2e"
            },
            "downloads": -1,
            "filename": "aiostun-0.4.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "cff33f9a163923466ed949daa11a2edc",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 11978,
            "upload_time": "2024-07-01T06:13:19",
            "upload_time_iso_8601": "2024-07-01T06:13:19.067880Z",
            "url": "https://files.pythonhosted.org/packages/67/6c/73c0ae67eef9dc3493f506c92c59a7d3ee43685099f2dbd53f5b29e0fe2f/aiostun-0.4.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "792730edf9575778ced5717628795433c6d228f53485825485b20e510b5f4dad",
                "md5": "8104347788c77dfa19ff27fc2c8e9d47",
                "sha256": "aa352d27d43a3f090fb3d344d0611ee7a15d4e375d5b095b97883897e611e5e1"
            },
            "downloads": -1,
            "filename": "aiostun-0.4.1.tar.gz",
            "has_sig": false,
            "md5_digest": "8104347788c77dfa19ff27fc2c8e9d47",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 10611,
            "upload_time": "2024-07-01T06:13:20",
            "upload_time_iso_8601": "2024-07-01T06:13:20.529217Z",
            "url": "https://files.pythonhosted.org/packages/79/27/30edf9575778ced5717628795433c6d228f53485825485b20e510b5f4dad/aiostun-0.4.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-01 06:13:20",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "dmachard",
    "github_project": "python-aiostun",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "aiostun"
}
        
Elapsed time: 0.39668s