Simple lib for testing rest API
Project description
API-NICHOTINED
A package that will help on creating session upon making rest API request.
Installation:
pip install api-nichotined
Sample usage:
import logging
from api_nichotined import Api, BigQuery
class TestApi(Api):
def __init__(self):
super().__init__("https://restcountries.com")
def get_upload(self):
return self.get(path="/v3.1/name/indonesia")
@classmethod
def init_bigquery(cls):
bq = BigQuery()
bq.authenticate_client_with_json_cred_path("cred.json")
res = bq.get_rows_from(query="""SELECT * FROM `dummy` LIMIT 1000""")
assert type(res[0].column_a) == str
if __name__ == '__main__':
logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s")
response = TestApi().get_upload()
TestApi.init_bigquery()
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_nichotined-0.1.13.tar.gz
(4.8 kB
view hashes)
Built Distribution
Close
Hashes for api_nichotined-0.1.13-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11842f60b9c423ae6b862d88cc6be5b304222bcf55934d54e27bf4d0fe52cda6 |
|
MD5 | 38692a77be9f60c551ae66b5dedf2656 |
|
BLAKE2b-256 | 74e98244558e1330a32ce3fbaef202ea64d4ad575a85e9cbb6a7a52fc02288b0 |