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.9.tar.gz
(3.5 kB
view hashes)
Built Distribution
Close
Hashes for api_nichotined-0.1.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 664780fa672c5f7e79a7ae2a285db36b7500441b3078e4d2ce8f1dc01d2e39a7 |
|
MD5 | fb0fd679c0d641d8fb48f2b8fa66877a |
|
BLAKE2b-256 | e44ffe39ca1ba31e7c0da00e7765827e158262ce3b7d1ccffc8efba6ffa2ef40 |