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

Uploaded Source

Built Distribution

anyio-4.8.0-py3-none-any.whl (96.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: anyio-4.8.0.tar.gz
  • Upload date:
  • Size: 181.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for anyio-4.8.0.tar.gz
Algorithm Hash digest
SHA256 1d9fe889df5212298c0c0723fa20479d1b94883a2df44bd3897aa91083316f7a
MD5 ad00874069a6685b2e3e84c5a2e045cb
BLAKE2b-256 a373199a98fc2dae33535d6b8e8e6ec01f8c1d76c9adb096c6b7d64823038cde

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: anyio-4.8.0-py3-none-any.whl
  • Upload date:
  • Size: 96.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for anyio-4.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b5011f270ab5eb0abf13385f851315585cc37ef330dd88e27ec3d34d651fd47a
MD5 d448330d226d4cb0cb97fd78e2fe946e
BLAKE2b-256 46ebe7f063ad1fec6b3178a3cd82d1a3c4de82cccf283fc42746168188e1cdd5

See more details on using hashes here.

Provenance

The following attestation bundles were made for anyio-4.8.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 AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page