Registry / http-networking / httplib2

httplib2

JSON →
library0.32.0pypypi✓ verified 24d ago

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.

pip install httplib2
INSTALL
IMPORT
SIG · HTTPLIB2
H
httplib2
http-networkingpythonv0.32.0
Install
1.8s avg
Import
355ms
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.32.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.366s · 19MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.8s · import 0.344s · 20MB
17MB installed
● package 17MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Http
from httplib2 import Http
Ensure correct import path to avoid ImportError.

Basic usage example demonstrating how to make a GET request using httplib2.

import os from httplib2 import Http # Initialize Http object http = Http() # Make a GET request url = 'http://example.com' response, content = http.request(url, 'GET') # Print response status print(f'Response status: {response.status}')
Debug
Known issues
breakingEnsure 'simplejson' is installed for optimal performance; otherwise, 'json' module will be used.
fix
Install 'simplejson' using 'pip install simplejson'.
affects: 0.31.2
gotchaBe cautious with SSL/TLS configurations; incorrect settings can lead to security vulnerabilities.
fix
Review SSL/TLS settings and ensure they comply with security best practices.
affects: All
gotchaRunning 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.
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').
affects: All
breakingRunning pip as the 'root' user can result in broken permissions and conflicting behavior with the system package manager, potentially rendering your system unusable.
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.
affects: All
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'httplib2'
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.
fix
Ensure `httplib2` is installed for the correct Python interpreter by running `pip install httplib2` or `pip3 install httplib2`.
httplib2.SSLHandshakeError: ('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')
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.
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)`.
AttributeError: module 'httplib2' has no attribute 'SSLHandshakeError'
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.
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.
ERROR: httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
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.
fix
Set the timeout parameter during the initialization of the `Http` object, for example: `h = httplib2.Http(timeout=30)`.
Upgrade
Version history
0.32.0latest on PyPI · released Jun 26, 2026
Audit
Dependencies
simplejsonrequiredProvides JSON parsing and generation; optional for performance improvements.
Agent activity
19 hits · last 30 days
node
16
OpenAI (training)
1
Resources
httplib2 — pip install httplib2 · libregistry