{"id":24520,"library":"requests-hawk","title":"requests-hawk","description":"A requests authentication plugin that implements the Hawk HTTP authentication scheme (https://github.com/hueniverse/hawk). Provides request signing and verification for HTTP APIs. Current version 1.2.1, last updated 2019. Maintenance mode, no recent releases.","status":"maintenance","version":"1.2.1","language":"python","source_language":"en","source_url":"https://github.com/mozilla-services/requests-hawk","tags":["authentication","hawk","http","requests","security"],"install":[{"cmd":"pip install requests-hawk","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required for the Auth class to hook into requests","package":"requests","optional":false},{"reason":"Used internally for Hawk crypto operations","package":"mohawk","optional":false}],"imports":[{"note":"The module itself is not a class; import HawkAuth directly","wrong":"from requests_hawk import requests_hawk","symbol":"requests_hawk","correct":"from requests_hawk import HawkAuth"}],"quickstart":{"code":"import requests\nfrom requests_hawk import HawkAuth\n\nauth = HawkAuth(\n    hawk_credentials={\n        'id': 'my-id',\n        'key': 'my-secret-key',\n        'algorithm': 'sha256'\n    }\n)\nresponse = requests.get('https://example.com/api/resource', auth=auth)\nprint(response.status_code)","lang":"python","description":"Create a HawkAuth instance with credentials and pass it as the 'auth' parameter to requests."},"warnings":[{"fix":"Monitor for vulnerabilities; for new projects, evaluate using the 'mohawk' library with custom requests auth.","message":"Library is in maintenance mode. No active development since 2019. Consider using 'mohawk' directly or 'requests-hawk' as-is.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Always include all three keys to avoid confusion.","message":"The hawk_credentials dict must contain 'id', 'key', and 'algorithm'. 'algorithm' defaults to 'sha256' but is recommended to be explicit.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Upgrade to >=1.1.1 or ensure Content-Type is a string.","message":"Content-Type handling changed in v1.1.1 when Content-Type is bytes. Ensure you send headers as strings or use latest version.","severity":"gotcha","affected_versions":"<1.1.1"}],"env_vars":null,"search_vec":"'/hueniverse/hawk).':17 '1.2.1':28 '2019':31 'api':25 'authent':6,13,37 'current':26 'github.com':16 'github.com/hueniverse/hawk).':15 'hawk':3,11,38 'http':12,24,39 'implement':9 'last':29 'mainten':32 'mode':33 'plugin':7 'provid':18 'recent':35 'releas':36 'request':2,5,19,40 'requests-hawk':1 'scheme':14 'secur':41 'sign':20 'updat':30 'verif':22 'version':27","created_at":"2026-05-01T08:13:31.541022+00:00","updated_at":"2026-05-01T08:13:31.541022+00:00","problems":[{"fix":"Run 'pip install requests-hawk' and ensure it's in the same Python environment.","cause":"Library not installed or environment issue","error":"ImportError: No module named requests_hawk"},{"fix":"Use 'hawk_credentials' as the parameter name.","cause":"Incorrect argument name; should be 'hawk_credentials' (singular) not 'hawk_credentials'.","error":"TypeError: __init__() got an unexpected keyword argument 'hawk_credentials'"},{"fix":"Ensure requests have a Content-Type header set (e.g., 'Content-Type': 'application/json') when sending data.","cause":"The request has a body but Content-Type is missing or empty; Hawk requires hash for non-empty payloads.","error":"mohawk.exceptions.MissingRequiredAttribute: payload can't be blank when hash is required"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"1.2.1","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/mozilla-services/requests-hawk","docs":null,"changelog":null,"pypi":"https://pypi.org/project/requests-hawk/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["auth-security","http-networking"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-29","last_verified":"2026-06-29","next_check":"2026-07-29","install_tag":null}}