Requests-API
Usage Overview
Create an authentication object
Supports:
Python
1from requests_api import basic_auth
2
3auth = basic_auth("username", "supersecurepassword")
Create Requests
object
Python
1from requests_api import Requests
2
3r = Requests("whatever.example.com", auth)
4response = r.get("some/api/path/here", query_params={"fields": "something"})
User’s can also restrict the keys provided in the response with the following:
Python
1from requests_api import Requests
2
3r = Requests("whatever.example.com", auth)
4response = r.get("some/api/path/here", query_params={"fields": "something"}, search_keys=["name1", "name2"])
requests-api API
The Requests-API
is a library I created to ease the use of the requests
library for my internal projects.
So I figured why not share it in case it helps someone out.
Installation
Before installation, please make sure you have at least Python 3.6 installed on our system.
Bash
$ pip install requests-api
License
requests-api
is licensed under MIT license. See the LICENSE for more information