Package to make api calls
Project description
API_CALLS
-
This package makes it easy to make api calls in python by abstracing all the logic you'd otherwise use with other packages such as requests
-
This package requires requests 2.31.0 or later versions
-
Example usage below:
from api_calls import ApiCalls class CatService(ApiCalls): base_url = "https://cat-fact.herokuapp.com" timeout = 500 def get_random_cat_fact(self): response = self.make_request( "/facts/random", method="get", params={"amount": 5}) return response data, error = CatService().get_random_cat_fact()
To install, run:
pip install api_calls
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
api_calls-1.0.1.tar.gz
(2.9 kB
view hashes)
Built Distribution
Close
Hashes for api_calls-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca6078b4e07091e4d35c563bf366bfcbb5a7f281e802c543554ac5d59a71e760 |
|
MD5 | ae368c44526384d0d73f215c0af8bd4f |
|
BLAKE2b-256 | b392f44ee61adb143b1cd3699808d1a93dd89754e6aa89997a6b49ae3c7d9d56 |