GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - python-trio/hip: A new Python HTTP client for everybody

This repository was archived by the owner on Apr 14, 2022. It is now read-only.
BranchesTags
Open more actions menu

Latest commit

 

History

4,096 Commits
4,096 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
ci
ci
 
 
demo
demo
 
 
docs
docs
 
 
dummyserver
dummyserver
 
 
src/ahip
src/ahip
 
 
test
test
 
 
.gitignore
.gitignore
 
 
.readthedocs.yml
.readthedocs.yml
 
 
.travis.yml
.travis.yml
 
 
CHANGES.rst
CHANGES.rst
 
 
LICENSE
LICENSE
 
 
LICENSE.APACHE2
LICENSE.APACHE2
 
 
LICENSE.MIT
LICENSE.MIT
 
 
MANIFEST.in
MANIFEST.in
 
 
README.rst
README.rst
 
 
codecov.yml
codecov.yml
 
 
dev-requirements.txt
dev-requirements.txt
 
 
notes.org
notes.org
 
 
noxfile.py
noxfile.py
 
 
pyproject.toml
pyproject.toml
 
 
setup.cfg
setup.cfg
 
 
setup.py
setup.py
 
 

Repository files navigation

Hip

Build status on Travis Build status on GitHub Actions Coverage Status PyPI version Gitter

Hip is a new Python HTTP client for everybody. It supports synchronous Python (just like requests does), but also Trio, asyncio and Curio.

Important

Hip is still in its early days, use at your own risk! In particular, the async support is still experimental and untested.

Hip is robust as it is based on urllib3 and uses its extensive test suite that was refined over the years. It also shares most urllib3 features:

  • Thread safety.
  • Connection pooling.
  • Client-side SSL/TLS verification.
  • File uploads with multipart encoding.
  • Helpers for retrying requests and dealing with HTTP redirects.
  • Support for gzip, deflate, and brotli encoding.
  • Proxy support for HTTP.
  • 100% test coverage.

However, we currently do not support SOCKS proxies nor the pyOpenSSL and SecureTransport TLS backends.

Sample code

Hip is powerful and easy to use:

>>> import hip
>>> http = hip.PoolManager()
>>> r = http.request('GET', 'http://httpbin.org/robots.txt')
>>> r.status
200
>>> r.data
'User-agent: *\nDisallow: /deny\n'

It also supports async/await:

import ahip
import trio

async def main():
    with ahip.PoolManager() as http:
        r = await http.request("GET", "http://httpbin.org/uuid")
        print("Status:", r.status)  # 200
        print("Data:", r.data) # 'User-agent: *\nDisallow: /deny\n'

trio.run(main)

Installing

Hip can be installed with pip:

$ python -m pip install hip

Alternatively, you can grab the latest source code from GitHub:

$ python -m pip install git+https://github.com/python-trio/hip

- OR -

$ git clone git://github.com/python-trio/hip.git
$ cd hip && python setup.py install

Documentation

Hip will soon have usage and reference documentation at hip.readthedocs.io.

Contributing

Hip happily accepts contributions. Please see our contributing documentation for some tips on getting started.

About

A new Python HTTP client for everybody

Resources

Readme

Contributing

Contributing
Activity
Custom properties

Stars

84 stars

Watchers

5 watching

Forks

18 forks
Report repository

Releases

Sponsor this project

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.