Skip to main content

Various utilities for networking with asyncio

Requires Python 3.10 or later.

Selecting an event loop

Pass a loop factory instead of changing the global asyncio event-loop policy:

from aionetworking.loops import get_loop_factory, run

async def main():
    ...

run(main(), loop_factory=get_loop_factory('selector'))

Available loop names are selector, proactor (Windows), and uvloop (POSIX, with uvloop installed). Omitting the factory selects Proactor on Windows and Selector on POSIX. Python 3.11+ uses asyncio.Runner; Python 3.10 uses a compatibility runner with task cancellation and loop cleanup.

run_server(), run_server_default_tags(), and methods decorated with run_in_loop also accept a keyword-only loop_factory argument. The sample server and benchmark retain their --loop option. Tests select their loop through pytest --loop=selector (or another supported name).

The former set_loop_policy() and individual policy-setting helpers have been removed. Loop detection inspects the running loop, so is_selector() and is_proactor() must be called while a loop is running. Default port helpers no longer inspect global loop configuration; their optional loop_type argument selects a loop-specific port explicitly.

Metadata

Release files for aionetworking 2.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for aionetworking 2.1.2
File Interpreter ABI Platform Actions
aionetworking-2.1.2-py3-none-any.whl Python 3 none any Details for aionetworking-2.1.2-py3-none-any.whl

Release files / aionetworking-2.1.2-py3-none-any.whl

Download URL aionetworking-2.1.2-py3-none-any.whl
Size 78.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0d5cbed74ca91f0b334ccc3131bb3af16ee2e5cd9b9993806ec651856ae38b64
BLAKE2b-256 checksum
How to use checksums
a7fe4c7efc9e3f3642694e3d5d35418530b4df1840c9bc2817f14550a3f6713f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.1

Security for aionetworking 2.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page