Registry / http-networking / httplib2shim

httplib2shim

JSON →
library0.0.3pypypi✓ verified 83d ago

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
INSTALL
IMPORT
SIG · HTTPLIB2SHIM
H
httplib2shim
http-networkingpythonv0.0.3
Install
2.8s avg
Import
463ms
Disk
20MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.0.3 · 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.478s · 21.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.8s · import 0.448s · 22MB
20MB installed
● package 20MB
Code
Verified usage

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

httplib2shim
import httplib2shim
Http
from httplib2shim import Http

Basic usage: instantiate Http and make a request.

import httplib2shim # Replace httplib2's Http with shim http = httplib2shim.Http() response, content = http.request('https://www.google.com', 'GET') print(response.status)
Debug
Known issues
gotchaThe 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.
affects: all
deprecatedThis library is no longer actively maintained. Last release was 2021.
fix
Consider migrating to urllib3 directly or using httplib2 with its own patches.
affects: all
Errors
Common errors & fixes
AttributeError: module 'httplib2shim' has no attribute 'Http'
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.
TypeError: request() got an unexpected keyword argument '**kwargs'
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.
Upgrade
Version history
0.0.3latest on PyPI · released Jun 26, 2017
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
httplib2shim — pip install httplib2shim · libregistry