{ "info": { "author": "Nathaniel J. Smith", "author_email": "njs@pobox.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Framework :: AsyncIO", "Framework :: Trio", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "License :: OSI Approved :: MIT License", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy" ], "description": ".. image:: https://img.shields.io/badge/chat-join%20now-blue.svg\n :target: https://gitter.im/python-trio/general\n :alt: Join chatroom\n\n.. image:: https://img.shields.io/badge/docs-read%20now-blue.svg\n :target: https://sniffio.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\n.. image:: https://img.shields.io/pypi/v/sniffio.svg\n :target: https://pypi.org/project/sniffio\n :alt: Latest PyPi version\n\n.. image:: https://img.shields.io/conda/vn/conda-forge/sniffio.svg\n :target: https://anaconda.org/conda-forge/sniffio \n :alt: Latest conda-forge version \n\n.. image:: https://travis-ci.org/python-trio/sniffio.svg?branch=master\n :target: https://travis-ci.org/python-trio/sniffio\n :alt: Automated test status\n\n.. image:: https://codecov.io/gh/python-trio/sniffio/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/python-trio/sniffio\n :alt: Test coverage\n\n=================================================================\nsniffio: Sniff out which async library your code is running under\n=================================================================\n\nYou're writing a library. You've decided to be ambitious, and support\nmultiple async I/O packages, like `Trio\n`__, and `asyncio\n`__, and ... You've\nwritten a bunch of clever code to handle all the differences. But...\nhow do you know *which* piece of clever code to run?\n\nThis is a tiny package whose only purpose is to let you detect which\nasync library your code is running under.\n\n* Documentation: https://sniffio.readthedocs.io\n\n* Bug tracker and source code: https://github.com/python-trio/sniffio\n\n* License: MIT or Apache License 2.0, your choice\n\n* Contributor guide: https://trio.readthedocs.io/en/latest/contributing.html\n\n* Code of conduct: Contributors are requested to follow our `code of\n conduct\n `_\n in all project spaces.\n\nThis library is maintained by the Trio project, as a service to the\nasync Python community as a whole.\n\n\nQuickstart\n----------\n\n.. code-block:: python3\n\n from sniffio import current_async_library\n import trio\n import asyncio\n\n async def print_library():\n library = current_async_library()\n print(\"This is:\", library)\n\n # Prints \"This is trio\"\n trio.run(print_library)\n\n # Prints \"This is asyncio\"\n asyncio.run(print_library())\n\nFor more details, including how to add support to new async libraries,\n`please peruse our fine manual `__.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/python-trio/sniffio", "keywords": "async,trio,asyncio", "license": "MIT -or- Apache License 2.0", "maintainer": "", "maintainer_email": "", "name": "sniffio", "package_url": "https://pypi.org/project/sniffio/", "platform": "", "project_url": "https://pypi.org/project/sniffio/", "project_urls": { "Homepage": "https://github.com/python-trio/sniffio" }, "release_url": "https://pypi.org/project/sniffio/1.1.0/", "requires_dist": [ "contextvars (>=2.1); python_version < '3.7'" ], "requires_python": ">=3.5", "summary": "Sniff out which async library your code is running under", "version": "1.1.0" }, "last_serial": 5166913, "releases": { "0.0.0": [ { "comment_text": "", "digests": { "md5": "e4e7124bb1bda9903000848df4b2fd91", "sha256": "0609737dc3d7076a3f6977691ace2ebf057bd0924375efb967166a5580ae6099" }, "downloads": -1, "filename": "sniffio-0.0.0.tar.gz", "has_sig": false, "md5_digest": "e4e7124bb1bda9903000848df4b2fd91", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 609, "upload_time": "2018-07-31T04:16:34", "url": "https://files.pythonhosted.org/packages/ae/ed/ae8c22c36a2f7c0119987f7ae331f2cfe185ad9e989a38b6b28276d68a8b/sniffio-0.0.0.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "3709de9d2ed5645668d99d1d4beebab9", "sha256": "afb4997584a920e6e378a81ded2b3e71a696b85a68c4bfbe4dadf1ba57a9ef45" }, "downloads": -1, "filename": "sniffio-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "3709de9d2ed5645668d99d1d4beebab9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 4356, "upload_time": "2018-08-01T03:01:02", "url": "https://files.pythonhosted.org/packages/ca/08/58f3b857b8bba832983e8c5dce5e3f8c677a5527e41cf61ff45effc78cae/sniffio-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f1ee89409cd401ca1bed64bb5945e495", "sha256": "2e9b81429e3b7c9e119fcee2673ee3be3229982adc68b3f59317863aba05ebb7" }, "downloads": -1, "filename": "sniffio-1.0.0.tar.gz", "has_sig": false, "md5_digest": "f1ee89409cd401ca1bed64bb5945e495", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 14999, "upload_time": "2018-08-01T03:01:03", "url": "https://files.pythonhosted.org/packages/c8/83/0e3953535271855718993595c582a0af7726b41beba683e63e1c3abc1982/sniffio-1.0.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "5a00e157e88afbbbbaf5fcd4648b0712", "sha256": "20ed6d5b46f8ae136d00b9dcb807615d83ed82ceea6b2058cecb696765246da5" }, "downloads": -1, "filename": "sniffio-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "5a00e157e88afbbbbaf5fcd4648b0712", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 4534, "upload_time": "2019-04-20T04:05:53", "url": "https://files.pythonhosted.org/packages/b3/82/4bd4b7d9c0d1dc0fbfbc2a1e00138e7f3ab85bc239358fe9b78aa2ab586d/sniffio-1.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d6cbaaf1885babd6a170a21e1686e70b", "sha256": "8e3810100f69fe0edd463d02ad407112542a11ffdc29f67db2bf3771afb87a21" }, "downloads": -1, "filename": "sniffio-1.1.0.tar.gz", "has_sig": false, "md5_digest": "d6cbaaf1885babd6a170a21e1686e70b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 15285, "upload_time": "2019-04-20T04:05:54", "url": "https://files.pythonhosted.org/packages/ad/e5/63342a59850c6d285af0df92c86a778e1753235d6d392b9ae184217af852/sniffio-1.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5a00e157e88afbbbbaf5fcd4648b0712", "sha256": "20ed6d5b46f8ae136d00b9dcb807615d83ed82ceea6b2058cecb696765246da5" }, "downloads": -1, "filename": "sniffio-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "5a00e157e88afbbbbaf5fcd4648b0712", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 4534, "upload_time": "2019-04-20T04:05:53", "url": "https://files.pythonhosted.org/packages/b3/82/4bd4b7d9c0d1dc0fbfbc2a1e00138e7f3ab85bc239358fe9b78aa2ab586d/sniffio-1.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d6cbaaf1885babd6a170a21e1686e70b", "sha256": "8e3810100f69fe0edd463d02ad407112542a11ffdc29f67db2bf3771afb87a21" }, "downloads": -1, "filename": "sniffio-1.1.0.tar.gz", "has_sig": false, "md5_digest": "d6cbaaf1885babd6a170a21e1686e70b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 15285, "upload_time": "2019-04-20T04:05:54", "url": "https://files.pythonhosted.org/packages/ad/e5/63342a59850c6d285af0df92c86a778e1753235d6d392b9ae184217af852/sniffio-1.1.0.tar.gz" } ] }