No project description provided
Project description
Merchant001 SDK
Install
Client-only
For PIP
pip3 install merchant001_sdk
For PDM
pdm add merchant001_sdk
With CLI
For PIP
pip3 install merchant001_sdk[cli]
For PDM
pdm add merchant001_sdk[cli]
Use
Client
Sync
from merchant001_sdk.client import Client
with Client(token=...) as client:
# comming soon...
Async
from merchant001_sdk.client import Client
async def main(token: str) -> None:
async with Client(token=token) as client:
# comming soon...
Methods
In this section I use async-only, but you can use sync/async (as in previous 2-level section).
Merchant Healthcheck
from merchant001_sdk.client import Client
async def main(token: str) -> None:
async with Client(token=token, endpoint="https://api.merchant001.io/") as client:
result = await client.get_merchant_healthcheck()
print(result)
On Success:
MerchantHealthcheck(success=True)
On Error (invalid token for example):
ErrorResult(status_code=401, message='Unavailable api token', error='Unauthorized')
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
merchant001-sdk-0.0.5.tar.gz
(5.6 kB
view hashes)
Built Distribution
Close
Hashes for merchant001_sdk-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 627ca71b81e26fe719ce6a5bae4ddd4c2818eb822b37e8b001cd5b55119b9a9c |
|
MD5 | 730d73343795e93ae3c46e640714a93c |
|
BLAKE2b-256 | cc34ce2391f8a15e52b1bc0dd749c94b6547e8ad62d8b540f50a0345ced59f30 |