ppc64le/linux/: sniffio-1.3.1+ppc64le1 metadata and description

Simple index

Sniff out which async library your code is running under

author_email "Nathaniel J. Smith" <[email protected]>
classifiers
  • License :: OSI Approved :: MIT License
  • License :: OSI Approved :: Apache Software License
  • Framework :: Trio
  • Framework :: AsyncIO
  • Operating System :: POSIX :: Linux
  • Operating System :: MacOS :: MacOS X
  • Operating System :: Microsoft :: Windows
  • Programming Language :: Python :: 3 :: Only
  • Programming Language :: Python :: Implementation :: CPython
  • Programming Language :: Python :: Implementation :: PyPy
  • Intended Audience :: Developers
  • Development Status :: 5 - Production/Stable
  • Environment :: MetaData :: IBM Python Ecosystem
description_content_type text/x-rst
dynamic license-file
keywords async,trio,asyncio
license MIT OR Apache-2.0
license_file LICENSE.MIT
project_urls
  • Homepage, https://github.com/python-trio/sniffio
  • Documentation, https://sniffio.readthedocs.io/
  • Changelog, https://sniffio.readthedocs.io/en/latest/history.html
requires_python >=3.7
File Tox results History
sniffio-1.3.1+ppc64le1-py3-none-any.whl
Size
10 KB
Type
Python Wheel
Python
3
Join chatroom Documentation Status Latest PyPi version Latest conda-forge version Automated test status Test coverage

sniffio: Sniff out which async library your code is running under

You’re writing a library. You’ve decided to be ambitious, and support multiple async I/O packages, like Trio, and asyncio, and … You’ve written a bunch of clever code to handle all the differences. But… how do you know which piece of clever code to run?

This is a tiny package whose only purpose is to let you detect which async library your code is running under.

This library is maintained by the Trio project, as a service to the async Python community as a whole.

Quickstart

from sniffio import current_async_library
import trio
import asyncio

async def print_library():
    library = current_async_library()
    print("This is:", library)

# Prints "This is trio"
trio.run(print_library)

# Prints "This is asyncio"
asyncio.run(print_library())

For more details, including how to add support to new async libraries, please peruse our fine manual.

Export Classification Notice

The software hosted on this website consists of publicly available open‑source packages. To the extent U.S. export regulations apply, software that is publicly available as described in 15 C.F.R. §§ 734.7 (for non-encryption software) or 742.15(b) (for encryption software) is not subject to the Export Administration Regulations (EAR). Users are responsible for complying with all applicable export laws and regulations.