Skip to content

Latest commit

 

History

History
45 lines (31 loc) · 1.26 KB

usage.rst

File metadata and controls

45 lines (31 loc) · 1.26 KB

Usage Overview

Create an authentication object

Supports:

from requests_api import basic_auth

auth = basic_auth("username", "supersecurepassword")

Create Requests object

from requests_api import Requests

r = Requests("whatever.example.com", auth)
response = r.get("some/api/path/here", query_params={"fields": "something"})

User's can also restrict the keys provided in the response with the following:

from requests_api import Requests

r = Requests("whatever.example.com", auth)
response = r.get("some/api/path/here", query_params={"fields": "something"}, search_keys=["name1", "name2"])