comparison CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/lib/python3.8/site-packages/sniffio-1.3.1.dist-info/METADATA @ 68:5028fdace37b

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