{"id":21927750,"url":"https://github.com/the-allanc/pyriform","last_synced_at":"2025-07-29T14:11:20.449Z","repository":{"id":62583120,"uuid":"101584555","full_name":"the-allanc/pyriform","owner":"the-allanc","description":"Connect the requests library to your WSGI app without using sockets.","archived":false,"fork":false,"pushed_at":"2017-09-14T00:12:38.000Z","size":91,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-21T12:17:57.216Z","etag":null,"topics":["requests-module","testing","wsgi"],"latest_commit_sha":null,"homepage":"https://pyriform.readthedocs.io/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/the-allanc.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-27T22:39:36.000Z","updated_at":"2020-05-28T03:01:51.000Z","dependencies_parsed_at":"2022-11-03T22:01:54.103Z","dependency_job_id":null,"html_url":"https://github.com/the-allanc/pyriform","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/the-allanc/pyriform","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-allanc%2Fpyriform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-allanc%2Fpyriform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-allanc%2Fpyriform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-allanc%2Fpyriform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/the-allanc","download_url":"https://codeload.github.com/the-allanc/pyriform/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-allanc%2Fpyriform/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267503553,"owners_count":24098331,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["requests-module","testing","wsgi"],"created_at":"2024-11-28T22:17:25.282Z","updated_at":"2025-07-29T14:11:20.400Z","avatar_url":"https://github.com/the-allanc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":".. |name| replace:: pyriform\n.. |summary| replace:: Connect the requests library to your WSGI app without using sockets.\n\n|name|\n======\n\n|summary|\n\n.. _repository: https://github.com/the-allanc/pyriform/\n.. _documentation: https://pyriform.readthedocs.io/en/stable/\n.. _pypi: https://pypi.python.org/pypi/pyriform\n.. _coveralls: https://coveralls.io/github/the-allanc/pyriform\n.. _license: https://github.com/the-allanc/pyriform/master/LICENSE.txt\n.. _travis: https://travis-ci.org/the-allanc/pyriform\n.. _codeclimate: https://codeclimate.com/github/the-allanc/pyriform\n\n.. |Build Status| image:: https://img.shields.io/travis/the-allanc/pyriform.svg\n    :target: travis_\n    :alt: Build Status\n.. |Coverage| image:: https://img.shields.io/coveralls/the-allanc/pyriform.svg\n    :target: coveralls_\n    :alt: Coverage\n.. |Docs| image:: https://readthedocs.org/projects/pyriform/badge/?version=stable\u0026style=flat\n    :target: documentation_\n    :alt: Docs\n.. |Release Version| image:: https://img.shields.io/pypi/pyversions/pyriform.svg\n    :target: pypi_\n    :alt: Release Version\n.. |Python Version| image:: https://img.shields.io/pypi/v/pyriform.svg\n    :target: pypi_\n    :alt: Python Version\n.. |License| image:: https://img.shields.io/pypi/l/pyriform.svg\n    :target: license_\n    :alt: License\n.. |Code Climate| image:: https://img.shields.io/codeclimate/issues/github/the-allanc/pyriform.svg\n    :target: codeclimate_\n    :alt: Code Climate\n\n.. _requests: http://python-requests.org\n.. _webtest: https://docs.pylonsproject.org/projects/webtest/\n\nLinking the Requests_ and WebTest_ libraries together, ``pyriform`` allows you to use the ``requests`` library to interact your WSGI app without needing to have it running on the network; it bonds these two web components together.\n\nIt's useful for testing purposes, handles all standard HTTP methods (as well as custom ones), supports request timeouts. and is both Python 2 and 3 compatible.\n\nExample Usage\n-------------\n\n.. _cherrypy: http://www.cherrypy.org\n\nHere's an example with a small WSGI app (in this case, using CherryPy_), and how we can use Pyriform to connect to it::\n\n    \u003e\u003e\u003e # Create the WSGI app.\n    \u003e\u003e\u003e\n    \u003e\u003e\u003e import cherrypy\n    \u003e\u003e\u003e\n    \u003e\u003e\u003e class SayHello(object):\n    ...\n    ...     @cherrypy.expose\n    ...     def default(self, word):\n    ...         return \"Hello %s from %s!\" % (word, cherrypy.request.headers['X-Location'])\n    ...\n    \u003e\u003e\u003e cherrypy.config.update({'environment': 'embedded'})  # Suppress logging output.\n    \u003e\u003e\u003e app = cherrypy.tree.mount(SayHello(), '/')\n    \u003e\u003e\u003e\n    \u003e\u003e\u003e # Now use Pyriform to map requests from a particular URL to this app.\n    \u003e\u003e\u003e\n    \u003e\u003e\u003e import pyriform\n    \u003e\u003e\u003e import requests\n    \u003e\u003e\u003e adapter = pyriform.WSGIAdapter(app)\n    \u003e\u003e\u003e session = requests.Session()\n    \u003e\u003e\u003e session.mount('http://helloapp/', adapter)\n    \u003e\u003e\u003e resp = session.get('http://helloapp/World', headers={'X-Location': 'London'})\n    \u003e\u003e\u003e print (resp.text)\n    Hello World from London!\n\n\n|Docs| |Release Version| |Python Version| |License| |Build Status| |Coverage| |Code Climate|\n\n.. all-content-above-will-be-included-in-sphinx-docs\n\nYou can browse the source code and file bug reports at the project repository_. Full documentation can be found `here`__.\n\n__ documentation_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe-allanc%2Fpyriform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthe-allanc%2Fpyriform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe-allanc%2Fpyriform/lists"}