{"id":22502,"library":"types-python-http-client","title":"types-python-http-client","description":"Typing stubs for the python-http-client library, enabling type checking for SendGrid's HTTP client. Current version: 3.3.7.20260408. Released as part of typeshed, updated periodically.","status":"active","version":"3.3.7.20260408","language":"python","source_language":"en","source_url":"https://github.com/python/typeshed","tags":["typeshed","stubs","typing","sendgrid","http-client"],"install":[{"cmd":"pip install types-python-http-client","lang":"bash","label":"Install via pip"}],"dependencies":[{"reason":"The stubs are for this library; runtime dependency for actual HTTP calls.","package":"python-http-client","optional":false}],"imports":[{"note":"Stubs are not a separate runtime package; import from the original library.","wrong":"from types.python_http_client import HTTPClient","symbol":"HTTPClient","correct":"from python_http_client import HTTPClient"}],"quickstart":{"code":"from python_http_client import HTTPClient\n\nclient = HTTPClient(host='https://api.sendgrid.com', request_headers={'Authorization': 'Bearer ' + os.environ.get('SENDGRID_API_KEY', '')})\nresponse = client.get('/v3/mail/send')\nprint(response.status_code)","lang":"python","description":"Minimal usage of HTTPClient with SendGrid API. Requires python-http-client installed."},"warnings":[{"fix":"Install python-http-client separately: pip install python-http-client","message":"Stubs are for type checking only. They do not replace the runtime library python-http-client.","severity":"gotcha","affected_versions":"all"},{"fix":"Pin both packages to compatible versions. Check typeshed version against python-http-client version.","message":"Changes in stubs may not match the installed version of python-http-client, leading to type errors.","severity":"breaking","affected_versions":">=3.10"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Use correct import: from python_http_client import HTTPClient","cause":"Trying to import from stubs directly instead of the original library.","error":"ModuleNotFoundError: No module named 'types'"},{"fix":"Upgrade to Python >=3.10 or use older stubs.","cause":"Using stubs with Python <3.10 that lack certain typing features.","error":"TypeError: 'type' object is not subscriptable"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}