Skip to main content

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


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)

Uploaded Source

Built Distribution

merchant001_sdk-0.0.5-py3-none-any.whl (8.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page