httplib2

Small, fast HTTP client library for Python. Features persistent connections, cache, and Google App Engine support. Originally written by Joe Gregorio, now supported by community.

https://github.com/httplib2/httplib2

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    1 of 72 committers (1.4%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.7%) to scientific vocabulary

Keywords

http http-client network python

Keywords from Contributors

tensors fuzzing unit-testing shellcodes humans forhumans system distribution optimizing-compiler python2
Last synced: 6 months ago · JSON representation

Repository

Small, fast HTTP client library for Python. Features persistent connections, cache, and Google App Engine support. Originally written by Joe Gregorio, now supported by community.

Basic Info
Statistics
  • Stars: 498
  • Watchers: 24
  • Forks: 185
  • Open Issues: 63
  • Releases: 0
Topics
http http-client network python
Created almost 10 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog Contributing License Security

README.md

Introduction

httplib2 is a comprehensive HTTP client library, httplib2.py supports many features left out of other HTTP libraries.

If you want to help this project by bug report or code change, contribution guidelines may contain useful information.

HTTP and HTTPS

HTTPS support is only available if the socket module was compiled with SSL support.

Keep-Alive

Supports HTTP 1.1 Keep-Alive, keeping the socket open and performing multiple requests over the same connection if possible.

Authentication

The following three types of HTTP Authentication are supported. These can be used over both HTTP and HTTPS.

  • Digest
  • Basic
  • WSSE

Caching

The module can optionally operate with a private cache that understands the Cache-Control: header and uses both the ETag and Last-Modified cache validators.

All Methods

The module can handle any HTTP request method, not just GET and POST.

Redirects

Automatically follows 3XX redirects on GETs.

Compression

Handles both 'deflate' and 'gzip' types of compression.

Lost update support

Automatically adds back ETags into PUT requests to resources we have already cached. This implements Section 3.2 of Detecting the Lost Update Problem Using Unreserved Checkout.

Unit Tested

A large and growing set of unit tests.

Installation

$ pip install httplib2

Strings vs bytes

To successfully use http2lib, you absolutely must understand the following sentence:

The headers are strings, but the content body is bytes.

Usage

A simple retrieval:

python import httplib2 h = httplib2.Http(".cache") (resp_headers, content) = h.request("http://example.org/", "GET")

The 'content' is the content retrieved from the URL. The content is already decompressed or unzipped if necessary.

To PUT some content to a server that uses SSL and Basic authentication:

python import httplib2 h = httplib2.Http(".cache") h.add_credentials('name', 'password') (resp, content) = h.request("https://example.org/chapter/2", "PUT", body="This is text", headers={'content-type':'text/plain'} )

Use the Cache-Control: header to control how the caching operates.

python import httplib2 h = httplib2.Http(".cache") (resp, content) = h.request("http://bitworking.org/", "GET") ... (resp, content) = h.request("http://bitworking.org/", "GET", headers={'cache-control':'no-cache'})

The first request will be cached and since this is a request to bitworking.org it will be set to be cached for two hours, because that is how I have my server configured. Any subsequent GET to that URI will return the value from the on-disk cache and no request will be made to the server. You can use the Cache-Control: header to change the caches behavior and in this example the second request adds the Cache-Control: header with a value of 'no-cache' which tells the library that the cached copy must not be used when handling this request.

More example usage can be found at:

  • https://github.com/httplib2/httplib2/wiki/Examples
  • https://github.com/httplib2/httplib2/wiki/Examples-Python3

Owner

  • Name: httplib2
  • Login: httplib2
  • Kind: organization

GitHub Events

Total
  • Issues event: 2
  • Watch event: 13
  • Delete event: 3
  • Issue comment event: 7
  • Push event: 5
  • Pull request event: 3
  • Fork event: 1
  • Create event: 2
Last Year
  • Issues event: 2
  • Watch event: 13
  • Delete event: 3
  • Issue comment event: 7
  • Push event: 5
  • Pull request event: 3
  • Fork event: 1
  • Create event: 2

Committers

Last synced: 8 months ago

All Time
  • Total Commits: 538
  • Total Committers: 72
  • Avg Commits per committer: 7.472
  • Development Distribution Score (DDS): 0.593
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Joe Gregorio j****o@g****m 219
jcgregorio d****l@l****t 107
Sergey Shepelev t****r@g****m 78
Jason R. Coombs j****o@j****m 20
Augie Fackler d****2@g****m 20
Alex Yu s****e 6
jcgregorio j****o@l****t 6
Alain Vongsouvanh a****v@g****m 4
Hugo van Kemenade h****k 4
Dirkjan Ochtman d****n@o****l 3
Chris Dent c****t@g****m 3
Joe Gregorio j****o@g****m 3
Ryan Barrett g****t@r****g 2
Tim Gates t****s@i****m 2
David Korczynski d****d@a****m 2
akhern a****n@g****m 2
jcgregorio j****o@w****m 2
Cedric Veilleux v****c@g****m 1
Bu Sun Kim 8****6 1
Andy Sayler a****r@g****m 1
Andrade a****z@g****m 1
Alexander Schlarb a****5 1
Pavel Cahyna p****a@r****m 1
QuentiumYT q****t@g****m 1
Stephen Röttger s****r@g****m 1
Tristan Hill s****3 1
YYHYlh 1****2@q****m 1
Cheng Ji c****i@g****m 1
Evan Jones e****s@b****m 1
Alex Yu a****u@a****m 1
and 42 more...

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 60
  • Total pull requests: 57
  • Average time to close issues: 5 months
  • Average time to close pull requests: 3 months
  • Total issue authors: 55
  • Total pull request authors: 40
  • Average comments per issue: 3.83
  • Average comments per pull request: 2.46
  • Merged pull requests: 29
  • Bot issues: 0
  • Bot pull requests: 3
Past Year
  • Issues: 2
  • Pull requests: 3
  • Average time to close issues: N/A
  • Average time to close pull requests: about 2 hours
  • Issue authors: 2
  • Pull request authors: 3
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.67
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • yohplala (2)
  • qo4on (2)
  • kloczek (2)
  • mgorny (2)
  • temoto (2)
  • timgates42 (1)
  • alexhudson (1)
  • andrewmcguinness (1)
  • zoosmand (1)
  • icegood (1)
  • lryx (1)
  • logachev (1)
  • neilodonuts (1)
  • NickGoog (1)
  • jsanpe (1)
Pull Request Authors
  • temoto (9)
  • hugovk (4)
  • dependabot[bot] (3)
  • DavidKorczynski (2)
  • busunkim96 (2)
  • timgates42 (2)
  • CyrilRoelandteNovance (2)
  • pcahyna (1)
  • smurfix (1)
  • cglouch (1)
  • dpocock (1)
  • devjoe (1)
  • ziollek (1)
  • igorsobot (1)
  • cjwatson (1)
Top Labels
Issue Labels
question (11) bug (7) enhancement (4) feature-proxy (3) feature-security (2) feedback wanted (2) help wanted (1) feature-cache (1) duplicate (1)
Pull Request Labels
enhancement (3) dependencies (3) feedback wanted (2) bug (2) feature-proxy (2)

Packages

  • Total packages: 38
  • Total downloads:
    • pypi 83,595,863 last-month
  • Total docker downloads: 5,889,819,572
  • Total dependent packages: 366
    (may contain duplicates)
  • Total dependent repositories: 48,363
    (may contain duplicates)
  • Total versions: 144
  • Total maintainers: 7
  • Total advisories: 3
pypi.org: httplib2

A comprehensive HTTP client library.

  • Versions: 40
  • Dependent Packages: 266
  • Dependent Repositories: 48,310
  • Downloads: 83,595,863 Last month
  • Docker Downloads: 5,889,819,572
Rankings
Docker downloads count: 0.0%
Dependent repos count: 0.0%
Downloads: 0.0%
Dependent packages count: 0.1%
Average: 1.5%
Stargazers count: 3.8%
Forks count: 4.8%
Last synced: 6 months ago
alpine-v3.7: py-httplib2

A Python HTTP client library

  • Versions: 1
  • Dependent Packages: 4
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Forks count: 3.2%
Average: 3.3%
Stargazers count: 4.5%
Dependent packages count: 5.6%
Last synced: 6 months ago
alpine-v3.12: py3-httplib2

Python3 HTTP client library

  • Versions: 1
  • Dependent Packages: 5
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 3.2%
Average: 3.6%
Forks count: 4.6%
Stargazers count: 6.5%
Last synced: 6 months ago
alpine-v3.6: py-httplib2

A Python HTTP client library

  • Versions: 1
  • Dependent Packages: 3
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Forks count: 2.4%
Stargazers count: 3.3%
Average: 4.0%
Dependent packages count: 10.2%
Last synced: 6 months ago
alpine-v3.9: py3-httplib2

Python HTTP client library (for python3)

  • Versions: 1
  • Dependent Packages: 3
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Forks count: 3.9%
Average: 4.0%
Stargazers count: 5.5%
Dependent packages count: 6.7%
Last synced: 6 months ago
alpine-v3.9: py2-httplib2

Python HTTP client library (for python2)

  • Versions: 1
  • Dependent Packages: 3
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Forks count: 3.9%
Average: 4.0%
Stargazers count: 5.5%
Dependent packages count: 6.7%
Last synced: 6 months ago
alpine-v3.9: py-httplib2

Python HTTP client library

  • Versions: 1
  • Dependent Packages: 3
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Forks count: 3.9%
Average: 4.0%
Stargazers count: 5.5%
Dependent packages count: 6.7%
Last synced: 6 months ago
alpine-v3.14: py3-httplib2

Python3 HTTP client library

  • Versions: 1
  • Dependent Packages: 5
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 3.6%
Average: 4.0%
Forks count: 5.1%
Stargazers count: 7.4%
Last synced: 6 months ago
alpine-v3.7: py3-httplib2

A Python HTTP client library (for python3)

  • Versions: 1
  • Dependent Packages: 2
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Forks count: 3.2%
Average: 4.2%
Stargazers count: 4.5%
Dependent packages count: 9.2%
Last synced: 6 months ago
alpine-v3.10: py3-httplib2

Python HTTP client library (for python3)

  • Versions: 1
  • Dependent Packages: 6
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Forks count: 4.1%
Average: 4.4%
Stargazers count: 5.9%
Dependent packages count: 7.4%
Last synced: 6 months ago
alpine-v3.8: py3-httplib2

Python HTTP client library (for python3)

  • Versions: 1
  • Dependent Packages: 3
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Forks count: 3.6%
Average: 4.4%
Stargazers count: 5.1%
Dependent packages count: 9.0%
Last synced: 6 months ago
alpine-v3.13: py3-httplib2

Python3 HTTP client library

  • Versions: 1
  • Dependent Packages: 2
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Average: 4.7%
Forks count: 5.1%
Dependent packages count: 6.2%
Stargazers count: 7.3%
Last synced: 6 months ago
alpine-v3.18: py3-httplib2

Python3 HTTP client library

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 4.7%
Forks count: 7.1%
Stargazers count: 11.7%
Last synced: 6 months ago
alpine-v3.18: py3-httplib2-pyc

Precompiled Python bytecode for py3-httplib2

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 4.7%
Forks count: 7.1%
Stargazers count: 11.7%
Last synced: 6 months ago
alpine-v3.11: py3-httplib2

Python3 HTTP client library

  • Versions: 1
  • Dependent Packages: 2
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Forks count: 4.6%
Average: 4.8%
Stargazers count: 6.5%
Dependent packages count: 8.1%
Last synced: 6 months ago
alpine-v3.16: py3-httplib2

Python3 HTTP client library

  • Versions: 1
  • Dependent Packages: 7
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Average: 4.8%
Dependent packages count: 5.1%
Forks count: 5.5%
Stargazers count: 8.7%
Last synced: 6 months ago
alpine-v3.10: py-httplib2

Python HTTP client library

  • Versions: 1
  • Dependent Packages: 4
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Forks count: 4.1%
Average: 4.9%
Stargazers count: 5.9%
Dependent packages count: 9.8%
Last synced: 6 months ago
alpine-v3.15: py3-httplib2

Python3 HTTP client library

  • Versions: 1
  • Dependent Packages: 4
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Average: 5.0%
Forks count: 5.3%
Dependent packages count: 6.5%
Stargazers count: 8.0%
Last synced: 6 months ago
alpine-v3.8: py2-httplib2

Python HTTP client library (for python2)

  • Versions: 1
  • Dependent Packages: 2
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Forks count: 3.6%
Stargazers count: 5.1%
Average: 5.1%
Dependent packages count: 11.8%
Last synced: 6 months ago
alpine-edge: py3-httplib2

HTTP client library

  • Versions: 5
  • Dependent Packages: 4
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 1.7%
Average: 5.7%
Forks count: 8.1%
Stargazers count: 12.9%
Last synced: 6 months ago
spack.io: py-httplib2

A comprehensive HTTP client library.

  • Versions: 4
  • Dependent Packages: 8
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Average: 6.0%
Dependent packages count: 6.7%
Forks count: 7.2%
Stargazers count: 10.2%
Maintainers (1)
Last synced: about 1 year ago
alpine-v3.17: py3-httplib2

Python3 HTTP client library

  • Versions: 1
  • Dependent Packages: 5
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Average: 6.1%
Dependent packages count: 6.7%
Forks count: 6.9%
Stargazers count: 10.8%
Last synced: 6 months ago
alpine-v3.7: py2-httplib2

A Python HTTP client library (for python2)

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Forks count: 3.2%
Stargazers count: 4.5%
Average: 7.8%
Dependent packages count: 23.4%
Last synced: 6 months ago
proxy.golang.org: github.com/httplib2/httplib2
  • Versions: 33
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 7.0%
Average: 8.2%
Dependent repos count: 9.3%
Last synced: 6 months ago
alpine-v3.6: py2-httplib2

A Python HTTP client library (for python2)

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Forks count: 2.4%
Stargazers count: 3.3%
Average: 8.2%
Dependent packages count: 27.1%
Last synced: 6 months ago
alpine-v3.6: py3-httplib2

A Python HTTP client library (for python3)

  • Versions: 1
  • Dependent Packages: 4
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Forks count: 2.4%
Stargazers count: 3.3%
Average: 8.2%
Dependent packages count: 27.1%
Last synced: 6 months ago
alpine-v3.8: py-httplib2

Python HTTP client library

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Forks count: 3.6%
Stargazers count: 5.1%
Average: 8.5%
Dependent packages count: 25.2%
Last synced: 6 months ago
alpine-edge: py3-httplib2-pyc

Precompiled Python bytecode for py3-httplib2

  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Forks count: 8.4%
Average: 9.0%
Stargazers count: 13.3%
Dependent packages count: 14.3%
Last synced: 6 months ago
conda-forge.org: httplib2
  • Versions: 27
  • Dependent Packages: 21
  • Dependent Repositories: 53
Rankings
Dependent packages count: 3.1%
Dependent repos count: 4.9%
Average: 9.8%
Forks count: 13.0%
Stargazers count: 18.0%
Last synced: 6 months ago
alpine-v3.10: py2-httplib2

Python HTTP client library (for python2)

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Forks count: 4.1%
Stargazers count: 5.9%
Average: 9.9%
Dependent packages count: 29.6%
Last synced: 6 months ago
alpine-v3.22: py3-httplib2-pyc

Precompiled Python bytecode for py3-httplib2

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Last synced: 6 months ago
alpine-v3.21: py3-httplib2-pyc

Precompiled Python bytecode for py3-httplib2

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Last synced: 6 months ago
alpine-v3.19: py3-httplib2-pyc

Precompiled Python bytecode for py3-httplib2

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Last synced: 6 months ago
alpine-v3.19: py3-httplib2

Python3 HTTP client library

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Last synced: 6 months ago
alpine-v3.22: py3-httplib2

Python3 HTTP client library

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Last synced: 6 months ago
alpine-v3.20: py3-httplib2

Python3 HTTP client library

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Last synced: 6 months ago
alpine-v3.20: py3-httplib2-pyc

Precompiled Python bytecode for py3-httplib2

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Last synced: 6 months ago
alpine-v3.21: py3-httplib2

Python3 HTTP client library

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Last synced: 6 months ago

Dependencies

requirements-test.txt pypi
  • cryptography ==35.0.0 test
  • flake8 ==3.9.2 test
  • future ==0.16.0 test
  • mock ==2.0.0 test
  • pytest ==6.1.2 test
  • pytest ==4.6.11 test
  • pytest ==6.2.5 test
  • pytest-cov ==2.12.1 test
  • pytest-forked ==1.3.0 test
  • pytest-randomly ==1.2.3 test
  • pytest-timeout ==1.4.2 test
  • pytest-xdist ==1.34.0 test
  • six ==1.10.0 test
requirements.txt pypi
  • pyparsing >=2.4.2,<3
  • pyparsing >=2.4.2,<4,
.github/workflows/publish.yaml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • actions/download-artifact v2 composite
  • actions/setup-python v2 composite
  • actions/upload-artifact v2 composite
.github/workflows/style.yaml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
.github/workflows/test.yaml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
pyproject.toml pypi
setup.py pypi