httplib2shim
raw JSON → 0.0.3 verified Fri May 01 auth: no python maintenance
A wrapper over urllib3 that matches httplib2's interface, allowing users to replace httplib2 with urllib3 for better performance and compatibility. Version 0.0.3 is current; no longer actively maintained.
pip install httplib2shim Common errors
error AttributeError: module 'httplib2shim' has no attribute 'Http' ↓
cause Incorrect import: tried to access Http as attribute of module after `import httplib2shim`.
fix
Use
from httplib2shim import Http or httplib2shim.Http() directly – but import works. error TypeError: request() got an unexpected keyword argument '**kwargs' ↓
cause The shim's request method does not accept some httplib2-specific parameters.
fix
Only pass positional args (uri, method) and body; avoid httplib2 extras like headers as keyword args.
Warnings
gotcha The shim does not fully implement all httplib2 features (e.g., caching, proxy authentication). ↓
fix Test your specific httplib2 usage; fall back to httplib2 if needed.
deprecated This library is no longer actively maintained. Last release was 2021. ↓
fix Consider migrating to urllib3 directly or using httplib2 with its own patches.
Imports
- httplib2shim
import httplib2shim - Http
from httplib2shim import Http
Quickstart
import httplib2shim
# Replace httplib2's Http with shim
http = httplib2shim.Http()
response, content = http.request('https://www.google.com', 'GET')
print(response.status)