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.0.tar.gz
(2.9 kB
view hashes)
Built Distribution
Close
Hashes for api_calls-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03e9b639fcced7420c9134915f7c42dd131d2aee1d805461dd5e5f2275f429d2 |
|
MD5 | 6adc0e3827794426a0b6948f85d8805e |
|
BLAKE2b-256 | 768b478cc9f05a309e22c9ae54cf08c936a009c87d063cf4bfe0ab578dd292b3 |