Skip to main content

SME Service SDK in Python

Project description

SME SDK for Python

Getting Started

Install

pip install -U cardo-sme-sdk

Usage

import sme_sdk

# Create a new api config and s3 config for later use, these objects can be created only once
# in any module and can be reused in other modules.

api_config = sme_sdk.APIConfig(
    host='http://localhost:8000',
    username='username',
    password='password',
)
s3_config = sme_sdk.S3Config(
    access_key_id='access_key_id',
    secret_access_key='secret_access_key',
    bucket_name='bucket_name',
    region_name='region_name',
)

# When you want to use SME API, you need to create an APIClient object using the api_config created before.
data = {'key': 'value'}
with sme_sdk.APIClient(api_config) as client:
    s3client = sme_sdk.S3BlobStorageClient(s3_config)
    batch_result_id = client.create_new_batch(data, s3client)
    result = client.get_batch_result(batch_result_id)

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

cardo-sme-sdk-0.2.0.tar.gz (6.0 kB view details)

Uploaded Source

File details

Details for the file cardo-sme-sdk-0.2.0.tar.gz.

File metadata

  • Download URL: cardo-sme-sdk-0.2.0.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.9.10

File hashes

Hashes for cardo-sme-sdk-0.2.0.tar.gz
Algorithm Hash digest
SHA256 81c2ef5da2ed7cd166c2a83deb71c1602b05a8245897a667547c0b9e52b3f608
MD5 83e9c2b7954385ef11ae9e75fda1b252
BLAKE2b-256 c3f6118699d09b644f1aed23f1eb644e2bf7e9be8bdae7a462ed6f6e15d4a192

See more details on using hashes here.

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