{"id":402,"library":"httplib2","title":"httplib2","description":"A comprehensive HTTP client library supporting HTTP and HTTPS, authentication, caching, and more. Current version: 0.31.2, released on January 23, 2026. Maintained with regular updates.","status":"active","version":"0.31.2","language":"python","source_language":"en","source_url":"https://github.com/httplib2/httplib2","tags":["HTTP client","Python","networking","API"],"install":[{"cmd":"pip install httplib2","lang":"bash","label":"Install httplib2"}],"dependencies":[{"reason":"Provides JSON parsing and generation; optional for performance improvements.","package":"simplejson"}],"imports":[{"note":"Ensure correct import path to avoid ImportError.","symbol":"Http","correct":"from httplib2 import Http"}],"quickstart":{"code":"import os\nfrom httplib2 import Http\n\n# Initialize Http object\nhttp = Http()\n\n# Make a GET request\nurl = 'http://example.com'\nresponse, content = http.request(url, 'GET')\n\n# Print response status\nprint(f'Response status: {response.status}')","lang":"python","description":"Basic usage example demonstrating how to make a GET request using httplib2."},"warnings":[{"fix":"Install 'simplejson' using 'pip install simplejson'.","message":"Ensure 'simplejson' is installed for optimal performance; otherwise, 'json' module will be used.","severity":"breaking","affected_versions":"0.31.2"},{"fix":"Review SSL/TLS settings and ensure they comply with security best practices.","message":"Be cautious with SSL/TLS configurations; incorrect settings can lead to security vulnerabilities.","severity":"gotcha","affected_versions":"All"},{"fix":"Use a virtual environment for installing Python packages to avoid permission issues and conflicts (e.g., 'python -m venv .venv' then 'source .venv/bin/activate').","message":"Running pip as the 'root' user can lead to broken permissions and conflicts with the system package manager; it is recommended to use a virtual environment.","severity":"gotcha","affected_versions":"All"},{"fix":"It is recommended to use a virtual environment instead of running pip as 'root'. If running as 'root' is necessary, use the '--root-user-action' option to suppress this warning, understanding the implications.","message":"Running pip as the 'root' user can result in broken permissions and conflicting behavior with the system package manager, potentially rendering your system unusable.","severity":"breaking","affected_versions":"All"}],"env_vars":null,"last_verified":"2026-05-12T13:35:56.867Z","next_check":"2026-06-26T00:00:00.000Z","problems":[{"fix":"Ensure `httplib2` is installed for the correct Python interpreter by running `pip install httplib2` or `pip3 install httplib2`.","cause":"The `httplib2` library is not installed in the Python environment being used, or the Python interpreter cannot find it due to an incorrect PATH or virtual environment issue.","error":"ModuleNotFoundError: No module named 'httplib2'"},{"fix":"To resolve this, you can either update your system's CA certificates, specify an up-to-date `cacert.pem` file using the `ca_certs` parameter, or, for testing purposes, temporarily disable SSL certificate validation (use with caution): `h = httplib2.Http(disable_ssl_certificate_validation=True)`.","cause":"This error occurs when `httplib2` cannot verify the SSL/TLS certificate of the server, often due to outdated CA certificates, a self-signed certificate, or an incorrect `ca_certs` path being provided.","error":"httplib2.SSLHandshakeError: ('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')"},{"fix":"Update `httplib2` to a version that includes `SSLHandshakeError` if you intend to catch it explicitly, or refactor your error handling to catch more general `httplib2.Error` or `ssl.SSLError` exceptions.","cause":"This error indicates that the specific `SSLHandshakeError` exception class is not available in the `httplib2` version being used, often appearing when migrating older code to a newer `httplib2` version or Python 3 where exception names or structures may have changed.","error":"AttributeError: module 'httplib2' has no attribute 'SSLHandshakeError'"},{"fix":"Set the timeout parameter during the initialization of the `Http` object, for example: `h = httplib2.Http(timeout=30)`.","cause":"This message indicates that a timeout was attempted to be set on a per-request basis, but `httplib2` requires the timeout to be configured when the `httplib2.Http` instance is initialized.","error":"ERROR: httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance."}],"ecosystem":"pypi","meta_description":null,"install_score":100,"install_tag":"verified","quickstart_score":80,"quickstart_tag":"verified","pypi_latest":null,"install_checks":{"last_tested":"2026-05-12","tag":"verified","tag_description":"installs cleanly on critical runtimes, fast import, recently tested","results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0.4,"mem_mb":10.6,"disk_size":"19.0M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0.25,"mem_mb":10.6,"disk_size":"20M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0.46,"mem_mb":11.3,"disk_size":"21.1M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0.37,"mem_mb":11.2,"disk_size":"22M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0.42,"mem_mb":11,"disk_size":"12.9M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0.4,"mem_mb":11,"disk_size":"13M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0.39,"mem_mb":11.4,"disk_size":"12.5M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0.39,"mem_mb":11.4,"disk_size":"13M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0.29,"mem_mb":10.3,"disk_size":"18.5M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0.23,"mem_mb":10.3,"disk_size":"19M"}]},"quickstart_checks":{"last_tested":"2026-04-23","tag":"verified","tag_description":"quickstart runs on critical runtimes, recently tested","results":[{"runtime":"python:3.10-alpine","exit_code":0},{"runtime":"python:3.10-slim","exit_code":0},{"runtime":"python:3.11-alpine","exit_code":0},{"runtime":"python:3.11-slim","exit_code":0},{"runtime":"python:3.12-alpine","exit_code":0},{"runtime":"python:3.12-slim","exit_code":0},{"runtime":"python:3.13-alpine","exit_code":0},{"runtime":"python:3.13-slim","exit_code":0},{"runtime":"python:3.9-alpine","exit_code":0},{"runtime":"python:3.9-slim","exit_code":0}]}}