requests-base-url


Namerequests-base-url JSON
Version 0.1.0 PyPI version JSON
download
home_pagehttps://github.com/hanzhichao/requests-base-url
SummaryHttp client with base_url base on requests
upload_time2024-08-22 10:12:19
maintainerNone
docs_urlNone
authorHan Zhichao
requires_pythonNone
licenseMIT license
keywords base_url requests http client
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # requests-base-url

![Languate - Python](https://img.shields.io/badge/language-python-blue.svg)
![PyPI - License](https://img.shields.io/pypi/l/requests-base-url)
![PyPI](https://img.shields.io/pypi/v/requests-base-url)
![PyPI - Downloads](https://img.shields.io/pypi/dm/requests-base-url)

Http client with base_url base on requests

## Install
```
pip install requests-base-url
```

## Simple Use

```python
from requests_base_url import http

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

Config base_url 

```python
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
```python
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)
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hanzhichao/requests-base-url",
    "name": "requests-base-url",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "base_url, requests, http client",
    "author": "Han Zhichao",
    "author_email": "superhin@126.com",
    "download_url": "https://files.pythonhosted.org/packages/a4/c6/154635300bb692a9a13bc72c32e0f363d55eaa826c54aaf664e0366e90d6/requests_base_url-0.1.0.tar.gz",
    "platform": null,
    "description": "# requests-base-url\n\n![Languate - Python](https://img.shields.io/badge/language-python-blue.svg)\n![PyPI - License](https://img.shields.io/pypi/l/requests-base-url)\n![PyPI](https://img.shields.io/pypi/v/requests-base-url)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/requests-base-url)\n\nHttp client with base_url base on requests\n\n## Install\n```\npip install requests-base-url\n```\n\n## Simple Use\n\n```python\nfrom requests_base_url import http\n\nresp = http.get('https://httpbin.org/get?a=1&b=2')\nprint(resp)\n```\n\nConfig base_url \n\n```python\nfrom requests_base_url import HTTP\n\nhttp = HTTP(basse_url='https://httpbin.org')\nresp = http.get('/get?a=1&b=2')\nprint(resp)\n\nresp = http.post('/post', data=dict(a=1, b=2))\nprint(resp)\n```\n\n\nConfig default Headers, Params or Proxies\n```python\nfrom requests_base_url import HTTP\n\nhttp = HTTP(basse_url='https://httpbin.org', headers={\"token\": \"xxx\"})\nresp = http.get('/get?a=1&b=2')\nprint(resp)\n```\n",
    "bugtrack_url": null,
    "license": "MIT license",
    "summary": "Http client with base_url base on requests",
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "https://github.com/hanzhichao/requests-base-url"
    },
    "split_keywords": [
        "base_url",
        " requests",
        " http client"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a4c6154635300bb692a9a13bc72c32e0f363d55eaa826c54aaf664e0366e90d6",
                "md5": "3275668917aaa5d453eebf68262ae291",
                "sha256": "b55b16647f8ff73a351ff2398741aa37476d6f3cbd08c69d7a50c0217479e30d"
            },
            "downloads": -1,
            "filename": "requests_base_url-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "3275668917aaa5d453eebf68262ae291",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 3237,
            "upload_time": "2024-08-22T10:12:19",
            "upload_time_iso_8601": "2024-08-22T10:12:19.054716Z",
            "url": "https://files.pythonhosted.org/packages/a4/c6/154635300bb692a9a13bc72c32e0f363d55eaa826c54aaf664e0366e90d6/requests_base_url-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-22 10:12:19",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hanzhichao",
    "github_project": "requests-base-url",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "requests-base-url"
}
        
Elapsed time: 0.31787s