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.11.tar.gz
(4.1 kB
view hashes)
Built Distribution
Close
Hashes for api_nichotined-0.1.11-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d09352fa213ba40e9d895196cdd55b53475a0d489a6a0999d5516640389f03aa |
|
MD5 | f99c595194be2b48a81483d0d4268a4a |
|
BLAKE2b-256 | 807e5a339a8ada1f936a58b9f528d6d119d2fab0d1282d4b0a8f443453442f1f |