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 details)
Built Distribution
File details
Details for the file api_calls-1.0.1.tar.gz
.
File metadata
- Download URL: api_calls-1.0.1.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0b797d72ed213f883f71b7d39ed26ab2443a8b323371ce62e2d05037a8f2ebc |
|
MD5 | 50dff676c0186fbd030f297f1c4633a2 |
|
BLAKE2b-256 | 1e319b2fdb01c70d4f190a75ecf24a964328d183936e6e3426206337987d19b8 |
File details
Details for the file api_calls-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: api_calls-1.0.1-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca6078b4e07091e4d35c563bf366bfcbb5a7f281e802c543554ac5d59a71e760 |
|
MD5 | ae368c44526384d0d73f215c0af8bd4f |
|
BLAKE2b-256 | b392f44ee61adb143b1cd3699808d1a93dd89754e6aa89997a6b49ae3c7d9d56 |