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.6.tar.gz
(3.2 kB
view hashes)
Built Distribution
Close
Hashes for api_nichotined-0.1.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8cbb4fd23cdfa8ce9f53c89084c9de8e0b27980479678498843936fcb6c61b7f |
|
MD5 | 6080323fd89ebf827b1827fbb256cf82 |
|
BLAKE2b-256 | 812885d62f8ae55ded621ab02c08cd06de105b7def3f59417f36bc948ca0788f |