[
{
  "model": "scanpipe.project",
  "pk": "cbd609b2-525a-4052-9860-201b879b20d9",
  "fields": {
    "extra_data": {},
    "created_date": "2023-05-08T04:34:00.013Z",
    "name": "asgiref",
    "work_directory": "/tmp/tmp1kvnzy78/projects/asgiref-4c7f2e2e",
    "input_sources": {
      "asgiref-3.3.0-py3-none-any.whl": "-"
    },
    "is_archived": false
  }
},
{
  "model": "scanpipe.run",
  "pk": "69d0d86d-6462-47db-b933-6638642bbbfc",
  "fields": {
    "task_id": null,
    "task_start_date": null,
    "task_end_date": null,
    "task_exitcode": null,
    "task_output": "",
    "project": "cbd609b2-525a-4052-9860-201b879b20d9",
    "pipeline_name": "scan_codebase",
    "created_date": "2023-05-08T04:34:00.018Z",
    "scancodeio_version": "",
    "description": "Scan a codebase with ScanCode-toolkit.",
    "current_step": "",
    "log": "2023-05-08 06:34:00.01 Pipeline [scan_codebase] starting\n2023-05-08 06:34:00.02 Step [copy_inputs_to_codebase_directory] starting\n2023-05-08 06:34:00.02 Step [copy_inputs_to_codebase_directory] completed in 0.00 seconds\n2023-05-08 06:34:00.02 Step [extract_archives] starting\n2023-05-08 06:34:00.04 Step [extract_archives] completed in 0.02 seconds\n2023-05-08 06:34:00.04 Step [collect_and_create_codebase_resources] starting\n2023-05-08 06:34:00.16 Step [collect_and_create_codebase_resources] completed in 0.11 seconds\n2023-05-08 06:34:00.16 Step [flag_empty_files] starting\n2023-05-08 06:34:00.16 Step [flag_empty_files] completed in 0.00 seconds\n2023-05-08 06:34:00.16 Step [scan_for_application_packages] starting\n2023-05-08 06:34:01.88 Step [scan_for_application_packages] completed in 1.72 seconds\n2023-05-08 06:34:01.88 Step [scan_for_files] starting\n2023-05-08 06:34:03.54 Step [scan_for_files] completed in 1.66 seconds\n2023-05-08 06:34:03.54 Pipeline completed\n"
  }
},
{
  "model": "scanpipe.codebaseresource",
  "pk": 1,
  "fields": {
    "md5": "5bce1df6dedc53a41a9a6b40d7b1699e",
    "sha1": "c03f67211a311b13d1294ac8af7cb139ee34c4f9",
    "sha256": "a5098bc870b80e7b872bff60bb363c7f2c2c89078759f6c47b53ff8c525a152e",
    "sha512": "",
    "extra_data": {},
    "project": "cbd609b2-525a-4052-9860-201b879b20d9",
    "detected_license_expression": "",
    "detected_license_expression_spdx": "",
    "license_detections": [],
    "license_clues": [],
    "percentage_of_license_text": null,
    "copyrights": [],
    "holders": [],
    "authors": [],
    "emails": [],
    "urls": [],
    "path": "asgiref-3.3.0-py3-none-any.whl",
    "rootfs_path": "",
    "status": "application-package",
    "size": 19948,
    "tag": "",
    "type": "file",
    "name": "asgiref-3.3.0-py3-none-any.whl",
    "extension": ".whl",
    "programming_language": "",
    "mime_type": "application/zip",
    "file_type": "Zip archive data, at least v2.0 to extract, compression method=deflate",
    "is_binary": true,
    "is_text": false,
    "is_archive": true,
    "is_key_file": false,
    "is_media": false,
    "compliance_alert": "",
    "package_data": [
      {
        "md5": null,
        "name": "asgiref",
        "purl": "pkg:pypi/asgiref@3.3.0",
        "sha1": null,
        "size": null,
        "type": "pypi",
        "holder": null,
        "sha256": null,
        "sha512": null,
        "parties": [
          {
            "url": null,
            "name": "Django Software Foundation",
            "role": "author",
            "type": "person",
            "email": "foundation@djangoproject.com"
          }
        ],
        "subpath": null,
        "vcs_url": null,
        "version": "3.3.0",
        "keywords": [
          "Development Status :: 5 - Production/Stable",
          "Environment :: Web Environment",
          "Intended Audience :: Developers",
          "Operating System :: OS Independent",
          "Programming Language :: Python",
          "Programming Language :: Python :: 3",
          "Programming Language :: Python :: 3 :: Only",
          "Programming Language :: Python :: 3.5",
          "Programming Language :: Python :: 3.6",
          "Programming Language :: Python :: 3.7",
          "Programming Language :: Python :: 3.8",
          "Topic :: Internet :: WWW/HTTP"
        ],
        "copyright": null,
        "namespace": null,
        "extra_data": {
          "Changelog": "https://github.com/django/asgiref/blob/master/CHANGELOG.txt",
          "Documentation": "https://asgi.readthedocs.io/",
          "Further Documentation": "https://docs.djangoproject.com/en/stable/topics/async/#async-adapter-functions"
        },
        "qualifiers": {},
        "description": "ASGI specs, helper code, and adapters\nasgiref\n=======\n\n.. image:: https://api.travis-ci.org/django/asgiref.svg\n    :target: https://travis-ci.org/django/asgiref\n\n.. image:: https://img.shields.io/pypi/v/asgiref.svg\n    :target: https://pypi.python.org/pypi/asgiref\n\nASGI is a standard for Python asynchronous web apps and servers to communicate\nwith each other, and positioned as an asynchronous successor to WSGI. You can\nread more at https://asgi.readthedocs.io/en/latest/\n\nThis package includes ASGI base libraries, such as:\n\n* Sync-to-async and async-to-sync function wrappers, ``asgiref.sync``\n* Server base classes, ``asgiref.server``\n* A WSGI-to-ASGI adapter, in ``asgiref.wsgi``\n\n\nFunction wrappers\n-----------------\n\nThese allow you to wrap or decorate async or sync functions to call them from\nthe other style (so you can call async functions from a synchronous thread,\nor vice-versa).\n\nIn particular:\n\n* AsyncToSync lets a synchronous subthread stop and wait while the async\n  function is called on the main thread's event loop, and then control is\n  returned to the thread when the async function is finished.\n\n* SyncToAsync lets async code call a synchronous function, which is run in\n  a threadpool and control returned to the async coroutine when the synchronous\n  function completes.\n\nThe idea is to make it easier to call synchronous APIs from async code and\nasynchronous APIs from synchronous code so it's easier to transition code from\none style to the other. In the case of Channels, we wrap the (synchronous)\nDjango view system with SyncToAsync to allow it to run inside the (asynchronous)\nASGI server.\n\nNote that exactly what threads things run in is very specific, and aimed to\nkeep maximum compatibility with old synchronous code. See\n\"Synchronous code & Threads\" below for a full explanation. By default,\n``sync_to_async`` will run all synchronous code in the program in the same\nthread for safety reasons; you can disable this for more performance with\n``@sync_to_async(thread_sensitive=False)``, but make sure that your code does\nnot rely on anything bound to threads (like database connections) when you do.\n\n\nThreadlocal replacement\n-----------------------\n\nThis is a drop-in replacement for ``threading.local`` that works with both\nthreads and asyncio Tasks. Even better, it will proxy values through from a\ntask-local context to a thread-local context when you use ``sync_to_async``\nto run things in a threadpool, and vice-versa for ``async_to_sync``.\n\nIf you instead want true thread- and task-safety, you can set\n``thread_critical`` on the Local object to ensure this instead.\n\n\nServer base classes\n-------------------\n\nIncludes a ``StatelessServer`` class which provides all the hard work of\nwriting a stateless server (as in, does not handle direct incoming sockets\nbut instead consumes external streams or sockets to work out what is happening).\n\nAn example of such a server would be a chatbot server that connects out to\na central chat server and provides a \"connection scope\" per user chatting to\nit. There's only one actual connection, but the server has to separate things\ninto several scopes for easier writing of the code.\n\nYou can see an example of this being used in `frequensgi <https://github.com/andrewgodwin/frequensgi>`_.\n\n\nWSGI-to-ASGI adapter\n--------------------\n\nAllows you to wrap a WSGI application so it appears as a valid ASGI application.\n\nSimply wrap it around your WSGI application like so::\n\n    asgi_application = WsgiToAsgi(wsgi_application)\n\nThe WSGI application will be run in a synchronous threadpool, and the wrapped\nASGI application will be one that accepts ``http`` class messages.\n\nPlease note that not all extended features of WSGI may be supported (such as\nfile handles for incoming POST bodies).\n\n\nDependencies\n------------\n\n``asgiref`` requires Python 3.5 or higher.\n\n\nContributing\n------------\n\nPlease refer to the\n`main Channels contributing docs <https://github.com/django/channels/blob/master/CONTRIBUTING.rst>`_.\n\n\nTesting\n'''''''\n\nTo run tests, make sure you have installed the ``tests`` extra with the package::\n\n    cd asgiref/\n    pip install -e .[tests]\n    pytest\n\n\nBuilding the documentation\n''''''''''''''''''''''''''\n\nThe documentation uses `Sphinx <http://www.sphinx-doc.org>`_::\n\n    cd asgiref/docs/\n    pip install sphinx\n\nTo build the docs, you can use the default tools::\n\n    sphinx-build -b html . _build/html  # or `make html`, if you've got make set up\n    cd _build/html\n    python -m http.server\n\n...or you can use ``sphinx-autobuild`` to run a server and rebuild/reload\nyour documentation changes automatically::\n\n    pip install sphinx-autobuild\n    sphinx-autobuild . _build/html\n\n\nImplementation Details\n----------------------\n\nSynchronous code & threads\n''''''''''''''''''''''''''\n\nThe ``asgiref.sync`` module provides two wrappers that let you go between\nasynchronous and synchronous code at will, while taking care of the rough edges\nfor you.\n\nUnfortunately, the rough edges are numerous, and the code has to work especially\nhard to keep things in the same thread as much as possible. Notably, the\nrestrictions we are working with are:\n\n* All synchronous code called through ``SyncToAsync`` and marked with\n  ``thread_sensitive`` should run in the same thread as each other (and if the\n  outer layer of the program is synchronous, the main thread)\n\n* If a thread already has a running async loop, ``AsyncToSync`` can't run things\n  on that loop if it's blocked on synchronous code that is above you in the\n  call stack.\n\nThe first compromise you get to might be that ``thread_sensitive`` code should\njust run in the same thread and not spawn in a sub-thread, fulfilling the first\nrestriction, but that immediately runs you into the second restriction.\n\nThe only real solution is to essentially have a variant of ThreadPoolExecutor\nthat executes any ``thread_sensitive`` code on the outermost synchronous\nthread - either the main thread, or a single spawned subthread.\n\nThis means you now have two basic states:\n\n* If the outermost layer of your program is synchronous, then all async code\n  run through ``AsyncToSync`` will run in a per-call event loop in arbitary\n  sub-threads, while all ``thread_sensitive`` code will run in the main thread.\n\n* If the outermost layer of your program is asynchronous, then all async code\n  runs on the main thread's event loop, and all ``thread_sensitive`` synchronous\n  code will run in a single shared sub-thread.\n\nCruicially, this means that in both cases there is a thread which is a shared\nresource that all ``thread_sensitive`` code must run on, and there is a chance\nthat this thread is currently blocked on its own ``AsyncToSync`` call. Thus,\n``AsyncToSync`` needs to act as an executor for thread code while it's blocking.\n\nThe ``CurrentThreadExecutor`` class provides this functionality; rather than\nsimply waiting on a Future, you can call its ``run_until_future`` method and\nit will run submitted code until that Future is done. This means that code\ninside the call can then run code on your thread.\n\n\nMaintenance and Security\n------------------------\n\nTo report security issues, please contact security@djangoproject.com. For GPG\nsignatures and more security process information, see\nhttps://docs.djangoproject.com/en/dev/internals/security/.\n\nTo report bugs or request new features, please open a new GitHub issue.\n\nThis repository is part of the Channels project. For the shepherd and maintenance team, please see the\n`main Channels readme <https://github.com/django/channels/blob/master/README.rst>`_.",
        "notice_text": null,
        "api_data_url": "https://pypi.org/pypi/asgiref/3.3.0/json",
        "dependencies": [
          {
            "purl": "pkg:pypi/pytest",
            "scope": "tests",
            "extra_data": {},
            "is_runtime": true,
            "is_optional": true,
            "is_resolved": false,
            "resolved_package": {},
            "extracted_requirement": "pytest; extra == \"tests\""
          },
          {
            "purl": "pkg:pypi/pytest-asyncio",
            "scope": "tests",
            "extra_data": {},
            "is_runtime": true,
            "is_optional": true,
            "is_resolved": false,
            "resolved_package": {},
            "extracted_requirement": "pytest-asyncio; extra == \"tests\""
          }
        ],
        "download_url": null,
        "homepage_url": "https://github.com/django/asgiref/",
        "release_date": null,
        "code_view_url": null,
        "datasource_id": "pypi_wheel",
        "file_references": [
          {
            "md5": null,
            "path": "asgiref/__init__.py",
            "sha1": null,
            "size": 22,
            "sha256": "30f49b9094bff904a42caeec32515715fe625a56dc48bd7c0e3d9988c0ad4bd7",
            "sha512": null,
            "extra_data": {}
          },
          {
            "md5": null,
            "path": "asgiref/compatibility.py",
            "sha1": null,
            "size": 1598,
            "sha256": "3151f66c476208c3154cb6c4fb557a2a253bab82f0ab33fb3c8b9f7976be9e33",
            "sha512": null,
            "extra_data": {}
          },
          {
            "md5": null,
            "path": "asgiref/current_thread_executor.py",
            "sha1": null,
            "size": 2974,
            "sha256": "ddd445b778c097fc75c2bf69ad964cbadd3bd6999d1dd2306d39d401855e8e3e",
            "sha512": null,
            "extra_data": {}
          },
          {
            "md5": null,
            "path": "asgiref/local.py",
            "sha1": null,
            "size": 4849,
            "sha256": "ee0fcf4a8e6fa9df8a4643bb48e82892d496afce44b6c8b8aea2721755545e1c",
            "sha512": null,
            "extra_data": {}
          },
          {
            "md5": null,
            "path": "asgiref/server.py",
            "sha1": null,
            "size": 5915,
            "sha256": "885267fee0fea687875a02ceb929ca095312d47aaa57e20e4ce382f397caaf4d",
            "sha512": null,
            "extra_data": {}
          },
          {
            "md5": null,
            "path": "asgiref/sync.py",
            "sha1": null,
            "size": 14081,
            "sha256": "fa4651a3b79201a4dc44a4096cd49ec8f427e912ea0ee05c666357b413a8afe7",
            "sha512": null,
            "extra_data": {}
          },
          {
            "md5": null,
            "path": "asgiref/testing.py",
            "sha1": null,
            "size": 3119,
            "sha256": "ddbc8d455eceb68fc583c67e7c4ad0277c867fb39095c51ec5b37f70342e8334",
            "sha512": null,
            "extra_data": {}
          },
          {
            "md5": null,
            "path": "asgiref/timeout.py",
            "sha1": null,
            "size": 3914,
            "sha256": "126c3e3a8a75a517d2739612304607804cf5f34da63fa25d03a6f11f7edb6f2f",
            "sha512": null,
            "extra_data": {}
          },
          {
            "md5": null,
            "path": "asgiref/wsgi.py",
            "sha1": null,
            "size": 6575,
            "sha256": "f8bd1ea3fb8afddabb10f8efd66796d41446cad51168ef4d3c44b19c973d0ad0",
            "sha512": null,
            "extra_data": {}
          },
          {
            "md5": null,
            "path": "asgiref-3.3.0.dist-info/LICENSE",
            "sha1": null,
            "size": 1552,
            "sha256": "b846415d1b514e9c1dff14a22deb906d794bc546ca6129f950a18cd091e2a669",
            "sha512": null,
            "extra_data": {}
          },
          {
            "md5": null,
            "path": "asgiref-3.3.0.dist-info/METADATA",
            "sha1": null,
            "size": 8800,
            "sha256": "70f98f4eb9f6068b192b5464fcdf69e29a8ff09962bfce84bbb052baeee44f33",
            "sha512": null,
            "extra_data": {}
          },
          {
            "md5": null,
            "path": "asgiref-3.3.0.dist-info/WHEEL",
            "sha1": null,
            "size": 92,
            "sha256": "11546323af45e6a5639bf620a9c4d73e74c0bf705f494af4595007b923f75e8a",
            "sha512": null,
            "extra_data": {}
          },
          {
            "md5": null,
            "path": "asgiref-3.3.0.dist-info/top_level.txt",
            "sha1": null,
            "size": 8,
            "sha256": "6e89108c2cf0c0446174188f76f60465ae1c1f14f83427807df40d52a27cb2c8",
            "sha512": null,
            "extra_data": {}
          },
          {
            "md5": null,
            "path": "asgiref-3.3.0.dist-info/RECORD",
            "sha1": null,
            "size": null,
            "sha256": null,
            "sha512": null,
            "extra_data": {}
          }
        ],
        "source_packages": [],
        "bug_tracking_url": null,
        "primary_language": "Python",
        "license_detections": [
          {
            "matches": [
              {
                "score": 99.0,
                "matcher": "1-hash",
                "end_line": 1,
                "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-new_89.RULE",
                "start_line": 1,
                "matched_text": "license BSD",
                "match_coverage": 100.0,
                "matched_length": 2,
                "rule_relevance": 99,
                "rule_identifier": "bsd-new_89.RULE",
                "license_expression": "bsd-new"
              }
            ],
            "identifier": "bsd_new-261898a0-0118-87c4-7092-14e4ff134882",
            "license_expression": "bsd-new"
          },
          {
            "matches": [
              {
                "score": 99.0,
                "matcher": "1-hash",
                "end_line": 1,
                "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pypi_bsd_license.RULE",
                "start_line": 1,
                "matched_text": "['License :: OSI Approved :: BSD License']",
                "match_coverage": 100.0,
                "matched_length": 5,
                "rule_relevance": 99,
                "rule_identifier": "pypi_bsd_license.RULE",
                "license_expression": "bsd-new"
              }
            ],
            "identifier": "bsd_new-f4e99f86-00ab-18d9-a65d-a3a12767dcf5",
            "license_expression": "bsd-new"
          }
        ],
        "repository_download_url": "https://pypi.org/packages/source/a/asgiref/asgiref-3.3.0.tar.gz",
        "repository_homepage_url": "https://pypi.org/project/asgiref",
        "other_license_detections": [],
        "other_license_expression": null,
        "declared_license_expression": "bsd-new",
        "extracted_license_statement": "{'license': 'BSD', 'classifiers': ['License :: OSI Approved :: BSD License']}",
        "other_license_expression_spdx": null,
        "declared_license_expression_spdx": "BSD-3-Clause"
      }
    ]
  }
},
{
  "model": "scanpipe.codebaseresource",
  "pk": 2,
  "fields": {
    "md5": "",
    "sha1": "",
    "sha256": "",
    "sha512": "",
    "extra_data": {},
    "project": "cbd609b2-525a-4052-9860-201b879b20d9",
    "detected_license_expression": "",
    "detected_license_expression_spdx": "",
    "license_detections": [],
    "license_clues": [],
    "percentage_of_license_text": null,
    "copyrights": [],
    "holders": [],
    "authors": [],
    "emails": [],
    "urls": [],
    "path": "asgiref-3.3.0-py3-none-any.whl-extract",
    "rootfs_path": "",
    "status": "scanned",
    "size": 128,
    "tag": "",
    "type": "directory",
    "name": "asgiref-3.3.0-py3-none-any.whl-extract",
    "extension": ".whl-extract",
    "programming_language": "",
    "mime_type": "",
    "file_type": "",
    "is_binary": false,
    "is_text": false,
    "is_archive": false,
    "is_key_file": false,
    "is_media": false,
    "compliance_alert": "",
    "package_data": []
  }
},
{
  "model": "scanpipe.codebaseresource",
  "pk": 3,
  "fields": {
    "md5": "",
    "sha1": "",
    "sha256": "",
    "sha512": "",
    "extra_data": {},
    "project": "cbd609b2-525a-4052-9860-201b879b20d9",
    "detected_license_expression": "",
    "detected_license_expression_spdx": "",
    "license_detections": [],
    "license_clues": [],
    "percentage_of_license_text": null,
    "copyrights": [],
    "holders": [],
    "authors": [],
    "emails": [],
    "urls": [],
    "path": "asgiref-3.3.0-py3-none-any.whl-extract/asgiref",
    "rootfs_path": "",
    "status": "scanned",
    "size": 352,
    "tag": "",
    "type": "directory",
    "name": "asgiref",
    "extension": "",
    "programming_language": "",
    "mime_type": "",
    "file_type": "",
    "is_binary": false,
    "is_text": false,
    "is_archive": false,
    "is_key_file": false,
    "is_media": false,
    "compliance_alert": "",
    "package_data": []
  }
},
{
  "model": "scanpipe.codebaseresource",
  "pk": 4,
  "fields": {
    "md5": "",
    "sha1": "",
    "sha256": "",
    "sha512": "",
    "extra_data": {},
    "project": "cbd609b2-525a-4052-9860-201b879b20d9",
    "detected_license_expression": "",
    "detected_license_expression_spdx": "",
    "license_detections": [],
    "license_clues": [],
    "percentage_of_license_text": null,
    "copyrights": [],
    "holders": [],
    "authors": [],
    "emails": [],
    "urls": [],
    "path": "asgiref-3.3.0-py3-none-any.whl-extract/asgiref-3.3.0.dist-info",
    "rootfs_path": "",
    "status": "scanned",
    "size": 224,
    "tag": "",
    "type": "directory",
    "name": "asgiref-3.3.0.dist-info",
    "extension": ".dist-info",
    "programming_language": "",
    "mime_type": "",
    "file_type": "",
    "is_binary": false,
    "is_text": false,
    "is_archive": false,
    "is_key_file": false,
    "is_media": false,
    "compliance_alert": "",
    "package_data": []
  }
},
{
  "model": "scanpipe.codebaseresource",
  "pk": 5,
  "fields": {
    "md5": "44ec43af7ee367c7d6a5808d37133144",
    "sha1": "702381ba6ecb30bbfdcaf0d466a25f470dd9938b",
    "sha256": "fa4651a3b79201a4dc44a4096cd49ec8f427e912ea0ee05c666357b413a8afe7",
    "sha512": "",
    "extra_data": {},
    "project": "cbd609b2-525a-4052-9860-201b879b20d9",
    "detected_license_expression": "",
    "detected_license_expression_spdx": "",
    "license_detections": [],
    "license_clues": [],
    "percentage_of_license_text": null,
    "copyrights": [],
    "holders": [],
    "authors": [],
    "emails": [],
    "urls": [],
    "path": "asgiref-3.3.0-py3-none-any.whl-extract/asgiref/sync.py",
    "rootfs_path": "",
    "status": "scanned",
    "size": 14081,
    "tag": "",
    "type": "file",
    "name": "sync.py",
    "extension": ".py",
    "programming_language": "Python",
    "mime_type": "text/x-script.python",
    "file_type": "Python script, ASCII text executable",
    "is_binary": false,
    "is_text": true,
    "is_archive": false,
    "is_key_file": false,
    "is_media": false,
    "compliance_alert": "",
    "package_data": []
  }
},
{
  "model": "scanpipe.codebaseresource",
  "pk": 6,
  "fields": {
    "md5": "5231077fd0628314246fcba7817b561e",
    "sha1": "9c74e64e9a71903bb227907ea1806eac77e52434",
    "sha256": "3151f66c476208c3154cb6c4fb557a2a253bab82f0ab33fb3c8b9f7976be9e33",
    "sha512": "",
    "extra_data": {},
    "project": "cbd609b2-525a-4052-9860-201b879b20d9",
    "detected_license_expression": "",
    "detected_license_expression_spdx": "",
    "license_detections": [],
    "license_clues": [],
    "percentage_of_license_text": null,
    "copyrights": [],
    "holders": [],
    "authors": [],
    "emails": [],
    "urls": [],
    "path": "asgiref-3.3.0-py3-none-any.whl-extract/asgiref/compatibility.py",
    "rootfs_path": "",
    "status": "scanned",
    "size": 1598,
    "tag": "",
    "type": "file",
    "name": "compatibility.py",
    "extension": ".py",
    "programming_language": "Python",
    "mime_type": "text/x-script.python",
    "file_type": "Python script, ASCII text executable",
    "is_binary": false,
    "is_text": true,
    "is_archive": false,
    "is_key_file": false,
    "is_media": false,
    "compliance_alert": "",
    "package_data": []
  }
},
{
  "model": "scanpipe.codebaseresource",
  "pk": 7,
  "fields": {
    "md5": "5b7619584de19d8f1a00fb5a43349153",
    "sha1": "ebe97b4c2689537e9387dd8dac353c3e010f8f02",
    "sha256": "885267fee0fea687875a02ceb929ca095312d47aaa57e20e4ce382f397caaf4d",
    "sha512": "",
    "extra_data": {},
    "project": "cbd609b2-525a-4052-9860-201b879b20d9",
    "detected_license_expression": "",
    "detected_license_expression_spdx": "",
    "license_detections": [],
    "license_clues": [],
    "percentage_of_license_text": null,
    "copyrights": [],
    "holders": [],
    "authors": [],
    "emails": [],
    "urls": [],
    "path": "asgiref-3.3.0-py3-none-any.whl-extract/asgiref/server.py",
    "rootfs_path": "",
    "status": "scanned",
    "size": 5915,
    "tag": "",
    "type": "file",
    "name": "server.py",
    "extension": ".py",
    "programming_language": "Python",
    "mime_type": "text/x-script.python",
    "file_type": "Python script, ASCII text executable",
    "is_binary": false,
    "is_text": true,
    "is_archive": false,
    "is_key_file": false,
    "is_media": false,
    "compliance_alert": "",
    "package_data": []
  }
},
{
  "model": "scanpipe.codebaseresource",
  "pk": 8,
  "fields": {
    "md5": "e4103a2fcd6a3f23a036307c978271d7",
    "sha1": "0de5075d1ce4a1a17d70ad6ee523e3d947074899",
    "sha256": "ee0fcf4a8e6fa9df8a4643bb48e82892d496afce44b6c8b8aea2721755545e1c",
    "sha512": "",
    "extra_data": {},
    "project": "cbd609b2-525a-4052-9860-201b879b20d9",
    "detected_license_expression": "",
    "detected_license_expression_spdx": "",
    "license_detections": [],
    "license_clues": [],
    "percentage_of_license_text": null,
    "copyrights": [],
    "holders": [],
    "authors": [],
    "emails": [],
    "urls": [],
    "path": "asgiref-3.3.0-py3-none-any.whl-extract/asgiref/local.py",
    "rootfs_path": "",
    "status": "scanned",
    "size": 4849,
    "tag": "",
    "type": "file",
    "name": "local.py",
    "extension": ".py",
    "programming_language": "Python",
    "mime_type": "text/x-script.python",
    "file_type": "Python script, ASCII text executable",
    "is_binary": false,
    "is_text": true,
    "is_archive": false,
    "is_key_file": false,
    "is_media": false,
    "compliance_alert": "",
    "package_data": []
  }
},
{
  "model": "scanpipe.codebaseresource",
  "pk": 9,
  "fields": {
    "md5": "b4c45f37055d88dd11b15eb4de51b074",
    "sha1": "aacf7e5e2e5ba78ccfb67fa10e9e6b22c3935c9b",
    "sha256": "ddd445b778c097fc75c2bf69ad964cbadd3bd6999d1dd2306d39d401855e8e3e",
    "sha512": "",
    "extra_data": {},
    "project": "cbd609b2-525a-4052-9860-201b879b20d9",
    "detected_license_expression": "",
    "detected_license_expression_spdx": "",
    "license_detections": [],
    "license_clues": [],
    "percentage_of_license_text": null,
    "copyrights": [],
    "holders": [],
    "authors": [],
    "emails": [],
    "urls": [],
    "path": "asgiref-3.3.0-py3-none-any.whl-extract/asgiref/current_thread_executor.py",
    "rootfs_path": "",
    "status": "scanned",
    "size": 2974,
    "tag": "",
    "type": "file",
    "name": "current_thread_executor.py",
    "extension": ".py",
    "programming_language": "Python",
    "mime_type": "text/x-script.python",
    "file_type": "Python script, ASCII text executable",
    "is_binary": false,
    "is_text": true,
    "is_archive": false,
    "is_key_file": false,
    "is_media": false,
    "compliance_alert": "",
    "package_data": []
  }
},
{
  "model": "scanpipe.codebaseresource",
  "pk": 10,
  "fields": {
    "md5": "8114ef1d7c1488ebf3a1766dbd39d427",
    "sha1": "361968f116e8ff9156511bf22f6aa04426f0c540",
    "sha256": "126c3e3a8a75a517d2739612304607804cf5f34da63fa25d03a6f11f7edb6f2f",
    "sha512": "",
    "extra_data": {},
    "project": "cbd609b2-525a-4052-9860-201b879b20d9",
    "detected_license_expression": "apache-2.0",
    "detected_license_expression_spdx": "Apache-2.0",
    "license_detections": [
      {
        "policy": null,
        "matches": [
          {
            "score": 100.0,
            "matcher": "2-aho",
            "end_line": 2,
            "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_174.RULE",
            "start_line": 2,
            "matched_text": "# under the Apache 2.0 license. You may see the original project at",
            "match_coverage": 100.0,
            "matched_length": 6,
            "rule_relevance": 100,
            "rule_identifier": "apache-2.0_174.RULE",
            "license_expression": "apache-2.0"
          }
        ],
        "identifier": "apache_2_0-5a90b5fa-5d10-5a98-d2a7-ef089c46a900",
        "license_expression": "apache-2.0"
      }
    ],
    "license_clues": [],
    "percentage_of_license_text": 1.22,
    "copyrights": [],
    "holders": [],
    "authors": [],
    "emails": [],
    "urls": [
      {
        "url": "https://github.com/aio-libs/async-timeout",
        "end_line": 3,
        "start_line": 3
      },
      {
        "url": "https://github.com/",
        "end_line": 24,
        "start_line": 24
      },
      {
        "url": "https://github.com/python/asyncio/issues/392",
        "end_line": 83,
        "start_line": 83
      }
    ],
    "path": "asgiref-3.3.0-py3-none-any.whl-extract/asgiref/timeout.py",
    "rootfs_path": "",
    "status": "scanned",
    "size": 3914,
    "tag": "",
    "type": "file",
    "name": "timeout.py",
    "extension": ".py",
    "programming_language": "Python",
    "mime_type": "text/x-script.python",
    "file_type": "Python script, ASCII text executable",
    "is_binary": false,
    "is_text": true,
    "is_archive": false,
    "is_key_file": false,
    "is_media": false,
    "compliance_alert": "missing",
    "package_data": []
  }
},
{
  "model": "scanpipe.codebaseresource",
  "pk": 11,
  "fields": {
    "md5": "4910b756f4e611055140e80f757d9325",
    "sha1": "91bc786d907bf3ca8b8e6277063107975780f9ca",
    "sha256": "30f49b9094bff904a42caeec32515715fe625a56dc48bd7c0e3d9988c0ad4bd7",
    "sha512": "",
    "extra_data": {},
    "project": "cbd609b2-525a-4052-9860-201b879b20d9",
    "detected_license_expression": "",
    "detected_license_expression_spdx": "",
    "license_detections": [],
    "license_clues": [],
    "percentage_of_license_text": null,
    "copyrights": [],
    "holders": [],
    "authors": [],
    "emails": [],
    "urls": [],
    "path": "asgiref-3.3.0-py3-none-any.whl-extract/asgiref/__init__.py",
    "rootfs_path": "",
    "status": "scanned",
    "size": 22,
    "tag": "",
    "type": "file",
    "name": "__init__.py",
    "extension": ".py",
    "programming_language": "Python",
    "mime_type": "text/plain",
    "file_type": "ASCII text",
    "is_binary": false,
    "is_text": true,
    "is_archive": false,
    "is_key_file": false,
    "is_media": false,
    "compliance_alert": "",
    "package_data": []
  }
},
{
  "model": "scanpipe.codebaseresource",
  "pk": 12,
  "fields": {
    "md5": "aff31de5fa753643adacf0311aa553f4",
    "sha1": "534de2315197b14d0571edc5ed3b3b8ceade0d24",
    "sha256": "ddbc8d455eceb68fc583c67e7c4ad0277c867fb39095c51ec5b37f70342e8334",
    "sha512": "",
    "extra_data": {},
    "project": "cbd609b2-525a-4052-9860-201b879b20d9",
    "detected_license_expression": "",
    "detected_license_expression_spdx": "",
    "license_detections": [],
    "license_clues": [],
    "percentage_of_license_text": null,
    "copyrights": [],
    "holders": [],
    "authors": [],
    "emails": [],
    "urls": [],
    "path": "asgiref-3.3.0-py3-none-any.whl-extract/asgiref/testing.py",
    "rootfs_path": "",
    "status": "scanned",
    "size": 3119,
    "tag": "",
    "type": "file",
    "name": "testing.py",
    "extension": ".py",
    "programming_language": "Python",
    "mime_type": "text/x-script.python",
    "file_type": "Python script, ASCII text executable",
    "is_binary": false,
    "is_text": true,
    "is_archive": false,
    "is_key_file": false,
    "is_media": false,
    "compliance_alert": "",
    "package_data": []
  }
},
{
  "model": "scanpipe.codebaseresource",
  "pk": 13,
  "fields": {
    "md5": "4eed1361d0e454149f95fca85c84f33f",
    "sha1": "1f06eb4dd6d38b1a3e2a9b9e751744b303c37e0d",
    "sha256": "f8bd1ea3fb8afddabb10f8efd66796d41446cad51168ef4d3c44b19c973d0ad0",
    "sha512": "",
    "extra_data": {},
    "project": "cbd609b2-525a-4052-9860-201b879b20d9",
    "detected_license_expression": "",
    "detected_license_expression_spdx": "",
    "license_detections": [],
    "license_clues": [],
    "percentage_of_license_text": null,
    "copyrights": [],
    "holders": [],
    "authors": [],
    "emails": [],
    "urls": [],
    "path": "asgiref-3.3.0-py3-none-any.whl-extract/asgiref/wsgi.py",
    "rootfs_path": "",
    "status": "scanned",
    "size": 6575,
    "tag": "",
    "type": "file",
    "name": "wsgi.py",
    "extension": ".py",
    "programming_language": "Python",
    "mime_type": "text/x-script.python",
    "file_type": "Python script, ASCII text executable",
    "is_binary": false,
    "is_text": true,
    "is_archive": false,
    "is_key_file": false,
    "is_media": false,
    "compliance_alert": "",
    "package_data": []
  }
},
{
  "model": "scanpipe.codebaseresource",
  "pk": 14,
  "fields": {
    "md5": "38e56802a5adcafeae35efc6e3d218ba",
    "sha1": "5854ecf1ad649848d7cda8096d09ac258c888208",
    "sha256": "2c1983592aa38f0bfb0afacc73ddc5b46ce10e8e89ceaa9fed1e5fc6361b608d",
    "sha512": "",
    "extra_data": {},
    "project": "cbd609b2-525a-4052-9860-201b879b20d9",
    "detected_license_expression": "",
    "detected_license_expression_spdx": "",
    "license_detections": [],
    "license_clues": [],
    "percentage_of_license_text": null,
    "copyrights": [],
    "holders": [],
    "authors": [],
    "emails": [],
    "urls": [],
    "path": "asgiref-3.3.0-py3-none-any.whl-extract/asgiref-3.3.0.dist-info/RECORD",
    "rootfs_path": "",
    "status": "scanned",
    "size": 1073,
    "tag": "",
    "type": "file",
    "name": "RECORD",
    "extension": "",
    "programming_language": "",
    "mime_type": "text/csv",
    "file_type": "CSV text",
    "is_binary": false,
    "is_text": true,
    "is_archive": false,
    "is_key_file": false,
    "is_media": false,
    "compliance_alert": "",
    "package_data": []
  }
},
{
  "model": "scanpipe.codebaseresource",
  "pk": 15,
  "fields": {
    "md5": "f09eb47206614a4954c51db8a94840fa",
    "sha1": "baf11129ce63c4eef654f39a360b31cfc7d1ac67",
    "sha256": "b846415d1b514e9c1dff14a22deb906d794bc546ca6129f950a18cd091e2a669",
    "sha512": "",
    "extra_data": {},
    "project": "cbd609b2-525a-4052-9860-201b879b20d9",
    "detected_license_expression": "bsd-new",
    "detected_license_expression_spdx": "BSD-3-Clause",
    "license_detections": [
      {
        "policy": null,
        "matches": [
          {
            "score": 100.0,
            "matcher": "2-aho",
            "end_line": 27,
            "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-new_683.RULE",
            "start_line": 4,
            "matched_text": "Redistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n    1. Redistributions of source code must retain the above copyright notice,\n       this list of conditions and the following disclaimer.\n\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n\n    3. Neither the name of Django nor the names of its contributors may be used\n       to endorse or promote products derived from this software without\n       specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.",
            "match_coverage": 100.0,
            "matched_length": 214,
            "rule_relevance": 100,
            "rule_identifier": "bsd-new_683.RULE",
            "license_expression": "bsd-new"
          }
        ],
        "identifier": "bsd_new-72cae3bc-4423-3a9e-be84-ee8bb5120a4d",
        "license_expression": "bsd-new"
      }
    ],
    "license_clues": [],
    "percentage_of_license_text": 95.11,
    "copyrights": [
      {
        "end_line": 1,
        "copyright": "Copyright (c) Django Software Foundation and individual contributors",
        "start_line": 1
      }
    ],
    "holders": [
      {
        "holder": "Django Software Foundation and individual contributors",
        "end_line": 1,
        "start_line": 1
      }
    ],
    "authors": [],
    "emails": [],
    "urls": [],
    "path": "asgiref-3.3.0-py3-none-any.whl-extract/asgiref-3.3.0.dist-info/LICENSE",
    "rootfs_path": "",
    "status": "scanned",
    "size": 1552,
    "tag": "",
    "type": "file",
    "name": "LICENSE",
    "extension": "",
    "programming_language": "",
    "mime_type": "text/plain",
    "file_type": "ASCII text",
    "is_binary": false,
    "is_text": true,
    "is_archive": false,
    "is_key_file": false,
    "is_media": false,
    "compliance_alert": "missing",
    "package_data": []
  }
},
{
  "model": "scanpipe.codebaseresource",
  "pk": 16,
  "fields": {
    "md5": "5ccc7519eb42f1dfceee6e7d685f1ff5",
    "sha1": "ddd91bc89b15fc5c66e0fa259392955c74ba041f",
    "sha256": "11546323af45e6a5639bf620a9c4d73e74c0bf705f494af4595007b923f75e8a",
    "sha512": "",
    "extra_data": {},
    "project": "cbd609b2-525a-4052-9860-201b879b20d9",
    "detected_license_expression": "",
    "detected_license_expression_spdx": "",
    "license_detections": [],
    "license_clues": [],
    "percentage_of_license_text": null,
    "copyrights": [],
    "holders": [],
    "authors": [],
    "emails": [],
    "urls": [],
    "path": "asgiref-3.3.0-py3-none-any.whl-extract/asgiref-3.3.0.dist-info/WHEEL",
    "rootfs_path": "",
    "status": "scanned",
    "size": 92,
    "tag": "",
    "type": "file",
    "name": "WHEEL",
    "extension": "",
    "programming_language": "",
    "mime_type": "text/plain",
    "file_type": "ASCII text",
    "is_binary": false,
    "is_text": true,
    "is_archive": false,
    "is_key_file": false,
    "is_media": false,
    "compliance_alert": "",
    "package_data": []
  }
},
{
  "model": "scanpipe.codebaseresource",
  "pk": 17,
  "fields": {
    "md5": "680e61db4d95c8d9501b7a49fa2bf0b2",
    "sha1": "612390bd0d0227c009f9c99b479878adf7ac2f23",
    "sha256": "6e89108c2cf0c0446174188f76f60465ae1c1f14f83427807df40d52a27cb2c8",
    "sha512": "",
    "extra_data": {},
    "project": "cbd609b2-525a-4052-9860-201b879b20d9",
    "detected_license_expression": "",
    "detected_license_expression_spdx": "",
    "license_detections": [],
    "license_clues": [],
    "percentage_of_license_text": null,
    "copyrights": [],
    "holders": [],
    "authors": [],
    "emails": [],
    "urls": [],
    "path": "asgiref-3.3.0-py3-none-any.whl-extract/asgiref-3.3.0.dist-info/top_level.txt",
    "rootfs_path": "",
    "status": "scanned",
    "size": 8,
    "tag": "",
    "type": "file",
    "name": "top_level.txt",
    "extension": ".txt",
    "programming_language": "",
    "mime_type": "text/plain",
    "file_type": "ASCII text",
    "is_binary": false,
    "is_text": true,
    "is_archive": false,
    "is_key_file": false,
    "is_media": false,
    "compliance_alert": "",
    "package_data": []
  }
},
{
  "model": "scanpipe.codebaseresource",
  "pk": 18,
  "fields": {
    "md5": "4b50d67ff7994afcad22c6ef154cf052",
    "sha1": "53d0f6e1cbf6a3c31fb0aa3089b2ca98ad95fc49",
    "sha256": "70f98f4eb9f6068b192b5464fcdf69e29a8ff09962bfce84bbb052baeee44f33",
    "sha512": "",
    "extra_data": {},
    "project": "cbd609b2-525a-4052-9860-201b879b20d9",
    "detected_license_expression": "",
    "detected_license_expression_spdx": "",
    "license_detections": [],
    "license_clues": [],
    "percentage_of_license_text": null,
    "copyrights": [],
    "holders": [],
    "authors": [],
    "emails": [],
    "urls": [],
    "path": "asgiref-3.3.0-py3-none-any.whl-extract/asgiref-3.3.0.dist-info/METADATA",
    "rootfs_path": "",
    "status": "application-package",
    "size": 8800,
    "tag": "",
    "type": "file",
    "name": "METADATA",
    "extension": "",
    "programming_language": "",
    "mime_type": "text/plain",
    "file_type": "ASCII text",
    "is_binary": false,
    "is_text": true,
    "is_archive": false,
    "is_key_file": false,
    "is_media": false,
    "compliance_alert": "",
    "package_data": [
      {
        "md5": null,
        "name": "asgiref",
        "purl": "pkg:pypi/asgiref@3.3.0",
        "sha1": null,
        "size": null,
        "type": "pypi",
        "holder": null,
        "sha256": null,
        "sha512": null,
        "parties": [
          {
            "url": null,
            "name": "Django Software Foundation",
            "role": "author",
            "type": "person",
            "email": "foundation@djangoproject.com"
          }
        ],
        "subpath": null,
        "vcs_url": null,
        "version": "3.3.0",
        "keywords": [
          "Development Status :: 5 - Production/Stable",
          "Environment :: Web Environment",
          "Intended Audience :: Developers",
          "Operating System :: OS Independent",
          "Programming Language :: Python",
          "Programming Language :: Python :: 3",
          "Programming Language :: Python :: 3 :: Only",
          "Programming Language :: Python :: 3.5",
          "Programming Language :: Python :: 3.6",
          "Programming Language :: Python :: 3.7",
          "Programming Language :: Python :: 3.8",
          "Topic :: Internet :: WWW/HTTP"
        ],
        "copyright": null,
        "namespace": null,
        "extra_data": {
          "Changelog": "https://github.com/django/asgiref/blob/master/CHANGELOG.txt",
          "Documentation": "https://asgi.readthedocs.io/",
          "Further Documentation": "https://docs.djangoproject.com/en/stable/topics/async/#async-adapter-functions"
        },
        "qualifiers": {},
        "description": "ASGI specs, helper code, and adapters\nasgiref\n=======\n\n.. image:: https://api.travis-ci.org/django/asgiref.svg\n    :target: https://travis-ci.org/django/asgiref\n\n.. image:: https://img.shields.io/pypi/v/asgiref.svg\n    :target: https://pypi.python.org/pypi/asgiref\n\nASGI is a standard for Python asynchronous web apps and servers to communicate\nwith each other, and positioned as an asynchronous successor to WSGI. You can\nread more at https://asgi.readthedocs.io/en/latest/\n\nThis package includes ASGI base libraries, such as:\n\n* Sync-to-async and async-to-sync function wrappers, ``asgiref.sync``\n* Server base classes, ``asgiref.server``\n* A WSGI-to-ASGI adapter, in ``asgiref.wsgi``\n\n\nFunction wrappers\n-----------------\n\nThese allow you to wrap or decorate async or sync functions to call them from\nthe other style (so you can call async functions from a synchronous thread,\nor vice-versa).\n\nIn particular:\n\n* AsyncToSync lets a synchronous subthread stop and wait while the async\n  function is called on the main thread's event loop, and then control is\n  returned to the thread when the async function is finished.\n\n* SyncToAsync lets async code call a synchronous function, which is run in\n  a threadpool and control returned to the async coroutine when the synchronous\n  function completes.\n\nThe idea is to make it easier to call synchronous APIs from async code and\nasynchronous APIs from synchronous code so it's easier to transition code from\none style to the other. In the case of Channels, we wrap the (synchronous)\nDjango view system with SyncToAsync to allow it to run inside the (asynchronous)\nASGI server.\n\nNote that exactly what threads things run in is very specific, and aimed to\nkeep maximum compatibility with old synchronous code. See\n\"Synchronous code & Threads\" below for a full explanation. By default,\n``sync_to_async`` will run all synchronous code in the program in the same\nthread for safety reasons; you can disable this for more performance with\n``@sync_to_async(thread_sensitive=False)``, but make sure that your code does\nnot rely on anything bound to threads (like database connections) when you do.\n\n\nThreadlocal replacement\n-----------------------\n\nThis is a drop-in replacement for ``threading.local`` that works with both\nthreads and asyncio Tasks. Even better, it will proxy values through from a\ntask-local context to a thread-local context when you use ``sync_to_async``\nto run things in a threadpool, and vice-versa for ``async_to_sync``.\n\nIf you instead want true thread- and task-safety, you can set\n``thread_critical`` on the Local object to ensure this instead.\n\n\nServer base classes\n-------------------\n\nIncludes a ``StatelessServer`` class which provides all the hard work of\nwriting a stateless server (as in, does not handle direct incoming sockets\nbut instead consumes external streams or sockets to work out what is happening).\n\nAn example of such a server would be a chatbot server that connects out to\na central chat server and provides a \"connection scope\" per user chatting to\nit. There's only one actual connection, but the server has to separate things\ninto several scopes for easier writing of the code.\n\nYou can see an example of this being used in `frequensgi <https://github.com/andrewgodwin/frequensgi>`_.\n\n\nWSGI-to-ASGI adapter\n--------------------\n\nAllows you to wrap a WSGI application so it appears as a valid ASGI application.\n\nSimply wrap it around your WSGI application like so::\n\n    asgi_application = WsgiToAsgi(wsgi_application)\n\nThe WSGI application will be run in a synchronous threadpool, and the wrapped\nASGI application will be one that accepts ``http`` class messages.\n\nPlease note that not all extended features of WSGI may be supported (such as\nfile handles for incoming POST bodies).\n\n\nDependencies\n------------\n\n``asgiref`` requires Python 3.5 or higher.\n\n\nContributing\n------------\n\nPlease refer to the\n`main Channels contributing docs <https://github.com/django/channels/blob/master/CONTRIBUTING.rst>`_.\n\n\nTesting\n'''''''\n\nTo run tests, make sure you have installed the ``tests`` extra with the package::\n\n    cd asgiref/\n    pip install -e .[tests]\n    pytest\n\n\nBuilding the documentation\n''''''''''''''''''''''''''\n\nThe documentation uses `Sphinx <http://www.sphinx-doc.org>`_::\n\n    cd asgiref/docs/\n    pip install sphinx\n\nTo build the docs, you can use the default tools::\n\n    sphinx-build -b html . _build/html  # or `make html`, if you've got make set up\n    cd _build/html\n    python -m http.server\n\n...or you can use ``sphinx-autobuild`` to run a server and rebuild/reload\nyour documentation changes automatically::\n\n    pip install sphinx-autobuild\n    sphinx-autobuild . _build/html\n\n\nImplementation Details\n----------------------\n\nSynchronous code & threads\n''''''''''''''''''''''''''\n\nThe ``asgiref.sync`` module provides two wrappers that let you go between\nasynchronous and synchronous code at will, while taking care of the rough edges\nfor you.\n\nUnfortunately, the rough edges are numerous, and the code has to work especially\nhard to keep things in the same thread as much as possible. Notably, the\nrestrictions we are working with are:\n\n* All synchronous code called through ``SyncToAsync`` and marked with\n  ``thread_sensitive`` should run in the same thread as each other (and if the\n  outer layer of the program is synchronous, the main thread)\n\n* If a thread already has a running async loop, ``AsyncToSync`` can't run things\n  on that loop if it's blocked on synchronous code that is above you in the\n  call stack.\n\nThe first compromise you get to might be that ``thread_sensitive`` code should\njust run in the same thread and not spawn in a sub-thread, fulfilling the first\nrestriction, but that immediately runs you into the second restriction.\n\nThe only real solution is to essentially have a variant of ThreadPoolExecutor\nthat executes any ``thread_sensitive`` code on the outermost synchronous\nthread - either the main thread, or a single spawned subthread.\n\nThis means you now have two basic states:\n\n* If the outermost layer of your program is synchronous, then all async code\n  run through ``AsyncToSync`` will run in a per-call event loop in arbitary\n  sub-threads, while all ``thread_sensitive`` code will run in the main thread.\n\n* If the outermost layer of your program is asynchronous, then all async code\n  runs on the main thread's event loop, and all ``thread_sensitive`` synchronous\n  code will run in a single shared sub-thread.\n\nCruicially, this means that in both cases there is a thread which is a shared\nresource that all ``thread_sensitive`` code must run on, and there is a chance\nthat this thread is currently blocked on its own ``AsyncToSync`` call. Thus,\n``AsyncToSync`` needs to act as an executor for thread code while it's blocking.\n\nThe ``CurrentThreadExecutor`` class provides this functionality; rather than\nsimply waiting on a Future, you can call its ``run_until_future`` method and\nit will run submitted code until that Future is done. This means that code\ninside the call can then run code on your thread.\n\n\nMaintenance and Security\n------------------------\n\nTo report security issues, please contact security@djangoproject.com. For GPG\nsignatures and more security process information, see\nhttps://docs.djangoproject.com/en/dev/internals/security/.\n\nTo report bugs or request new features, please open a new GitHub issue.\n\nThis repository is part of the Channels project. For the shepherd and maintenance team, please see the\n`main Channels readme <https://github.com/django/channels/blob/master/README.rst>`_.",
        "notice_text": null,
        "api_data_url": "https://pypi.org/pypi/asgiref/3.3.0/json",
        "dependencies": [
          {
            "purl": "pkg:pypi/pytest",
            "scope": "tests",
            "extra_data": {},
            "is_runtime": true,
            "is_optional": true,
            "is_resolved": false,
            "resolved_package": {},
            "extracted_requirement": "pytest; extra == \"tests\""
          },
          {
            "purl": "pkg:pypi/pytest-asyncio",
            "scope": "tests",
            "extra_data": {},
            "is_runtime": true,
            "is_optional": true,
            "is_resolved": false,
            "resolved_package": {},
            "extracted_requirement": "pytest-asyncio; extra == \"tests\""
          }
        ],
        "download_url": null,
        "homepage_url": "https://github.com/django/asgiref/",
        "release_date": null,
        "code_view_url": null,
        "datasource_id": "pypi_wheel_metadata",
        "file_references": [
          {
            "md5": null,
            "path": "asgiref/__init__.py",
            "sha1": null,
            "size": 22,
            "sha256": "30f49b9094bff904a42caeec32515715fe625a56dc48bd7c0e3d9988c0ad4bd7",
            "sha512": null,
            "extra_data": {}
          },
          {
            "md5": null,
            "path": "asgiref/compatibility.py",
            "sha1": null,
            "size": 1598,
            "sha256": "3151f66c476208c3154cb6c4fb557a2a253bab82f0ab33fb3c8b9f7976be9e33",
            "sha512": null,
            "extra_data": {}
          },
          {
            "md5": null,
            "path": "asgiref/current_thread_executor.py",
            "sha1": null,
            "size": 2974,
            "sha256": "ddd445b778c097fc75c2bf69ad964cbadd3bd6999d1dd2306d39d401855e8e3e",
            "sha512": null,
            "extra_data": {}
          },
          {
            "md5": null,
            "path": "asgiref/local.py",
            "sha1": null,
            "size": 4849,
            "sha256": "ee0fcf4a8e6fa9df8a4643bb48e82892d496afce44b6c8b8aea2721755545e1c",
            "sha512": null,
            "extra_data": {}
          },
          {
            "md5": null,
            "path": "asgiref/server.py",
            "sha1": null,
            "size": 5915,
            "sha256": "885267fee0fea687875a02ceb929ca095312d47aaa57e20e4ce382f397caaf4d",
            "sha512": null,
            "extra_data": {}
          },
          {
            "md5": null,
            "path": "asgiref/sync.py",
            "sha1": null,
            "size": 14081,
            "sha256": "fa4651a3b79201a4dc44a4096cd49ec8f427e912ea0ee05c666357b413a8afe7",
            "sha512": null,
            "extra_data": {}
          },
          {
            "md5": null,
            "path": "asgiref/testing.py",
            "sha1": null,
            "size": 3119,
            "sha256": "ddbc8d455eceb68fc583c67e7c4ad0277c867fb39095c51ec5b37f70342e8334",
            "sha512": null,
            "extra_data": {}
          },
          {
            "md5": null,
            "path": "asgiref/timeout.py",
            "sha1": null,
            "size": 3914,
            "sha256": "126c3e3a8a75a517d2739612304607804cf5f34da63fa25d03a6f11f7edb6f2f",
            "sha512": null,
            "extra_data": {}
          },
          {
            "md5": null,
            "path": "asgiref/wsgi.py",
            "sha1": null,
            "size": 6575,
            "sha256": "f8bd1ea3fb8afddabb10f8efd66796d41446cad51168ef4d3c44b19c973d0ad0",
            "sha512": null,
            "extra_data": {}
          },
          {
            "md5": null,
            "path": "asgiref-3.3.0.dist-info/LICENSE",
            "sha1": null,
            "size": 1552,
            "sha256": "b846415d1b514e9c1dff14a22deb906d794bc546ca6129f950a18cd091e2a669",
            "sha512": null,
            "extra_data": {}
          },
          {
            "md5": null,
            "path": "asgiref-3.3.0.dist-info/METADATA",
            "sha1": null,
            "size": 8800,
            "sha256": "70f98f4eb9f6068b192b5464fcdf69e29a8ff09962bfce84bbb052baeee44f33",
            "sha512": null,
            "extra_data": {}
          },
          {
            "md5": null,
            "path": "asgiref-3.3.0.dist-info/WHEEL",
            "sha1": null,
            "size": 92,
            "sha256": "11546323af45e6a5639bf620a9c4d73e74c0bf705f494af4595007b923f75e8a",
            "sha512": null,
            "extra_data": {}
          },
          {
            "md5": null,
            "path": "asgiref-3.3.0.dist-info/top_level.txt",
            "sha1": null,
            "size": 8,
            "sha256": "6e89108c2cf0c0446174188f76f60465ae1c1f14f83427807df40d52a27cb2c8",
            "sha512": null,
            "extra_data": {}
          },
          {
            "md5": null,
            "path": "asgiref-3.3.0.dist-info/RECORD",
            "sha1": null,
            "size": null,
            "sha256": null,
            "sha512": null,
            "extra_data": {}
          }
        ],
        "source_packages": [],
        "bug_tracking_url": null,
        "primary_language": "Python",
        "license_detections": [
          {
            "matches": [
              {
                "score": 99.0,
                "matcher": "1-hash",
                "end_line": 1,
                "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-new_89.RULE",
                "start_line": 1,
                "matched_text": "license BSD",
                "match_coverage": 100.0,
                "matched_length": 2,
                "rule_relevance": 99,
                "rule_identifier": "bsd-new_89.RULE",
                "license_expression": "bsd-new"
              }
            ],
            "identifier": "bsd_new-261898a0-0118-87c4-7092-14e4ff134882",
            "license_expression": "bsd-new"
          },
          {
            "matches": [
              {
                "score": 99.0,
                "matcher": "1-hash",
                "end_line": 1,
                "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pypi_bsd_license.RULE",
                "start_line": 1,
                "matched_text": "['License :: OSI Approved :: BSD License']",
                "match_coverage": 100.0,
                "matched_length": 5,
                "rule_relevance": 99,
                "rule_identifier": "pypi_bsd_license.RULE",
                "license_expression": "bsd-new"
              }
            ],
            "identifier": "bsd_new-f4e99f86-00ab-18d9-a65d-a3a12767dcf5",
            "license_expression": "bsd-new"
          }
        ],
        "repository_download_url": "https://pypi.org/packages/source/a/asgiref/asgiref-3.3.0.tar.gz",
        "repository_homepage_url": "https://pypi.org/project/asgiref",
        "other_license_detections": [],
        "other_license_expression": null,
        "declared_license_expression": "bsd-new",
        "extracted_license_statement": "{'license': 'BSD', 'classifiers': ['License :: OSI Approved :: BSD License']}",
        "other_license_expression_spdx": null,
        "declared_license_expression_spdx": "BSD-3-Clause"
      }
    ]
  }
},
{
  "model": "scanpipe.discoveredpackage",
  "pk": 1,
  "fields": {
    "type": "pypi",
    "namespace": "",
    "name": "asgiref",
    "version": "3.3.0",
    "qualifiers": "",
    "subpath": "",
    "md5": "",
    "sha1": "",
    "sha256": "",
    "sha512": "",
    "extra_data": {
      "Changelog": "https://github.com/django/asgiref/blob/master/CHANGELOG.txt",
      "Documentation": "https://asgi.readthedocs.io/",
      "Further Documentation": "https://docs.djangoproject.com/en/stable/topics/async/#async-adapter-functions"
    },
    "project": "cbd609b2-525a-4052-9860-201b879b20d9",
    "filename": "",
    "primary_language": "Python",
    "description": "ASGI specs, helper code, and adapters\nasgiref\n=======\n\n.. image:: https://api.travis-ci.org/django/asgiref.svg\n    :target: https://travis-ci.org/django/asgiref\n\n.. image:: https://img.shields.io/pypi/v/asgiref.svg\n    :target: https://pypi.python.org/pypi/asgiref\n\nASGI is a standard for Python asynchronous web apps and servers to communicate\nwith each other, and positioned as an asynchronous successor to WSGI. You can\nread more at https://asgi.readthedocs.io/en/latest/\n\nThis package includes ASGI base libraries, such as:\n\n* Sync-to-async and async-to-sync function wrappers, ``asgiref.sync``\n* Server base classes, ``asgiref.server``\n* A WSGI-to-ASGI adapter, in ``asgiref.wsgi``\n\n\nFunction wrappers\n-----------------\n\nThese allow you to wrap or decorate async or sync functions to call them from\nthe other style (so you can call async functions from a synchronous thread,\nor vice-versa).\n\nIn particular:\n\n* AsyncToSync lets a synchronous subthread stop and wait while the async\n  function is called on the main thread's event loop, and then control is\n  returned to the thread when the async function is finished.\n\n* SyncToAsync lets async code call a synchronous function, which is run in\n  a threadpool and control returned to the async coroutine when the synchronous\n  function completes.\n\nThe idea is to make it easier to call synchronous APIs from async code and\nasynchronous APIs from synchronous code so it's easier to transition code from\none style to the other. In the case of Channels, we wrap the (synchronous)\nDjango view system with SyncToAsync to allow it to run inside the (asynchronous)\nASGI server.\n\nNote that exactly what threads things run in is very specific, and aimed to\nkeep maximum compatibility with old synchronous code. See\n\"Synchronous code & Threads\" below for a full explanation. By default,\n``sync_to_async`` will run all synchronous code in the program in the same\nthread for safety reasons; you can disable this for more performance with\n``@sync_to_async(thread_sensitive=False)``, but make sure that your code does\nnot rely on anything bound to threads (like database connections) when you do.\n\n\nThreadlocal replacement\n-----------------------\n\nThis is a drop-in replacement for ``threading.local`` that works with both\nthreads and asyncio Tasks. Even better, it will proxy values through from a\ntask-local context to a thread-local context when you use ``sync_to_async``\nto run things in a threadpool, and vice-versa for ``async_to_sync``.\n\nIf you instead want true thread- and task-safety, you can set\n``thread_critical`` on the Local object to ensure this instead.\n\n\nServer base classes\n-------------------\n\nIncludes a ``StatelessServer`` class which provides all the hard work of\nwriting a stateless server (as in, does not handle direct incoming sockets\nbut instead consumes external streams or sockets to work out what is happening).\n\nAn example of such a server would be a chatbot server that connects out to\na central chat server and provides a \"connection scope\" per user chatting to\nit. There's only one actual connection, but the server has to separate things\ninto several scopes for easier writing of the code.\n\nYou can see an example of this being used in `frequensgi <https://github.com/andrewgodwin/frequensgi>`_.\n\n\nWSGI-to-ASGI adapter\n--------------------\n\nAllows you to wrap a WSGI application so it appears as a valid ASGI application.\n\nSimply wrap it around your WSGI application like so::\n\n    asgi_application = WsgiToAsgi(wsgi_application)\n\nThe WSGI application will be run in a synchronous threadpool, and the wrapped\nASGI application will be one that accepts ``http`` class messages.\n\nPlease note that not all extended features of WSGI may be supported (such as\nfile handles for incoming POST bodies).\n\n\nDependencies\n------------\n\n``asgiref`` requires Python 3.5 or higher.\n\n\nContributing\n------------\n\nPlease refer to the\n`main Channels contributing docs <https://github.com/django/channels/blob/master/CONTRIBUTING.rst>`_.\n\n\nTesting\n'''''''\n\nTo run tests, make sure you have installed the ``tests`` extra with the package::\n\n    cd asgiref/\n    pip install -e .[tests]\n    pytest\n\n\nBuilding the documentation\n''''''''''''''''''''''''''\n\nThe documentation uses `Sphinx <http://www.sphinx-doc.org>`_::\n\n    cd asgiref/docs/\n    pip install sphinx\n\nTo build the docs, you can use the default tools::\n\n    sphinx-build -b html . _build/html  # or `make html`, if you've got make set up\n    cd _build/html\n    python -m http.server\n\n...or you can use ``sphinx-autobuild`` to run a server and rebuild/reload\nyour documentation changes automatically::\n\n    pip install sphinx-autobuild\n    sphinx-autobuild . _build/html\n\n\nImplementation Details\n----------------------\n\nSynchronous code & threads\n''''''''''''''''''''''''''\n\nThe ``asgiref.sync`` module provides two wrappers that let you go between\nasynchronous and synchronous code at will, while taking care of the rough edges\nfor you.\n\nUnfortunately, the rough edges are numerous, and the code has to work especially\nhard to keep things in the same thread as much as possible. Notably, the\nrestrictions we are working with are:\n\n* All synchronous code called through ``SyncToAsync`` and marked with\n  ``thread_sensitive`` should run in the same thread as each other (and if the\n  outer layer of the program is synchronous, the main thread)\n\n* If a thread already has a running async loop, ``AsyncToSync`` can't run things\n  on that loop if it's blocked on synchronous code that is above you in the\n  call stack.\n\nThe first compromise you get to might be that ``thread_sensitive`` code should\njust run in the same thread and not spawn in a sub-thread, fulfilling the first\nrestriction, but that immediately runs you into the second restriction.\n\nThe only real solution is to essentially have a variant of ThreadPoolExecutor\nthat executes any ``thread_sensitive`` code on the outermost synchronous\nthread - either the main thread, or a single spawned subthread.\n\nThis means you now have two basic states:\n\n* If the outermost layer of your program is synchronous, then all async code\n  run through ``AsyncToSync`` will run in a per-call event loop in arbitary\n  sub-threads, while all ``thread_sensitive`` code will run in the main thread.\n\n* If the outermost layer of your program is asynchronous, then all async code\n  runs on the main thread's event loop, and all ``thread_sensitive`` synchronous\n  code will run in a single shared sub-thread.\n\nCruicially, this means that in both cases there is a thread which is a shared\nresource that all ``thread_sensitive`` code must run on, and there is a chance\nthat this thread is currently blocked on its own ``AsyncToSync`` call. Thus,\n``AsyncToSync`` needs to act as an executor for thread code while it's blocking.\n\nThe ``CurrentThreadExecutor`` class provides this functionality; rather than\nsimply waiting on a Future, you can call its ``run_until_future`` method and\nit will run submitted code until that Future is done. This means that code\ninside the call can then run code on your thread.\n\n\nMaintenance and Security\n------------------------\n\nTo report security issues, please contact security@djangoproject.com. For GPG\nsignatures and more security process information, see\nhttps://docs.djangoproject.com/en/dev/internals/security/.\n\nTo report bugs or request new features, please open a new GitHub issue.\n\nThis repository is part of the Channels project. For the shepherd and maintenance team, please see the\n`main Channels readme <https://github.com/django/channels/blob/master/README.rst>`_.",
    "release_date": null,
    "homepage_url": "https://github.com/django/asgiref/",
    "download_url": "",
    "size": null,
    "bug_tracking_url": "",
    "code_view_url": "",
    "vcs_url": "",
    "repository_homepage_url": "https://pypi.org/project/asgiref",
    "repository_download_url": "https://pypi.org/packages/source/a/asgiref/asgiref-3.3.0.tar.gz",
    "api_data_url": "https://pypi.org/pypi/asgiref/3.3.0/json",
    "copyright": "",
    "holder": "",
    "declared_license_expression": "bsd-new",
    "declared_license_expression_spdx": "BSD-3-Clause",
    "license_detections": [
      {
        "matches": [
          {
            "score": 99.0,
            "matcher": "1-hash",
            "end_line": 1,
            "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-new_89.RULE",
            "start_line": 1,
            "matched_text": "license BSD",
            "match_coverage": 100.0,
            "matched_length": 2,
            "rule_relevance": 99,
            "rule_identifier": "bsd-new_89.RULE",
            "license_expression": "bsd-new"
          }
        ],
        "identifier": "bsd_new-261898a0-0118-87c4-7092-14e4ff134882",
        "license_expression": "bsd-new"
      },
      {
        "matches": [
          {
            "score": 99.0,
            "matcher": "1-hash",
            "end_line": 1,
            "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pypi_bsd_license.RULE",
            "start_line": 1,
            "matched_text": "['License :: OSI Approved :: BSD License']",
            "match_coverage": 100.0,
            "matched_length": 5,
            "rule_relevance": 99,
            "rule_identifier": "pypi_bsd_license.RULE",
            "license_expression": "bsd-new"
          }
        ],
        "identifier": "bsd_new-f4e99f86-00ab-18d9-a65d-a3a12767dcf5",
        "license_expression": "bsd-new"
      }
    ],
    "other_license_expression": "",
    "other_license_expression_spdx": "",
    "other_license_detections": [],
    "extracted_license_statement": "{'license': 'BSD', 'classifiers': ['License :: OSI Approved :: BSD License']}",
    "notice_text": "NOTICE_TEXT",
    "datasource_id": "",
    "file_references": [],
    "parties": [
      {
        "url": null,
        "name": "Django Software Foundation",
        "role": "author",
        "type": "person",
        "email": "foundation@djangoproject.com"
      }
    ],
    "uuid": "8fa7433f-c05e-45b3-960d-60a5423327f7",
    "missing_resources": [],
    "modified_resources": [],
    "package_uid": "pkg:pypi/asgiref@3.3.0?uuid=e60b7109-14eb-47af-9568-09b4b630dca5",
    "keywords": [
      "Development Status :: 5 - Production/Stable",
      "Environment :: Web Environment",
      "Intended Audience :: Developers",
      "Operating System :: OS Independent",
      "Programming Language :: Python",
      "Programming Language :: Python :: 3",
      "Programming Language :: Python :: 3 :: Only",
      "Programming Language :: Python :: 3.5",
      "Programming Language :: Python :: 3.6",
      "Programming Language :: Python :: 3.7",
      "Programming Language :: Python :: 3.8",
      "Topic :: Internet :: WWW/HTTP"
    ],
    "source_packages": [],
    "codebase_resources": [
      1
    ]
  }
},
{
  "model": "scanpipe.discoveredpackage",
  "pk": 2,
  "fields": {
    "type": "pypi",
    "namespace": "",
    "name": "asgiref",
    "version": "3.3.0",
    "qualifiers": "",
    "subpath": "",
    "md5": "",
    "sha1": "",
    "sha256": "",
    "sha512": "",
    "extra_data": {
      "Changelog": "https://github.com/django/asgiref/blob/master/CHANGELOG.txt",
      "Documentation": "https://asgi.readthedocs.io/",
      "Further Documentation": "https://docs.djangoproject.com/en/stable/topics/async/#async-adapter-functions"
    },
    "project": "cbd609b2-525a-4052-9860-201b879b20d9",
    "filename": "",
    "primary_language": "Python",
    "description": "ASGI specs, helper code, and adapters\nasgiref\n=======\n\n.. image:: https://api.travis-ci.org/django/asgiref.svg\n    :target: https://travis-ci.org/django/asgiref\n\n.. image:: https://img.shields.io/pypi/v/asgiref.svg\n    :target: https://pypi.python.org/pypi/asgiref\n\nASGI is a standard for Python asynchronous web apps and servers to communicate\nwith each other, and positioned as an asynchronous successor to WSGI. You can\nread more at https://asgi.readthedocs.io/en/latest/\n\nThis package includes ASGI base libraries, such as:\n\n* Sync-to-async and async-to-sync function wrappers, ``asgiref.sync``\n* Server base classes, ``asgiref.server``\n* A WSGI-to-ASGI adapter, in ``asgiref.wsgi``\n\n\nFunction wrappers\n-----------------\n\nThese allow you to wrap or decorate async or sync functions to call them from\nthe other style (so you can call async functions from a synchronous thread,\nor vice-versa).\n\nIn particular:\n\n* AsyncToSync lets a synchronous subthread stop and wait while the async\n  function is called on the main thread's event loop, and then control is\n  returned to the thread when the async function is finished.\n\n* SyncToAsync lets async code call a synchronous function, which is run in\n  a threadpool and control returned to the async coroutine when the synchronous\n  function completes.\n\nThe idea is to make it easier to call synchronous APIs from async code and\nasynchronous APIs from synchronous code so it's easier to transition code from\none style to the other. In the case of Channels, we wrap the (synchronous)\nDjango view system with SyncToAsync to allow it to run inside the (asynchronous)\nASGI server.\n\nNote that exactly what threads things run in is very specific, and aimed to\nkeep maximum compatibility with old synchronous code. See\n\"Synchronous code & Threads\" below for a full explanation. By default,\n``sync_to_async`` will run all synchronous code in the program in the same\nthread for safety reasons; you can disable this for more performance with\n``@sync_to_async(thread_sensitive=False)``, but make sure that your code does\nnot rely on anything bound to threads (like database connections) when you do.\n\n\nThreadlocal replacement\n-----------------------\n\nThis is a drop-in replacement for ``threading.local`` that works with both\nthreads and asyncio Tasks. Even better, it will proxy values through from a\ntask-local context to a thread-local context when you use ``sync_to_async``\nto run things in a threadpool, and vice-versa for ``async_to_sync``.\n\nIf you instead want true thread- and task-safety, you can set\n``thread_critical`` on the Local object to ensure this instead.\n\n\nServer base classes\n-------------------\n\nIncludes a ``StatelessServer`` class which provides all the hard work of\nwriting a stateless server (as in, does not handle direct incoming sockets\nbut instead consumes external streams or sockets to work out what is happening).\n\nAn example of such a server would be a chatbot server that connects out to\na central chat server and provides a \"connection scope\" per user chatting to\nit. There's only one actual connection, but the server has to separate things\ninto several scopes for easier writing of the code.\n\nYou can see an example of this being used in `frequensgi <https://github.com/andrewgodwin/frequensgi>`_.\n\n\nWSGI-to-ASGI adapter\n--------------------\n\nAllows you to wrap a WSGI application so it appears as a valid ASGI application.\n\nSimply wrap it around your WSGI application like so::\n\n    asgi_application = WsgiToAsgi(wsgi_application)\n\nThe WSGI application will be run in a synchronous threadpool, and the wrapped\nASGI application will be one that accepts ``http`` class messages.\n\nPlease note that not all extended features of WSGI may be supported (such as\nfile handles for incoming POST bodies).\n\n\nDependencies\n------------\n\n``asgiref`` requires Python 3.5 or higher.\n\n\nContributing\n------------\n\nPlease refer to the\n`main Channels contributing docs <https://github.com/django/channels/blob/master/CONTRIBUTING.rst>`_.\n\n\nTesting\n'''''''\n\nTo run tests, make sure you have installed the ``tests`` extra with the package::\n\n    cd asgiref/\n    pip install -e .[tests]\n    pytest\n\n\nBuilding the documentation\n''''''''''''''''''''''''''\n\nThe documentation uses `Sphinx <http://www.sphinx-doc.org>`_::\n\n    cd asgiref/docs/\n    pip install sphinx\n\nTo build the docs, you can use the default tools::\n\n    sphinx-build -b html . _build/html  # or `make html`, if you've got make set up\n    cd _build/html\n    python -m http.server\n\n...or you can use ``sphinx-autobuild`` to run a server and rebuild/reload\nyour documentation changes automatically::\n\n    pip install sphinx-autobuild\n    sphinx-autobuild . _build/html\n\n\nImplementation Details\n----------------------\n\nSynchronous code & threads\n''''''''''''''''''''''''''\n\nThe ``asgiref.sync`` module provides two wrappers that let you go between\nasynchronous and synchronous code at will, while taking care of the rough edges\nfor you.\n\nUnfortunately, the rough edges are numerous, and the code has to work especially\nhard to keep things in the same thread as much as possible. Notably, the\nrestrictions we are working with are:\n\n* All synchronous code called through ``SyncToAsync`` and marked with\n  ``thread_sensitive`` should run in the same thread as each other (and if the\n  outer layer of the program is synchronous, the main thread)\n\n* If a thread already has a running async loop, ``AsyncToSync`` can't run things\n  on that loop if it's blocked on synchronous code that is above you in the\n  call stack.\n\nThe first compromise you get to might be that ``thread_sensitive`` code should\njust run in the same thread and not spawn in a sub-thread, fulfilling the first\nrestriction, but that immediately runs you into the second restriction.\n\nThe only real solution is to essentially have a variant of ThreadPoolExecutor\nthat executes any ``thread_sensitive`` code on the outermost synchronous\nthread - either the main thread, or a single spawned subthread.\n\nThis means you now have two basic states:\n\n* If the outermost layer of your program is synchronous, then all async code\n  run through ``AsyncToSync`` will run in a per-call event loop in arbitary\n  sub-threads, while all ``thread_sensitive`` code will run in the main thread.\n\n* If the outermost layer of your program is asynchronous, then all async code\n  runs on the main thread's event loop, and all ``thread_sensitive`` synchronous\n  code will run in a single shared sub-thread.\n\nCruicially, this means that in both cases there is a thread which is a shared\nresource that all ``thread_sensitive`` code must run on, and there is a chance\nthat this thread is currently blocked on its own ``AsyncToSync`` call. Thus,\n``AsyncToSync`` needs to act as an executor for thread code while it's blocking.\n\nThe ``CurrentThreadExecutor`` class provides this functionality; rather than\nsimply waiting on a Future, you can call its ``run_until_future`` method and\nit will run submitted code until that Future is done. This means that code\ninside the call can then run code on your thread.\n\n\nMaintenance and Security\n------------------------\n\nTo report security issues, please contact security@djangoproject.com. For GPG\nsignatures and more security process information, see\nhttps://docs.djangoproject.com/en/dev/internals/security/.\n\nTo report bugs or request new features, please open a new GitHub issue.\n\nThis repository is part of the Channels project. For the shepherd and maintenance team, please see the\n`main Channels readme <https://github.com/django/channels/blob/master/README.rst>`_.",
    "release_date": null,
    "homepage_url": "https://github.com/django/asgiref/",
    "download_url": "",
    "size": null,
    "bug_tracking_url": "",
    "code_view_url": "",
    "vcs_url": "",
    "repository_homepage_url": "https://pypi.org/project/asgiref",
    "repository_download_url": "https://pypi.org/packages/source/a/asgiref/asgiref-3.3.0.tar.gz",
    "api_data_url": "https://pypi.org/pypi/asgiref/3.3.0/json",
    "copyright": "",
    "holder": "",
    "declared_license_expression": "bsd-new",
    "declared_license_expression_spdx": "BSD-3-Clause",
    "license_detections": [
      {
        "matches": [
          {
            "score": 99.0,
            "matcher": "1-hash",
            "end_line": 1,
            "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-new_89.RULE",
            "start_line": 1,
            "matched_text": "license BSD",
            "match_coverage": 100.0,
            "matched_length": 2,
            "rule_relevance": 99,
            "rule_identifier": "bsd-new_89.RULE",
            "license_expression": "bsd-new"
          }
        ],
        "identifier": "bsd_new-261898a0-0118-87c4-7092-14e4ff134882",
        "license_expression": "bsd-new"
      },
      {
        "matches": [
          {
            "score": 99.0,
            "matcher": "1-hash",
            "end_line": 1,
            "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pypi_bsd_license.RULE",
            "start_line": 1,
            "matched_text": "['License :: OSI Approved :: BSD License']",
            "match_coverage": 100.0,
            "matched_length": 5,
            "rule_relevance": 99,
            "rule_identifier": "pypi_bsd_license.RULE",
            "license_expression": "bsd-new"
          }
        ],
        "identifier": "bsd_new-f4e99f86-00ab-18d9-a65d-a3a12767dcf5",
        "license_expression": "bsd-new"
      }
    ],
    "other_license_expression": "",
    "other_license_expression_spdx": "",
    "other_license_detections": [],
    "extracted_license_statement": "{'license': 'BSD', 'classifiers': ['License :: OSI Approved :: BSD License']}",
    "notice_text": "NOTICE_TEXT",
    "datasource_id": "",
    "file_references": [],
    "parties": [
      {
        "url": null,
        "name": "Django Software Foundation",
        "role": "author",
        "type": "person",
        "email": "foundation@djangoproject.com"
      }
    ],
    "uuid": "bef22e34-f8c3-463d-9d3e-46a55c3170e8",
    "missing_resources": [],
    "modified_resources": [],
    "package_uid": "pkg:pypi/asgiref@3.3.0?uuid=f66d2b7c-233e-4a6a-93d8-1d17732704e9",
    "keywords": [
      "Development Status :: 5 - Production/Stable",
      "Environment :: Web Environment",
      "Intended Audience :: Developers",
      "Operating System :: OS Independent",
      "Programming Language :: Python",
      "Programming Language :: Python :: 3",
      "Programming Language :: Python :: 3 :: Only",
      "Programming Language :: Python :: 3.5",
      "Programming Language :: Python :: 3.6",
      "Programming Language :: Python :: 3.7",
      "Programming Language :: Python :: 3.8",
      "Topic :: Internet :: WWW/HTTP"
    ],
    "source_packages": [],
    "codebase_resources": [
      15,
      18,
      14,
      16,
      17,
      11,
      6,
      9,
      8,
      7,
      5,
      12,
      10,
      13
    ]
  }
},
{
  "model": "scanpipe.discovereddependency",
  "pk": 1,
  "fields": {
    "type": "pypi",
    "namespace": "",
    "name": "pytest",
    "version": "",
    "qualifiers": "",
    "subpath": "",
    "project": "cbd609b2-525a-4052-9860-201b879b20d9",
    "dependency_uid": "pkg:pypi/pytest?uuid=ea2921dd-6dfd-4d20-b018-6d611f2c71e5",
    "for_package": 1,
    "datafile_resource": 1,
    "extracted_requirement": "pytest; extra == \"tests\"",
    "scope": "tests",
    "datasource_id": "pypi_wheel",
    "is_runtime": true,
    "is_optional": true,
    "is_resolved": false
  }
},
{
  "model": "scanpipe.discovereddependency",
  "pk": 2,
  "fields": {
    "type": "pypi",
    "namespace": "",
    "name": "pytest-asyncio",
    "version": "",
    "qualifiers": "",
    "subpath": "",
    "project": "cbd609b2-525a-4052-9860-201b879b20d9",
    "dependency_uid": "pkg:pypi/pytest-asyncio?uuid=cd6e2840-3615-4f33-9e9b-1222026a1b90",
    "for_package": 1,
    "datafile_resource": 1,
    "extracted_requirement": "pytest-asyncio; extra == \"tests\"",
    "scope": "tests",
    "datasource_id": "pypi_wheel",
    "is_runtime": true,
    "is_optional": true,
    "is_resolved": false
  }
},
{
  "model": "scanpipe.discovereddependency",
  "pk": 3,
  "fields": {
    "type": "pypi",
    "namespace": "",
    "name": "pytest",
    "version": "",
    "qualifiers": "",
    "subpath": "",
    "project": "cbd609b2-525a-4052-9860-201b879b20d9",
    "dependency_uid": "pkg:pypi/pytest?uuid=d5506e2e-5172-4435-93e0-b4929f31d8d7",
    "for_package": 2,
    "datafile_resource": 18,
    "extracted_requirement": "pytest; extra == \"tests\"",
    "scope": "tests",
    "datasource_id": "pypi_wheel_metadata",
    "is_runtime": true,
    "is_optional": true,
    "is_resolved": false
  }
},
{
  "model": "scanpipe.discovereddependency",
  "pk": 4,
  "fields": {
    "type": "pypi",
    "namespace": "",
    "name": "pytest-asyncio",
    "version": "",
    "qualifiers": "",
    "subpath": "",
    "project": "cbd609b2-525a-4052-9860-201b879b20d9",
    "dependency_uid": "pkg:pypi/pytest-asyncio?uuid=ab7f2ac4-cf40-4717-8d41-067e66bad5aa",
    "for_package": 2,
    "datafile_resource": 18,
    "extracted_requirement": "pytest-asyncio; extra == \"tests\"",
    "scope": "tests",
    "datasource_id": "pypi_wheel_metadata",
    "is_runtime": true,
    "is_optional": true,
    "is_resolved": false
  }
}
]
