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.10.tar.gz
(3.6 kB
view hashes)
Built Distribution
Close
Hashes for api_nichotined-0.1.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 980484e04a3b9866d496bab172fd8d223f03e6bac7474b88c4602448d9a04156 |
|
MD5 | cf95d38a5b7220ad915dc6efffe214fe |
|
BLAKE2b-256 | 861c85f0198d8cb94051713cdb8d99de7a009aed4df6db8868256ea78f04afed |