Skip to main content

High-level concurrency and networking framework on top of asyncio or Trio

Project description

Build Status Code Coverage Documentation Gitter chat Tidelift

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.

To find out why you might want to use AnyIO’s APIs instead of asyncio’s, you can read about it here.

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

  • Subinterpreter support for code parallelization (on Python 3.13 and later)

  • Asynchronous file I/O (using worker threads)

  • Signal handling

  • Asynchronous versions of the functools and itertools modules

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

Security contact information

To report a security vulnerability, please use the Tidelift security contact. Tidelift will coordinate the fix and disclosure.

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.14.2.tar.gz (260.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

anyio-4.14.2-py3-none-any.whl (125.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for anyio-4.14.2.tar.gz
Algorithm Hash digest
SHA256 cfa139f3ed1a23ee8f88a145ddb5ac7605b8bbfd8592baacd7ce3d8bb4313c7f
MD5 a1c54024bb099e67972c9ca1176ed96f
BLAKE2b-256 61cca381afa6efea9f496eff839d4a6a1aed3bfafc7b3ab4b0d1b243a12573dd

See more details on using hashes here.

Provenance

The following attestation bundles were made for anyio-4.14.2.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.14.2-py3-none-any.whl.

File metadata

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

File hashes

Hashes for anyio-4.14.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9f505dda5ac9f0c8309b5e8bd445a8c2bf7246f3ce950121e45ea15bc41d1494
MD5 62b92e3f99b14b95174b301dc3e8dd57
BLAKE2b-256 da35f2287558c17e29fafc8ef3daf819bb9834061cfa43bff8014f7df7f63bdc

See more details on using hashes here.

Provenance

The following attestation bundles were made for anyio-4.14.2-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 Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page