aiostun-0.2.0
توضیحات
Asynchronous STUN client for Python with UDP, TCP and TLS support
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | aiostun-0.2.0 |
| نام | aiostun |
| نسخه کتابخانه | 0.2.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Denis MACHARD |
| ایمیل نویسنده | d.machard@gmail.com |
| آدرس صفحه اصلی | https://github.com/dmachard/python-aiostun |
| آدرس اینترنتی | https://pypi.org/project/aiostun/ |
| مجوز | - |
# 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())
```
## For developers
Running all test units.
```bash
python3 -m unittest discover tests/ -v
```
نحوه نصب
نصب پکیج whl aiostun-0.2.0:
pip install aiostun-0.2.0.whl
نصب پکیج tar.gz aiostun-0.2.0:
pip install aiostun-0.2.0.tar.gz