Skip to main content

Wrapper around http.client

Project description

ethanypc-simplerequest

A simpler API built on top of Python's http.client.

Support for Python 3 only.

Install

# from pypi
pip install ethanypc-simplerequest

# from testpypi
pip install -i https://test.pypi.org/simple/ ethanypc-simplerequest

Usage

import simplehttp

r = simplehttp.get_json("https://httpbin.org/get")
assert r["args"] == {}  

r2 = simplehttp.get_json("https://httpbin.org/get?debug=true",
				 params={"name": "常⾒見見問題 Q&A"})
assert r2["args"] == {"debug": "true", "name": "常⾒見見問題 Q&A"}


data = {"isbn": "9789863479116", "title": u"流暢的 Python"}
r3 = simplehttp.post_json("https://httpbin.org/post",
			 params={"debug": "true"}, data=data)
assert r3["args"] == {"debug": "true"}
assert json.loads(r3["json"]) == data

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ethanypc-simplerequest-1.0.3.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ethanypc_simplerequest-1.0.3-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file ethanypc-simplerequest-1.0.3.tar.gz.

File metadata

  • Download URL: ethanypc-simplerequest-1.0.3.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.1 CPython/3.7.1

File hashes

Hashes for ethanypc-simplerequest-1.0.3.tar.gz
Algorithm Hash digest
SHA256 50f34a8bdad9e824872cbfe885b3868197d0b1e8e234dfe5baef366c70123244
MD5 c56cad9e289a6ad68c18892fcfb5f98d
BLAKE2b-256 6fcb9041e40e4002c9ce074415a41772c08fef0c8066ec8ff53938a0183feea9

See more details on using hashes here.

File details

Details for the file ethanypc_simplerequest-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: ethanypc_simplerequest-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.1 CPython/3.7.1

File hashes

Hashes for ethanypc_simplerequest-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 466c817c039bb3daf7068b475de0b348327a992a2a3b4c864ac8a3f2403b8239
MD5 7e4256c39c8282c7f45400afdeb4b19a
BLAKE2b-256 5eb1f7b8ed66076fcf4cb3c47060e44b429dfc990b09576db9bcf2e96dab02cd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page