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

Uploaded Source

Built Distribution

anyio-3.7.1-py3-none-any.whl (80.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: anyio-3.7.1.tar.gz
  • Upload date:
  • Size: 142.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for anyio-3.7.1.tar.gz
Algorithm Hash digest
SHA256 44a3c9aba0f5defa43261a8b3efb97891f2bd7d804e0e1f56419befa1adfc780
MD5 58d288dd84e28e2507ff9ce7e4620010
BLAKE2b-256 28992dfd53fd55ce9838e6ff2d4dac20ce58263798bd1a0dbe18b3a9af3fcfce

See more details on using hashes here.

File details

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

File metadata

  • Download URL: anyio-3.7.1-py3-none-any.whl
  • Upload date:
  • Size: 80.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for anyio-3.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 91dee416e570e92c64041bd18b900d1d6fa78dff7048769ce5ac5ddad004fbb5
MD5 1e50429e671f536b3a41ed6a94e94c9f
BLAKE2b-256 192444299477fe7dcc9cb58d0a57d5a7588d6af2ff403fdd2d47a246c91a3246

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 Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page