METADATA 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. Metadata-Version: 2.3
  2. Name: aiohappyeyeballs
  3. Version: 2.6.1
  4. Summary: Happy Eyeballs for asyncio
  5. License: PSF-2.0
  6. Author: J. Nick Koston
  7. Author-email: nick@koston.org
  8. Requires-Python: >=3.9
  9. Classifier: Development Status :: 5 - Production/Stable
  10. Classifier: Intended Audience :: Developers
  11. Classifier: Natural Language :: English
  12. Classifier: Operating System :: OS Independent
  13. Classifier: Topic :: Software Development :: Libraries
  14. Classifier: Programming Language :: Python :: 3
  15. Classifier: Programming Language :: Python :: 3.9
  16. Classifier: Programming Language :: Python :: 3.10
  17. Classifier: Programming Language :: Python :: 3.11
  18. Classifier: Programming Language :: Python :: 3.12
  19. Classifier: Programming Language :: Python :: 3.13
  20. Classifier: License :: OSI Approved :: Python Software Foundation License
  21. Project-URL: Bug Tracker, https://github.com/aio-libs/aiohappyeyeballs/issues
  22. Project-URL: Changelog, https://github.com/aio-libs/aiohappyeyeballs/blob/main/CHANGELOG.md
  23. Project-URL: Documentation, https://aiohappyeyeballs.readthedocs.io
  24. Project-URL: Repository, https://github.com/aio-libs/aiohappyeyeballs
  25. Description-Content-Type: text/markdown
  26. # aiohappyeyeballs
  27. <p align="center">
  28. <a href="https://github.com/aio-libs/aiohappyeyeballs/actions/workflows/ci.yml?query=branch%3Amain">
  29. <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" >
  30. </a>
  31. <a href="https://aiohappyeyeballs.readthedocs.io">
  32. <img src="https://img.shields.io/readthedocs/aiohappyeyeballs.svg?logo=read-the-docs&logoColor=fff&style=flat-square" alt="Documentation Status">
  33. </a>
  34. <a href="https://codecov.io/gh/aio-libs/aiohappyeyeballs">
  35. <img src="https://img.shields.io/codecov/c/github/aio-libs/aiohappyeyeballs.svg?logo=codecov&logoColor=fff&style=flat-square" alt="Test coverage percentage">
  36. </a>
  37. </p>
  38. <p align="center">
  39. <a href="https://python-poetry.org/">
  40. <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">
  41. </a>
  42. <a href="https://github.com/astral-sh/ruff">
  43. <img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json" alt="Ruff">
  44. </a>
  45. <a href="https://github.com/pre-commit/pre-commit">
  46. <img src="https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white&style=flat-square" alt="pre-commit">
  47. </a>
  48. </p>
  49. <p align="center">
  50. <a href="https://pypi.org/project/aiohappyeyeballs/">
  51. <img src="https://img.shields.io/pypi/v/aiohappyeyeballs.svg?logo=python&logoColor=fff&style=flat-square" alt="PyPI Version">
  52. </a>
  53. <img src="https://img.shields.io/pypi/pyversions/aiohappyeyeballs.svg?style=flat-square&logo=python&amp;logoColor=fff" alt="Supported Python versions">
  54. <img src="https://img.shields.io/pypi/l/aiohappyeyeballs.svg?style=flat-square" alt="License">
  55. </p>
  56. ---
  57. **Documentation**: <a href="https://aiohappyeyeballs.readthedocs.io" target="_blank">https://aiohappyeyeballs.readthedocs.io </a>
  58. **Source Code**: <a href="https://github.com/aio-libs/aiohappyeyeballs" target="_blank">https://github.com/aio-libs/aiohappyeyeballs </a>
  59. ---
  60. [Happy Eyeballs](https://en.wikipedia.org/wiki/Happy_Eyeballs)
  61. ([RFC 8305](https://www.rfc-editor.org/rfc/rfc8305.html))
  62. ## Use case
  63. This library exists to allow connecting with
  64. [Happy Eyeballs](https://en.wikipedia.org/wiki/Happy_Eyeballs)
  65. ([RFC 8305](https://www.rfc-editor.org/rfc/rfc8305.html))
  66. when you
  67. already have a list of addrinfo and not a DNS name.
  68. The stdlib version of `loop.create_connection()`
  69. will only work when you pass in an unresolved name which
  70. is not a good fit when using DNS caching or resolving
  71. names via another method such as `zeroconf`.
  72. ## Installation
  73. Install this via pip (or your favourite package manager):
  74. `pip install aiohappyeyeballs`
  75. ## License
  76. [aiohappyeyeballs is licensed under the same terms as cpython itself.](https://github.com/python/cpython/blob/main/LICENSE)
  77. ## Example usage
  78. ```python
  79. addr_infos = await loop.getaddrinfo("example.org", 80)
  80. socket = await start_connection(addr_infos)
  81. socket = await start_connection(addr_infos, local_addr_infos=local_addr_infos, happy_eyeballs_delay=0.2)
  82. transport, protocol = await loop.create_connection(
  83. MyProtocol, sock=socket, ...)
  84. # Remove the first address for each family from addr_info
  85. pop_addr_infos_interleave(addr_info, 1)
  86. # Remove all matching address from addr_info
  87. remove_addr_infos(addr_info, "dead::beef::")
  88. # Convert a local_addr to local_addr_infos
  89. local_addr_infos = addr_to_addr_infos(("127.0.0.1",0))
  90. ```
  91. ## Credits
  92. This package contains code from cpython and is licensed under the same terms as cpython itself.
  93. This package was created with
  94. [Copier](https://copier.readthedocs.io/) and the
  95. [browniebroke/pypackage-template](https://github.com/browniebroke/pypackage-template)
  96. project template.