{"id":15031745,"url":"https://github.com/gabrielfalcao/httpretty","last_synced_at":"2026-07-10T14:00:40.152Z","repository":{"id":1355366,"uuid":"1303056","full_name":"gabrielfalcao/HTTPretty","owner":"gabrielfalcao","description":"Intercept HTTP requests at the Python socket level. Fakes the whole socket module","archived":false,"fork":false,"pushed_at":"2024-06-09T14:37:11.000Z","size":1118,"stargazers_count":2163,"open_issues_count":128,"forks_count":279,"subscribers_count":40,"default_branch":"main","last_synced_at":"2026-07-06T13:54:52.041Z","etag":null,"topics":["decorators","fakeweb","http","httpretty","mock","mocking","python","python2","streaming-response","tdd","testing","testing-tools"],"latest_commit_sha":null,"homepage":"https://httpretty.readthedocs.org","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/gabrielfalcao.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":"FUNDING.yml","license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":["https://xscode.com/gabrielfalcao/HTTPretty"]}},"created_at":"2011-01-28T14:59:02.000Z","updated_at":"2026-06-16T04:49:03.000Z","dependencies_parsed_at":"2024-04-28T01:57:16.752Z","dependency_job_id":"4e8ec3ae-256f-4b08-a824-223f23787846","html_url":"https://github.com/gabrielfalcao/HTTPretty","commit_stats":{"total_commits":555,"total_committers":106,"mean_commits":5.235849056603773,"dds":0.4162162162162162,"last_synced_commit":"f9f012711597634d40066d144a36888b3addcc46"},"previous_names":[],"tags_count":41,"template":false,"template_full_name":null,"purl":"pkg:github/gabrielfalcao/HTTPretty","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabrielfalcao%2FHTTPretty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabrielfalcao%2FHTTPretty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabrielfalcao%2FHTTPretty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabrielfalcao%2FHTTPretty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gabrielfalcao","download_url":"https://codeload.github.com/gabrielfalcao/HTTPretty/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabrielfalcao%2FHTTPretty/sbom","scorecard":{"id":416582,"data":{"date":"2025-08-11","repo":{"name":"github.com/gabrielfalcao/HTTPretty","commit":"f9f012711597634d40066d144a36888b3addcc46"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.6,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":1,"reason":"Found 5/29 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/pyenv.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pyenv.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/gabrielfalcao/HTTPretty/pyenv.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pyenv.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/gabrielfalcao/HTTPretty/pyenv.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pyenv.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/gabrielfalcao/HTTPretty/pyenv.yml/main?enable=pin","Info:   0 out of   1 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":10,"reason":"project is fuzzed","details":["Info: OSSFuzz integration found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: COPYING:0","Info: FSF or OSI recognized license: MIT License: COPYING:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 12 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T00:02:11.657Z","repository_id":1355366,"created_at":"2025-08-19T00:02:11.658Z","updated_at":"2025-08-19T00:02:11.658Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35333326,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-10T02:00:06.465Z","response_time":60,"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":["decorators","fakeweb","http","httpretty","mock","mocking","python","python2","streaming-response","tdd","testing","testing-tools"],"created_at":"2024-09-24T20:16:27.856Z","updated_at":"2026-07-10T14:00:39.861Z","avatar_url":"https://github.com/gabrielfalcao.png","language":"Python","funding_links":["https://xscode.com/gabrielfalcao/HTTPretty"],"categories":[],"sub_categories":[],"readme":"HTTPretty 1.1.4\n===============\n\n.. image:: https://github.com/gabrielfalcao/HTTPretty/raw/master/docs/source/_static/logo.svg?sanitize=true\n\nHTTP Client mocking tool for Python created by `Gabriel Falcão \u003chttps://github.com/gabrielfalcao\u003e`_ . It provides a full fake TCP socket module. Inspired by `FakeWeb \u003chttps://github.com/chrisk/fakeweb\u003e`_\n\n\n- `Github Repository \u003chttps://github.com/gabrielfalcao/HTTPretty\u003e`_\n- `Documentation \u003chttps://httpretty.readthedocs.io/en/latest/\u003e`_\n- `PyPI Package \u003chttps://pypi.org/project/httpretty/\u003e`_\n\n\n**Python Support:**\n\n- **3.6**\n- **3.7**\n- **3.8**\n- **3.9**\n\n.. image:: https://img.shields.io/pypi/dm/HTTPretty\n   :target: https://pypi.org/project/HTTPretty\n\n.. image:: https://img.shields.io/codecov/c/github/gabrielfalcao/HTTPretty\n   :target: https://codecov.io/gh/gabrielfalcao/HTTPretty\n\n.. image:: https://img.shields.io/github/workflow/status/gabrielfalcao/HTTPretty/HTTPretty%20Tests?label=Python%203.6%20-%203.9\n   :target: https://github.com/gabrielfalcao/HTTPretty/actions\n\n.. image:: https://img.shields.io/readthedocs/httpretty\n   :target: https://httpretty.readthedocs.io/\n\n.. image:: https://img.shields.io/github/license/gabrielfalcao/HTTPretty?label=Github%20License\n   :target: https://github.com/gabrielfalcao/HTTPretty/blob/master/COPYING\n\n.. image:: https://img.shields.io/pypi/v/HTTPretty\n   :target: https://pypi.org/project/HTTPretty\n\n.. image:: https://img.shields.io/pypi/l/HTTPretty?label=PyPi%20License\n   :target: https://pypi.org/project/HTTPretty\n\n.. image:: https://img.shields.io/pypi/format/HTTPretty\n   :target: https://pypi.org/project/HTTPretty\n\n.. image:: https://img.shields.io/pypi/status/HTTPretty\n   :target: https://pypi.org/project/HTTPretty\n\n.. image:: https://img.shields.io/pypi/pyversions/HTTPretty\n   :target: https://pypi.org/project/HTTPretty\n\n.. image:: https://img.shields.io/pypi/implementation/HTTPretty\n   :target: https://pypi.org/project/HTTPretty\n\n.. image:: https://img.shields.io/snyk/vulnerabilities/github/gabrielfalcao/HTTPretty\n   :target: https://github.com/gabrielfalcao/HTTPretty/network/alerts\n\n.. image:: https://img.shields.io/github/v/tag/gabrielfalcao/HTTPretty\n   :target: https://github.com/gabrielfalcao/HTTPretty/releases\n\n.. |Join the chat at https://gitter.im/gabrielfalcao/HTTPretty| image:: https://badges.gitter.im/gabrielfalcao/HTTPretty.svg\n   :target: https://gitter.im/gabrielfalcao/HTTPretty?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge\n\nInstall\n-------\n\n.. code:: bash\n\n   pip install httpretty\n\n\n\nCommon Use Cases\n================\n\n- Test-driven development of API integrations\n- Fake responses of external APIs\n- Record and playback HTTP requests\n\n\nSimple Example\n--------------\n\n.. code:: python\n\n    import sure\n    import httpretty\n    import requests\n\n\n    @httpretty.activate(verbose=True, allow_net_connect=False)\n    def test_httpbin():\n        httpretty.register_uri(\n            httpretty.GET,\n            \"https://httpbin.org/ip\",\n            body='{\"origin\": \"127.0.0.1\"}'\n        )\n\n        response = requests.get('https://httpbin.org/ip')\n        response.json().should.equal({'origin': '127.0.0.1'})\n\n        httpretty.latest_requests().should.have.length_of(1)\n        httpretty.last_request().should.equal(httpretty.latest_requests()[0])\n        httpretty.last_request().body.should.equal('{\"origin\": \"127.0.0.1\"}')\n\n\nchecking multiple responses\n---------------------------\n\n .. code:: python\n\n    @httpretty.activate(verbose=True, allow_net_connect=False)\n    def test_post_bodies():\n        url = 'http://httpbin.org/post'\n        httpretty.register_uri(httpretty.POST, url, status=200)\n        httpretty.register_uri(httpretty.POST, url, status=400)\n        requests.post(url, data={'foo': 'bar'})\n        requests.post(url, data={'zoo': 'zoo'})\n        assert 'foo=bar' in httpretty.latest_requests()[0].body\n        assert 'zoo=bar' in httpretty.latest_requests()[1].body\n\n\nLicense\n=======\n\n::\n\n    \u003cHTTPretty - HTTP client mock for Python\u003e\n    Copyright (C) \u003c2011-2021\u003e Gabriel Falcão \u003cgabriel@nacaolivre.org\u003e\n\n    Permission is hereby granted, free of charge, to any person\n    obtaining a copy of this software and associated documentation\n    files (the \"Software\"), to deal in the Software without\n    restriction, including without limitation the rights to use,\n    copy, modify, merge, publish, distribute, sublicense, and/or sell\n    copies of the Software, and to permit persons to whom the\n    Software is furnished to do so, subject to the following\n    conditions:\n\n    The above copyright notice and this permission notice shall be\n    included in all copies or substantial portions of the Software.\n\n    THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n    OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n    NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n    HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n    WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n    OTHER DEALINGS IN THE SOFTWARE.\n\nMain contributors\n=================\n\nHTTPretty has received `many contributions \u003chttps://github.com/gabrielfalcao/HTTPretty/graphs/contributors\u003e`_\nbut some folks made remarkable contributions and deserve extra credit:\n\n-  Andrew Gross ~\u003e `@andrewgross \u003chttps://github.com/andrewgross\u003e`_\n-  Hugh Saunders ~\u003e `@hughsaunders \u003chttps://github.com/hughsaunders\u003e`_\n-  James Rowe ~\u003e `@JNRowe \u003chttps://github.com/JNRowe\u003e`_\n-  Matt Luongo ~\u003e `@mhluongo \u003chttps://github.com/mhluongo\u003e`_\n-  Steve Pulec ~\u003e `@spulec \u003chttps://github.com/spulec\u003e`_\n-  Miro Hrončok ~\u003e `@hroncok \u003chttps://github.com/hroncok\u003e`_\n-  Mario Jonke ~\u003e `@mariojonke \u003chttps://github.com/mariojonke\u003e`_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabrielfalcao%2Fhttpretty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgabrielfalcao%2Fhttpretty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabrielfalcao%2Fhttpretty/lists"}