README.rst 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. .. image:: https://github.com/agronholm/anyio/actions/workflows/test.yml/badge.svg
  2. :target: https://github.com/agronholm/anyio/actions/workflows/test.yml
  3. :alt: Build Status
  4. .. image:: https://coveralls.io/repos/github/agronholm/anyio/badge.svg?branch=master
  5. :target: https://coveralls.io/github/agronholm/anyio?branch=master
  6. :alt: Code Coverage
  7. .. image:: https://readthedocs.org/projects/anyio/badge/?version=latest
  8. :target: https://anyio.readthedocs.io/en/latest/?badge=latest
  9. :alt: Documentation
  10. .. image:: https://badges.gitter.im/gitterHQ/gitter.svg
  11. :target: https://gitter.im/python-trio/AnyIO
  12. :alt: Gitter chat
  13. AnyIO is an asynchronous networking and concurrency library that works on top of either asyncio_ or
  14. trio_. It implements trio-like `structured concurrency`_ (SC) on top of asyncio and works in harmony
  15. with the native SC of trio itself.
  16. Applications and libraries written against AnyIO's API will run unmodified on either asyncio_ or
  17. trio_. AnyIO can also be adopted into a library or application incrementally – bit by bit, no full
  18. refactoring necessary. It will blend in with the native libraries of your chosen backend.
  19. Documentation
  20. -------------
  21. View full documentation at: https://anyio.readthedocs.io/
  22. Features
  23. --------
  24. AnyIO offers the following functionality:
  25. * Task groups (nurseries_ in trio terminology)
  26. * High-level networking (TCP, UDP and UNIX sockets)
  27. * `Happy eyeballs`_ algorithm for TCP connections (more robust than that of asyncio on Python
  28. 3.8)
  29. * async/await style UDP sockets (unlike asyncio where you still have to use Transports and
  30. Protocols)
  31. * A versatile API for byte streams and object streams
  32. * Inter-task synchronization and communication (locks, conditions, events, semaphores, object
  33. streams)
  34. * Worker threads
  35. * Subprocesses
  36. * Asynchronous file I/O (using worker threads)
  37. * Signal handling
  38. AnyIO also comes with its own pytest_ plugin which also supports asynchronous fixtures.
  39. It even works with the popular Hypothesis_ library.
  40. .. _asyncio: https://docs.python.org/3/library/asyncio.html
  41. .. _trio: https://github.com/python-trio/trio
  42. .. _structured concurrency: https://en.wikipedia.org/wiki/Structured_concurrency
  43. .. _nurseries: https://trio.readthedocs.io/en/stable/reference-core.html#nurseries-and-spawning
  44. .. _Happy eyeballs: https://en.wikipedia.org/wiki/Happy_Eyeballs
  45. .. _pytest: https://docs.pytest.org/en/latest/
  46. .. _Hypothesis: https://hypothesis.works/