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


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.6.2.post1.tar.gz (173.4 kB view details)

Uploaded Source

Built Distribution

anyio-4.6.2.post1-py3-none-any.whl (90.4 kB view details)

Uploaded Python 3

File details

Details for the file anyio-4.6.2.post1.tar.gz.

File metadata

  • Download URL: anyio-4.6.2.post1.tar.gz
  • Upload date:
  • Size: 173.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for anyio-4.6.2.post1.tar.gz
Algorithm Hash digest
SHA256 4c8bc31ccdb51c7f7bd251f51c609e038d63e34219b44aa86e47576389880b4c
MD5 3aae01d9007bd08538158c7a7fa18c39
BLAKE2b-256 9f0945b9b7a6d4e45c6bcb5bf61d19e3ab87df68e0601fa8c5293de3542546cc

See more details on using hashes here.

File details

Details for the file anyio-4.6.2.post1-py3-none-any.whl.

File metadata

  • Download URL: anyio-4.6.2.post1-py3-none-any.whl
  • Upload date:
  • Size: 90.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for anyio-4.6.2.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 6d170c36fba3bdd840c73d3868c1e777e33676a69c3a72cf0a0d5d6d8009b61d
MD5 5c4961c05aff0a32162003ac90628533
BLAKE2b-256 e4f5f2b75d2fc6f1a260f340f0e7c6a060f4dd2961cc16884ed851b0d18da06a

See more details on using hashes here.

Supported by

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