{"id":16679018,"url":"https://github.com/dcoles/pycurl-requests","last_synced_at":"2025-10-08T15:31:49.098Z","repository":{"id":53777874,"uuid":"236427187","full_name":"dcoles/pycurl-requests","owner":"dcoles","description":"A Requests-compatible interface for PycURL.","archived":false,"fork":false,"pushed_at":"2025-09-23T03:54:57.000Z","size":105,"stargazers_count":70,"open_issues_count":2,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-09-30T23:23:31.781Z","etag":null,"topics":["client","forhumans","http","pycurl","python","python-requests","requests"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/pycurl-requests/","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/dcoles.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2020-01-27T05:44:00.000Z","updated_at":"2025-09-23T03:55:01.000Z","dependencies_parsed_at":"2024-10-25T18:33:08.989Z","dependency_job_id":"7feac014-f956-49dd-bcda-9ef613aa13c5","html_url":"https://github.com/dcoles/pycurl-requests","commit_stats":{"total_commits":85,"total_committers":2,"mean_commits":42.5,"dds":0.0117647058823529,"last_synced_commit":"23b725e28e7f37bdd90a857c48264d66c9a1a730"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/dcoles/pycurl-requests","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcoles%2Fpycurl-requests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcoles%2Fpycurl-requests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcoles%2Fpycurl-requests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcoles%2Fpycurl-requests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dcoles","download_url":"https://codeload.github.com/dcoles/pycurl-requests/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcoles%2Fpycurl-requests/sbom","scorecard":{"id":329838,"data":{"date":"2025-08-11","repo":{"name":"github.com/dcoles/pycurl-requests","commit":"253d5c21ca803a2eb2db426eb85608dc50fbef34"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.4,"checks":[{"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":"Code-Review","score":0,"reason":"Found 1/29 approved changesets -- score normalized to 0","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":"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":"Token-Permissions","score":10,"reason":"GitHub workflow tokens follow principle of least privilege","details":["Info: topLevel 'contents' permission set to 'read': .github/workflows/python-app.yml:13","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/python-app.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/dcoles/pycurl-requests/python-app.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-app.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/dcoles/pycurl-requests/python-app.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/python-app.yml:29","Warn: pipCommand not pinned by hash: .github/workflows/python-app.yml:30","Warn: pipCommand not pinned by hash: .github/workflows/python-app.yml:31","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 pipCommand 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":"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":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations 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: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"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":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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 4 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-18T03:18:33.364Z","repository_id":53777874,"created_at":"2025-08-18T03:18:33.364Z","updated_at":"2025-08-18T03:18:33.364Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278969270,"owners_count":26077636,"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-10-08T02:00:06.501Z","response_time":56,"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":["client","forhumans","http","pycurl","python","python-requests","requests"],"created_at":"2024-10-12T13:32:38.079Z","updated_at":"2025-10-08T15:31:49.086Z","avatar_url":"https://github.com/dcoles.png","language":"Python","readme":"# PycURL Requests `\u003cpycurl://☤\u003e`\n\n**PycURL Requests** is a [Requests](https://github.com/psf/requests)-compatible interface for\n[PycURL](https://github.com/pycurl/pycurl).\n\n[![pycurl-requests](https://github.com/dcoles/pycurl-requests/actions/workflows/python-app.yml/badge.svg)](https://github.com/dcoles/pycurl-requests/actions/workflows/python-app.yml)\n\n## Requirements\n\n- Python 3.6+\n- [PycURL](https://github.com/pycurl/pycurl)\n- [chardet](https://github.com/chardet/chardet)\n\n## Installation\n\nLatest release via [`pip`](https://pip.pypa.io/):\n\n```bash\npip install pycurl-requests [--user]\n```\n\nvia Git:\n\n```bash\ngit clone https://github.com/dcoles/pycurl-requests.git; cd pycurl-requests\npython3 setup.py install [--user]\n```\n\n## Quick-start\n\n```python\n\u003e\u003e\u003e import pycurl_requests as requests\n\u003e\u003e\u003e r = requests.get('https://api.github.com/repos/dcoles/pycurl-requests')\n\u003e\u003e\u003e r.status_code\n200\n\u003e\u003e\u003e r.headers['content-type']\n'application/json; charset=utf-8'\n\u003e\u003e\u003e r.encoding\n'utf-8'\n\u003e\u003e\u003e r.text\n'{\\n  \"id\": 236427187,\\n...'\n\u003e\u003e\u003e data = r.json()\n\u003e\u003e\u003e data['name']\n'pycurl-requests'\n\u003e\u003e\u003e data['html_url']\n'https://github.com/dcoles/pycurl-requests'\n\u003e\u003e\u003e data['description']\n'A Requests-compatible interface for pycURL'\n\n```\n\nThe library can also be used to run existing Python scripts that import the `requests` module.\nBy running the script through the `pycurl_requests` helper, any use of the `requests` module will\nbe automatically redirected to `pycurl_requests`.\n\n```bash\npython3 -m pycurl_requests -- script.py arg arg...\n```\n\n## `request` tool\n\nA basic `curl`-like command-line utility is included:\n\n```\nusage: request.py [-h] [-d DATA] [-H HEADER] [--json JSON] [-L] [-o OUTPUT]\n                  [-X REQUEST] [-v]\n                  url\n\nA basic `curl`-like command-line HTTP utility\n\npositional arguments:\n  url                   URL of resource to connect to\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -d DATA, --data DATA  Add POST data\n  -H HEADER, --header HEADER\n                        Add custom request header (format: `Header: Value`)\n  --json JSON           Add JSON POST data\n  -L, --location        Follow redirects\n  -o OUTPUT, --output OUTPUT\n                        Write to file instead of stdout\n  -X REQUEST, --request REQUEST\n                        Request command to use (e.g. HTTP method)\n  -v, --verbose         Verbose logging\n```\n\nThis can also be used with the [Requests](https://github.com/psf/requests) library if\n`PYCURLREQUESTS_REQUESTS` environment variable is set to a non-null value.\n\n## Documentation\n\nThis library aims to be API compatible with [Requests](https://github.com/psf/requests),\nthus the [Requests documentation](https://requests.readthedocs.io/en/master/) should be\nmostly applicable.\n\n### Adapters\n\nPycURL support is implemented as a [transport adapter](https://requests.readthedocs.io/en/latest/user/advanced/#transport-adapters).\nThis means it's possible to use PycURL with the Requests library itself!\n\n```python\nimport pycurl\nimport requests\nfrom pycurl_requests.adapters import PyCurlHttpAdapter\n\nwith requests.Session() as session:\n    curl = pycurl.Curl()\n    session.mount('https://', PyCurlHttpAdapter(curl))\n    session.mount('http://', PyCurlHttpAdapter(curl))\n\n    response = session.get('http://example.com')\n```\n\n### cURL options\n\nIt is possible customize cURL's behaviour using the `curl` attribute on a\n[`Session object`](https://requests.readthedocs.io/en/master/user/advanced/#session-objects).\n\nFor example, to make a request without requesting the body:\n\n```python\nimport pycurl\nimport pycurl_requests as requests\n\nwith requests.Session() as session:\n    session.curl.setopt(pycurl.NOBODY, 1)\n    response = session.get('http://example.com')\n```\n\nSee the [`pycurl.Curl` object](http://pycurl.io/docs/latest/curlobject.html) documentation\nfor all possible `curl` attribute methods.\n\n### cURL exceptions\n\nAll [`pycurl.error` exceptions](http://pycurl.io/docs/latest/callbacks.html#error-reporting)\nare mapped to a [`requests.RequestException`](https://requests.readthedocs.io/en/master/api/#exceptions)\n(or one of its subclasses).\n\nFor convenience, the original `pycurl.error` error message and\n[cURL error code](https://curl.haxx.se/libcurl/c/libcurl-errors.html) will be set on the exception\nobject as the `curl_message` and `curl_code` attributes.\n\n```python\nimport pycurl_requests as requests\n\ntry:\n    requests.get('http://connect_error')\nexcept requests.RequestException as e:\n    print('ERROR: {} (cURL error: {})'.format(e.curl_message, e.curl_code))\n```\n\nIt is also possible to obtain the original `pycurl.error` using the `__cause__` attribute.\n\n### Logging\n\nDetailed log records from `libcurl`, including informational text and HTTP headers, can be shown\nby setting the `curl` logger (or sub-loggers) to [`DEBUG` level](https://docs.python.org/3/library/logging.html#logging-levels):\n\n```python\nimport logging\n\nlogging.getLogger('curl').setLevel(logging.DEBUG)\n```\n\nLog records are split into dedicated sub-loggers for each type of record:\n\n- `curl.text` \u0026mdash; Informational text\n- `curl.header_in` \u0026mdash; Header data received from the peer\n- `curl.header_out` \u0026mdash; Header data sent to the peer\n\n## Known limitations\n\n- No support for reading [Cookies](https://requests.readthedocs.io/en/master/user/quickstart/#cookies)\n- No support for [client-side certificates](https://requests.readthedocs.io/en/master/user/advanced/#client-side-certificates)\n- No support for [proxies](https://requests.readthedocs.io/en/master/user/advanced/#proxies)\n- No support for [link headers](https://requests.readthedocs.io/en/master/user/advanced/#link-headers) (e.g. [`Response.links`](https://requests.readthedocs.io/en/master/api/#requests.Response.links))\n- No support for [sending multi-part encoded files](https://requests.readthedocs.io/en/master/user/advanced/#post-multiple-multipart-encoded-files)\n- Basic support for [`Session` objects](https://requests.readthedocs.io/en/master/user/advanced/#session-objects) (e.g. [`requests.Session`](https://requests.readthedocs.io/en/master/api/#requests.Session))\n\n## License\n\nLicensed under the MIT License.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcoles%2Fpycurl-requests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdcoles%2Fpycurl-requests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcoles%2Fpycurl-requests/lists"}