Skip to main content

Http client with base_url base on requests

Project description

requests-base-url

Languate - Python PyPI - License PyPI PyPI - Downloads

Http client with base_url base on requests

Install

pip install requests-base-url

Simple Use

from requests_base_url import http

resp = http.get('https://httpbin.org/get?a=1&b=2')
print(resp)

Config base_url

from requests_base_url import HTTP

http = HTTP(basse_url='https://httpbin.org')
resp = http.get('/get?a=1&b=2')
print(resp)

resp = http.post('/post', data=dict(a=1, b=2))
print(resp)

Config default Headers, Params or Proxies

from requests_base_url import HTTP

http = HTTP(basse_url='https://httpbin.org', headers={"token": "xxx"})
resp = http.get('/get?a=1&b=2')
print(resp)

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

requests_base_url-0.1.0.tar.gz (3.2 kB view details)

Uploaded Source

File details

Details for the file requests_base_url-0.1.0.tar.gz.

File metadata

  • Download URL: requests_base_url-0.1.0.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.6

File hashes

Hashes for requests_base_url-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b55b16647f8ff73a351ff2398741aa37476d6f3cbd08c69d7a50c0217479e30d
MD5 3275668917aaa5d453eebf68262ae291
BLAKE2b-256 a4c6154635300bb692a9a13bc72c32e0f363d55eaa826c54aaf664e0366e90d6

See more details on using hashes here.

Supported by

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