annotate CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/lib/python3.8/site-packages/sniffio-1.3.1.dist-info/METADATA @ 69:33d812a61356

planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author jpayne
date Tue, 18 Mar 2025 17:55:14 -0400
parents
children
rev   line source
jpayne@69 1 Metadata-Version: 2.1
jpayne@69 2 Name: sniffio
jpayne@69 3 Version: 1.3.1
jpayne@69 4 Summary: Sniff out which async library your code is running under
jpayne@69 5 Author-email: "Nathaniel J. Smith" <njs@pobox.com>
jpayne@69 6 License: MIT OR Apache-2.0
jpayne@69 7 Project-URL: Homepage, https://github.com/python-trio/sniffio
jpayne@69 8 Project-URL: Documentation, https://sniffio.readthedocs.io/
jpayne@69 9 Project-URL: Changelog, https://sniffio.readthedocs.io/en/latest/history.html
jpayne@69 10 Keywords: async,trio,asyncio
jpayne@69 11 Classifier: License :: OSI Approved :: MIT License
jpayne@69 12 Classifier: License :: OSI Approved :: Apache Software License
jpayne@69 13 Classifier: Framework :: Trio
jpayne@69 14 Classifier: Framework :: AsyncIO
jpayne@69 15 Classifier: Operating System :: POSIX :: Linux
jpayne@69 16 Classifier: Operating System :: MacOS :: MacOS X
jpayne@69 17 Classifier: Operating System :: Microsoft :: Windows
jpayne@69 18 Classifier: Programming Language :: Python :: 3 :: Only
jpayne@69 19 Classifier: Programming Language :: Python :: Implementation :: CPython
jpayne@69 20 Classifier: Programming Language :: Python :: Implementation :: PyPy
jpayne@69 21 Classifier: Intended Audience :: Developers
jpayne@69 22 Classifier: Development Status :: 5 - Production/Stable
jpayne@69 23 Requires-Python: >=3.7
jpayne@69 24 Description-Content-Type: text/x-rst
jpayne@69 25 License-File: LICENSE
jpayne@69 26 License-File: LICENSE.APACHE2
jpayne@69 27 License-File: LICENSE.MIT
jpayne@69 28
jpayne@69 29 .. image:: https://img.shields.io/badge/chat-join%20now-blue.svg
jpayne@69 30 :target: https://gitter.im/python-trio/general
jpayne@69 31 :alt: Join chatroom
jpayne@69 32
jpayne@69 33 .. image:: https://img.shields.io/badge/docs-read%20now-blue.svg
jpayne@69 34 :target: https://sniffio.readthedocs.io/en/latest/?badge=latest
jpayne@69 35 :alt: Documentation Status
jpayne@69 36
jpayne@69 37 .. image:: https://img.shields.io/pypi/v/sniffio.svg
jpayne@69 38 :target: https://pypi.org/project/sniffio
jpayne@69 39 :alt: Latest PyPi version
jpayne@69 40
jpayne@69 41 .. image:: https://img.shields.io/conda/vn/conda-forge/sniffio.svg
jpayne@69 42 :target: https://anaconda.org/conda-forge/sniffio
jpayne@69 43 :alt: Latest conda-forge version
jpayne@69 44
jpayne@69 45 .. image:: https://travis-ci.org/python-trio/sniffio.svg?branch=master
jpayne@69 46 :target: https://travis-ci.org/python-trio/sniffio
jpayne@69 47 :alt: Automated test status
jpayne@69 48
jpayne@69 49 .. image:: https://codecov.io/gh/python-trio/sniffio/branch/master/graph/badge.svg
jpayne@69 50 :target: https://codecov.io/gh/python-trio/sniffio
jpayne@69 51 :alt: Test coverage
jpayne@69 52
jpayne@69 53 =================================================================
jpayne@69 54 sniffio: Sniff out which async library your code is running under
jpayne@69 55 =================================================================
jpayne@69 56
jpayne@69 57 You're writing a library. You've decided to be ambitious, and support
jpayne@69 58 multiple async I/O packages, like `Trio
jpayne@69 59 <https://trio.readthedocs.io>`__, and `asyncio
jpayne@69 60 <https://docs.python.org/3/library/asyncio.html>`__, and ... You've
jpayne@69 61 written a bunch of clever code to handle all the differences. But...
jpayne@69 62 how do you know *which* piece of clever code to run?
jpayne@69 63
jpayne@69 64 This is a tiny package whose only purpose is to let you detect which
jpayne@69 65 async library your code is running under.
jpayne@69 66
jpayne@69 67 * Documentation: https://sniffio.readthedocs.io
jpayne@69 68
jpayne@69 69 * Bug tracker and source code: https://github.com/python-trio/sniffio
jpayne@69 70
jpayne@69 71 * License: MIT or Apache License 2.0, your choice
jpayne@69 72
jpayne@69 73 * Contributor guide: https://trio.readthedocs.io/en/latest/contributing.html
jpayne@69 74
jpayne@69 75 * Code of conduct: Contributors are requested to follow our `code of
jpayne@69 76 conduct
jpayne@69 77 <https://trio.readthedocs.io/en/latest/code-of-conduct.html>`_
jpayne@69 78 in all project spaces.
jpayne@69 79
jpayne@69 80 This library is maintained by the Trio project, as a service to the
jpayne@69 81 async Python community as a whole.
jpayne@69 82
jpayne@69 83
jpayne@69 84 Quickstart
jpayne@69 85 ----------
jpayne@69 86
jpayne@69 87 .. code-block:: python3
jpayne@69 88
jpayne@69 89 from sniffio import current_async_library
jpayne@69 90 import trio
jpayne@69 91 import asyncio
jpayne@69 92
jpayne@69 93 async def print_library():
jpayne@69 94 library = current_async_library()
jpayne@69 95 print("This is:", library)
jpayne@69 96
jpayne@69 97 # Prints "This is trio"
jpayne@69 98 trio.run(print_library)
jpayne@69 99
jpayne@69 100 # Prints "This is asyncio"
jpayne@69 101 asyncio.run(print_library())
jpayne@69 102
jpayne@69 103 For more details, including how to add support to new async libraries,
jpayne@69 104 `please peruse our fine manual <https://sniffio.readthedocs.io>`__.