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 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

This version

3.3.1

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

Uploaded Source

Built Distribution

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

anyio-3.3.1-py3-none-any.whl (78.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: anyio-3.3.1.tar.gz
  • Upload date:
  • Size: 133.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for anyio-3.3.1.tar.gz
Algorithm Hash digest
SHA256 85913b4e2fec030e8c72a8f9f98092eeb9e25847a6e00d567751b77e34f856fe
MD5 a635aaab84fef4bc16712606ad93e93a
BLAKE2b-256 d9f5180f7b4c3b2fcdc79e8f71c71c7c3de575d5d08bdb27ee145d23801539db

See more details on using hashes here.

File details

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

File metadata

  • Download URL: anyio-3.3.1-py3-none-any.whl
  • Upload date:
  • Size: 78.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for anyio-3.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d7c604dd491eca70e19c78664d685d5e4337612d574419d503e76f5d7d1590bd
MD5 2c3f64503e4806bf5c79a1034b199b14
BLAKE2b-256 983e1432e7d8d9f71676d6638b4feb6285f53575239f7b527a95e85b7e888bba

See more details on using hashes here.

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