Skip to main content

SME Service SDK in Python

Project description

SME SDK for Python

Getting Started

Install

pip install 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.1.1.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

cardo_sme_sdk-0.1.1-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cardo-sme-sdk-0.1.1.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.2

File hashes

Hashes for cardo-sme-sdk-0.1.1.tar.gz
Algorithm Hash digest
SHA256 42203e42f9ae305c90decd6beaf8ca61ebc126dc64a2c041a1d63d935d863daf
MD5 701eb093f22e7d9139c52d07a6929b61
BLAKE2b-256 ecf1396db36b5e1896b7ac4a9189ad624181dc0ec21a5bd167a2792d9f6a2afa

See more details on using hashes here.

File details

Details for the file cardo_sme_sdk-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for cardo_sme_sdk-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1118abf3f7a66c17ce55e1d797944dcb3f65ba3fb39f5ac6a29fc3ff30cb6cec
MD5 fbb54645466ef482172e60aa9d3e00d0
BLAKE2b-256 76689261db9030680e4ab758324415fdea0a71a8983b368f70a1921dc2f4faa9

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