Skip to content

awesome-python/curequests

 
 

Repository files navigation

Curio + Requests: Async HTTP for Humans

travis-ci codecov

The same taste as Requests!

Overview

from curio import run
from curequests import get, post

async def main():
    r = await get('https://httpbin.org/get')
    print(r.json())
    r = await post('https://httpbin.org/post', json={'hello': 'world'})
    print(r.json())

run(main)

Install

Python 3.6+ is required.

pip install curequests

Features

Follow http://docs.python-requests.org/en/master/#the-user-guide

Work in progress, Not production ready!

Quickstart

  • Make a Request
  • Passing Parameters In URLs
  • Response Content
  • Binary Response Content
  • JSON Response Content
  • Custom Headers
  • POST a Multipart-Encoded File
  • Response Status Codes
  • Response Headers
  • Cookies
  • Redirection and History
  • Timeouts
  • Errors and Exceptions

Advanced Usage

  • Session Objects [CuSession]
  • Request and Response Objects [CuResponse]
  • Prepared Requests
  • SSL Cert Verification
  • Client Side Certificates
  • CA Certificates
  • Body Content Workflow
  • Keep-Alive
  • Streaming Uploads
  • Chunk-Encoded Requests
  • POST Multiple Multipart-Encoded Files
  • Event Hooks
  • Custom Authentication
  • Streaming Requests [Async Generator]
  • Proxies
  • Compliance
  • HTTP Verbs
  • Custom Verbs
  • Link Headers
  • Transport Adapters [CuHTTPAdapter]
  • Blocking Or Non-Blocking?
  • Header Ordering
  • Timeouts
  • Authentication

Similar projects

About

Curio + Requests: Async HTTP for Humans

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%