aiohappyeyeballs


Nameaiohappyeyeballs JSON
Version 2.3.7 PyPI version JSON
download
home_pagehttps://github.com/aio-libs/aiohappyeyeballs
SummaryHappy Eyeballs for asyncio
upload_time2024-08-17 13:16:08
maintainerNone
docs_urlNone
authorJ. Nick Koston
requires_python>=3.8
licensePython-2.0.1
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # aiohappyeyeballs

<p align="center">
  <a href="https://github.com/aio-libs/aiohappyeyeballs/actions/workflows/ci.yml?query=branch%3Amain">
    <img src="https://img.shields.io/github/actions/workflow/status/aio-libs/aiohappyeyeballs/ci-cd.yml?branch=main&label=CI&logo=github&style=flat-square" alt="CI Status" >
  </a>
  <a href="https://aiohappyeyeballs.readthedocs.io">
    <img src="https://img.shields.io/readthedocs/aiohappyeyeballs.svg?logo=read-the-docs&logoColor=fff&style=flat-square" alt="Documentation Status">
  </a>
  <a href="https://codecov.io/gh/aio-libs/aiohappyeyeballs">
    <img src="https://img.shields.io/codecov/c/github/aio-libs/aiohappyeyeballs.svg?logo=codecov&logoColor=fff&style=flat-square" alt="Test coverage percentage">
  </a>
</p>
<p align="center">
  <a href="https://python-poetry.org/">
    <img src="https://img.shields.io/badge/packaging-poetry-299bd7?style=flat-square&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAASCAYAAABrXO8xAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAJJSURBVHgBfZLPa1NBEMe/s7tNXoxW1KJQKaUHkXhQvHgW6UHQQ09CBS/6V3hKc/AP8CqCrUcpmop3Cx48eDB4yEECjVQrlZb80CRN8t6OM/teagVxYZi38+Yz853dJbzoMV3MM8cJUcLMSUKIE8AzQ2PieZzFxEJOHMOgMQQ+dUgSAckNXhapU/NMhDSWLs1B24A8sO1xrN4NECkcAC9ASkiIJc6k5TRiUDPhnyMMdhKc+Zx19l6SgyeW76BEONY9exVQMzKExGKwwPsCzza7KGSSWRWEQhyEaDXp6ZHEr416ygbiKYOd7TEWvvcQIeusHYMJGhTwF9y7sGnSwaWyFAiyoxzqW0PM/RjghPxF2pWReAowTEXnDh0xgcLs8l2YQmOrj3N7ByiqEoH0cARs4u78WgAVkoEDIDoOi3AkcLOHU60RIg5wC4ZuTC7FaHKQm8Hq1fQuSOBvX/sodmNJSB5geaF5CPIkUeecdMxieoRO5jz9bheL6/tXjrwCyX/UYBUcjCaWHljx1xiX6z9xEjkYAzbGVnB8pvLmyXm9ep+W8CmsSHQQY77Zx1zboxAV0w7ybMhQmfqdmmw3nEp1I0Z+FGO6M8LZdoyZnuzzBdjISicKRnpxzI9fPb+0oYXsNdyi+d3h9bm9MWYHFtPeIZfLwzmFDKy1ai3p+PDls1Llz4yyFpferxjnyjJDSEy9CaCx5m2cJPerq6Xm34eTrZt3PqxYO1XOwDYZrFlH1fWnpU38Y9HRze3lj0vOujZcXKuuXm3jP+s3KbZVra7y2EAAAAAASUVORK5CYII=" alt="Poetry">
  </a>
  <a href="https://github.com/ambv/black">
    <img src="https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square" alt="black">
  </a>
  <a href="https://github.com/pre-commit/pre-commit">
    <img src="https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white&style=flat-square" alt="pre-commit">
  </a>
</p>
<p align="center">
  <a href="https://pypi.org/project/aiohappyeyeballs/">
    <img src="https://img.shields.io/pypi/v/aiohappyeyeballs.svg?logo=python&logoColor=fff&style=flat-square" alt="PyPI Version">
  </a>
  <img src="https://img.shields.io/pypi/pyversions/aiohappyeyeballs.svg?style=flat-square&logo=python&amp;logoColor=fff" alt="Supported Python versions">
  <img src="https://img.shields.io/pypi/l/aiohappyeyeballs.svg?style=flat-square" alt="License">
</p>

---

**Documentation**: <a href="https://aiohappyeyeballs.readthedocs.io" target="_blank">https://aiohappyeyeballs.readthedocs.io </a>

**Source Code**: <a href="https://github.com/aio-libs/aiohappyeyeballs" target="_blank">https://github.com/aio-libs/aiohappyeyeballs </a>

---

[Happy Eyeballs](https://en.wikipedia.org/wiki/Happy_Eyeballs)
([RFC 8305](https://www.rfc-editor.org/rfc/rfc8305.html))

## Use case

This library exists to allow connecting with
[Happy Eyeballs](https://en.wikipedia.org/wiki/Happy_Eyeballs)
([RFC 8305](https://www.rfc-editor.org/rfc/rfc8305.html))
when you
already have a list of addrinfo and not a DNS name.

The stdlib version of `loop.create_connection()`
will only work when you pass in an unresolved name which
is not a good fit when using DNS caching or resolving
names via another method such was `zeroconf`.

## Installation

Install this via pip (or your favourite package manager):

`pip install aiohappyeyeballs`

## Example usage

```python

addr_infos = await loop.getaddrinfo("example.org", 80)

socket = await start_connection(addr_infos)
socket = await start_connection(addr_infos, local_addr_infos=local_addr_infos, happy_eyeballs_delay=0.2)

transport, protocol = await loop.create_connection(
    MyProtocol, sock=socket, ...)

# Remove the first address for each family from addr_info
pop_addr_infos_interleave(addr_info, 1)

# Remove all matching address from addr_info
remove_addr_infos(addr_info, "dead::beef::")

# Convert a local_addr to local_addr_infos
local_addr_infos = addr_to_addr_infos(("127.0.0.1",0))
```

## Credits

This package contains code from cpython and is licensed under the same terms as cpython itself.

This package was created with
[Copier](https://copier.readthedocs.io/) and the
[browniebroke/pypackage-template](https://github.com/browniebroke/pypackage-template)
project template.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/aio-libs/aiohappyeyeballs",
    "name": "aiohappyeyeballs",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "J. Nick Koston",
    "author_email": "nick@koston.org",
    "download_url": "https://files.pythonhosted.org/packages/a7/64/889100848dea8a797215dbacbcf15367e2bd797b879aaf9df5c78d7c3200/aiohappyeyeballs-2.3.7.tar.gz",
    "platform": null,
    "description": "# aiohappyeyeballs\n\n<p align=\"center\">\n  <a href=\"https://github.com/aio-libs/aiohappyeyeballs/actions/workflows/ci.yml?query=branch%3Amain\">\n    <img src=\"https://img.shields.io/github/actions/workflow/status/aio-libs/aiohappyeyeballs/ci-cd.yml?branch=main&label=CI&logo=github&style=flat-square\" alt=\"CI Status\" >\n  </a>\n  <a href=\"https://aiohappyeyeballs.readthedocs.io\">\n    <img src=\"https://img.shields.io/readthedocs/aiohappyeyeballs.svg?logo=read-the-docs&logoColor=fff&style=flat-square\" alt=\"Documentation Status\">\n  </a>\n  <a href=\"https://codecov.io/gh/aio-libs/aiohappyeyeballs\">\n    <img src=\"https://img.shields.io/codecov/c/github/aio-libs/aiohappyeyeballs.svg?logo=codecov&logoColor=fff&style=flat-square\" alt=\"Test coverage percentage\">\n  </a>\n</p>\n<p align=\"center\">\n  <a href=\"https://python-poetry.org/\">\n    <img src=\"https://img.shields.io/badge/packaging-poetry-299bd7?style=flat-square&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAASCAYAAABrXO8xAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAJJSURBVHgBfZLPa1NBEMe/s7tNXoxW1KJQKaUHkXhQvHgW6UHQQ09CBS/6V3hKc/AP8CqCrUcpmop3Cx48eDB4yEECjVQrlZb80CRN8t6OM/teagVxYZi38+Yz853dJbzoMV3MM8cJUcLMSUKIE8AzQ2PieZzFxEJOHMOgMQQ+dUgSAckNXhapU/NMhDSWLs1B24A8sO1xrN4NECkcAC9ASkiIJc6k5TRiUDPhnyMMdhKc+Zx19l6SgyeW76BEONY9exVQMzKExGKwwPsCzza7KGSSWRWEQhyEaDXp6ZHEr416ygbiKYOd7TEWvvcQIeusHYMJGhTwF9y7sGnSwaWyFAiyoxzqW0PM/RjghPxF2pWReAowTEXnDh0xgcLs8l2YQmOrj3N7ByiqEoH0cARs4u78WgAVkoEDIDoOi3AkcLOHU60RIg5wC4ZuTC7FaHKQm8Hq1fQuSOBvX/sodmNJSB5geaF5CPIkUeecdMxieoRO5jz9bheL6/tXjrwCyX/UYBUcjCaWHljx1xiX6z9xEjkYAzbGVnB8pvLmyXm9ep+W8CmsSHQQY77Zx1zboxAV0w7ybMhQmfqdmmw3nEp1I0Z+FGO6M8LZdoyZnuzzBdjISicKRnpxzI9fPb+0oYXsNdyi+d3h9bm9MWYHFtPeIZfLwzmFDKy1ai3p+PDls1Llz4yyFpferxjnyjJDSEy9CaCx5m2cJPerq6Xm34eTrZt3PqxYO1XOwDYZrFlH1fWnpU38Y9HRze3lj0vOujZcXKuuXm3jP+s3KbZVra7y2EAAAAAASUVORK5CYII=\" alt=\"Poetry\">\n  </a>\n  <a href=\"https://github.com/ambv/black\">\n    <img src=\"https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square\" alt=\"black\">\n  </a>\n  <a href=\"https://github.com/pre-commit/pre-commit\">\n    <img src=\"https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white&style=flat-square\" alt=\"pre-commit\">\n  </a>\n</p>\n<p align=\"center\">\n  <a href=\"https://pypi.org/project/aiohappyeyeballs/\">\n    <img src=\"https://img.shields.io/pypi/v/aiohappyeyeballs.svg?logo=python&logoColor=fff&style=flat-square\" alt=\"PyPI Version\">\n  </a>\n  <img src=\"https://img.shields.io/pypi/pyversions/aiohappyeyeballs.svg?style=flat-square&logo=python&amp;logoColor=fff\" alt=\"Supported Python versions\">\n  <img src=\"https://img.shields.io/pypi/l/aiohappyeyeballs.svg?style=flat-square\" alt=\"License\">\n</p>\n\n---\n\n**Documentation**: <a href=\"https://aiohappyeyeballs.readthedocs.io\" target=\"_blank\">https://aiohappyeyeballs.readthedocs.io </a>\n\n**Source Code**: <a href=\"https://github.com/aio-libs/aiohappyeyeballs\" target=\"_blank\">https://github.com/aio-libs/aiohappyeyeballs </a>\n\n---\n\n[Happy Eyeballs](https://en.wikipedia.org/wiki/Happy_Eyeballs)\n([RFC 8305](https://www.rfc-editor.org/rfc/rfc8305.html))\n\n## Use case\n\nThis library exists to allow connecting with\n[Happy Eyeballs](https://en.wikipedia.org/wiki/Happy_Eyeballs)\n([RFC 8305](https://www.rfc-editor.org/rfc/rfc8305.html))\nwhen you\nalready have a list of addrinfo and not a DNS name.\n\nThe stdlib version of `loop.create_connection()`\nwill only work when you pass in an unresolved name which\nis not a good fit when using DNS caching or resolving\nnames via another method such was `zeroconf`.\n\n## Installation\n\nInstall this via pip (or your favourite package manager):\n\n`pip install aiohappyeyeballs`\n\n## Example usage\n\n```python\n\naddr_infos = await loop.getaddrinfo(\"example.org\", 80)\n\nsocket = await start_connection(addr_infos)\nsocket = await start_connection(addr_infos, local_addr_infos=local_addr_infos, happy_eyeballs_delay=0.2)\n\ntransport, protocol = await loop.create_connection(\n    MyProtocol, sock=socket, ...)\n\n# Remove the first address for each family from addr_info\npop_addr_infos_interleave(addr_info, 1)\n\n# Remove all matching address from addr_info\nremove_addr_infos(addr_info, \"dead::beef::\")\n\n# Convert a local_addr to local_addr_infos\nlocal_addr_infos = addr_to_addr_infos((\"127.0.0.1\",0))\n```\n\n## Credits\n\nThis package contains code from cpython and is licensed under the same terms as cpython itself.\n\nThis package was created with\n[Copier](https://copier.readthedocs.io/) and the\n[browniebroke/pypackage-template](https://github.com/browniebroke/pypackage-template)\nproject template.\n\n",
    "bugtrack_url": null,
    "license": "Python-2.0.1",
    "summary": "Happy Eyeballs for asyncio",
    "version": "2.3.7",
    "project_urls": {
        "Bug Tracker": "https://github.com/aio-libs/aiohappyeyeballs/issues",
        "Changelog": "https://github.com/aio-libs/aiohappyeyeballs/blob/main/CHANGELOG.md",
        "Documentation": "https://aiohappyeyeballs.readthedocs.io",
        "Homepage": "https://github.com/aio-libs/aiohappyeyeballs",
        "Repository": "https://github.com/aio-libs/aiohappyeyeballs"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "20a2933039a31d8f636d20bd40cedaa647c94d5875fc89cd3018f2275ce43c05",
                "md5": "6fbab33d01b692bf3b3f21221889fb8a",
                "sha256": "337ce4dc0e99eb697c3c5a77d6cb3c52925824d9a67ac0dea7c55b8a2d60b222"
            },
            "downloads": -1,
            "filename": "aiohappyeyeballs-2.3.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6fbab33d01b692bf3b3f21221889fb8a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 12153,
            "upload_time": "2024-08-17T13:16:07",
            "upload_time_iso_8601": "2024-08-17T13:16:07.293522Z",
            "url": "https://files.pythonhosted.org/packages/20/a2/933039a31d8f636d20bd40cedaa647c94d5875fc89cd3018f2275ce43c05/aiohappyeyeballs-2.3.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a764889100848dea8a797215dbacbcf15367e2bd797b879aaf9df5c78d7c3200",
                "md5": "d4c2369defc31a1d12d3f763d640300e",
                "sha256": "e794cd29ba6a14078092984e43688212a19081de3a73b6796c2fdeb3706dd6ce"
            },
            "downloads": -1,
            "filename": "aiohappyeyeballs-2.3.7.tar.gz",
            "has_sig": false,
            "md5_digest": "d4c2369defc31a1d12d3f763d640300e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 16788,
            "upload_time": "2024-08-17T13:16:08",
            "upload_time_iso_8601": "2024-08-17T13:16:08.595034Z",
            "url": "https://files.pythonhosted.org/packages/a7/64/889100848dea8a797215dbacbcf15367e2bd797b879aaf9df5c78d7c3200/aiohappyeyeballs-2.3.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-17 13:16:08",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "aio-libs",
    "github_project": "aiohappyeyeballs",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "aiohappyeyeballs"
}
        
Elapsed time: 0.38582s