Skip to main content

High level compatibility layer for multiple asynchronous event loop implementations

Project description

Build Status Code Coverage Documentation Gitter chat

AnyIO is an asynchronous networking and concurrency library that works on top of either asyncio or trio. It implements trio-like structured concurrency (SC) on top of asyncio and works in harmony with the native SC of trio itself.

Applications and libraries written against AnyIO’s API will run unmodified on either asyncio or trio. AnyIO can also be adopted into a library or application incrementally – bit by bit, no full refactoring necessary. It will blend in with the native libraries of your chosen backend.

Documentation

View full documentation at: https://anyio.readthedocs.io/

Features

AnyIO offers the following functionality:

  • Task groups (nurseries in trio terminology)

  • High-level networking (TCP, UDP and UNIX sockets)

    • Happy eyeballs algorithm for TCP connections (more robust than that of asyncio on Python 3.8)

    • async/await style UDP sockets (unlike asyncio where you still have to use Transports and Protocols)

  • A versatile API for byte streams and object streams

  • Inter-task synchronization and communication (locks, conditions, events, semaphores, object streams)

  • Worker threads

  • Subprocesses

  • Asynchronous file I/O (using worker threads)

  • Signal handling

AnyIO also comes with its own pytest plugin which also supports asynchronous fixtures. It even works with the popular Hypothesis library.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

anyio-4.9.0.tar.gz (190.9 kB view details)

Uploaded Source

Built Distribution

anyio-4.9.0-py3-none-any.whl (100.9 kB view details)

Uploaded Python 3

File details

Details for the file anyio-4.9.0.tar.gz.

File metadata

  • Download URL: anyio-4.9.0.tar.gz
  • Upload date:
  • Size: 190.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for anyio-4.9.0.tar.gz
Algorithm Hash digest
SHA256 673c0c244e15788651a4ff38710fea9675823028a6f08a5eda409e0c9840a028
MD5 d0e4db5f5e4041d1bc9664042b454218
BLAKE2b-256 957d4c1bd541d4dffa1b52bd83fb8527089e097a106fc90b467a7313b105f840

See more details on using hashes here.

Provenance

The following attestation bundles were made for anyio-4.9.0.tar.gz:

Publisher: publish.yml on agronholm/anyio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file anyio-4.9.0-py3-none-any.whl.

File metadata

  • Download URL: anyio-4.9.0-py3-none-any.whl
  • Upload date:
  • Size: 100.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for anyio-4.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9f76d541cad6e36af7beb62e978876f3b41e3e04f2c1fbf0884604c0a9c4d93c
MD5 a4d06752eea2d2fa3591392152a137c6
BLAKE2b-256 a1ee48ca1a7c89ffec8b6a0c5d02b89c305671d5ffd8d3c94acf8b8c408575bb

See more details on using hashes here.

Provenance

The following attestation bundles were made for anyio-4.9.0-py3-none-any.whl:

Publisher: publish.yml on agronholm/anyio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page