Coder Social home page Coder Social logo

curequests's Introduction

Curio + Requests: Async HTTP for Humans

PyPI 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 [CuRequest, CuPreparedRequest]
  • SSL Cert Verification
  • Client Side Certificates
  • CA Certificates
  • Body Content Workflow
  • Keep-Alive
  • Streaming Uploads
  • Chunk-Encoded Requests [Generator / Async Generator]
  • POST Multiple Multipart-Encoded Files
  • Event Hooks
  • Custom Authentication
  • Streaming Requests [Async Generator]
  • Proxies [HTTP&HTTPS, not support SOCKS currently]
  • Compliance
  • HTTP Verbs
  • Custom Verbs
  • Link Headers
  • Transport Adapters [CuHTTPAdapter]
  • Blocking Or Non-Blocking?
  • Header Ordering
  • Timeouts
  • Authentication

How to Contribute

  1. Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug. There is a Contributor Friendly tag for issues that should be ideal for people who are not very familiar with the codebase yet.
  2. Fork the repository on GitHub to start making your changes to the master branch (or branch off of it).
  3. Write a test which shows that the bug was fixed or that the feature works as expected.
  4. Send a pull request and bug the maintainer until it gets merged and published. :) Make sure to add yourself to AUTHORS.md.

Similar projects

curequests's People

Contributors

guyskk avatar pyup-bot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.