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 details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file api_nichotined-0.1.13.tar.gz.
File metadata
- Download URL: api_nichotined-0.1.13.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc2a829b3b327a8f18d1ff7ba24150796d4a4f0fe3946651b4c54568b5067804
|
|
| MD5 |
48add3f0f00e3c8362c610771e9c2e06
|
|
| BLAKE2b-256 |
7ebbb896d37dfb663f132e910ec12ee1ec911ed78260ce34d3bc63052090fa67
|
File details
Details for the file api_nichotined-0.1.13-py3-none-any.whl.
File metadata
- Download URL: api_nichotined-0.1.13-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
11842f60b9c423ae6b862d88cc6be5b304222bcf55934d54e27bf4d0fe52cda6
|
|
| MD5 |
38692a77be9f60c551ae66b5dedf2656
|
|
| BLAKE2b-256 |
74e98244558e1330a32ce3fbaef202ea64d4ad575a85e9cbb6a7a52fc02288b0
|