Skip to main content

SDK for Commercetools

Project description

This is an unofficial Python SDK for the Commercetools platform. It only supports Python 3.6+ and uses type annotation for an improved development experience.

The API is mostly generated using the commercetools api RAML file and uses the attr library for the dataobjects and marshmallow for the serialization and deserialization steps.

Installation

pip install commercetools

Example

from commercetools import Client

client = Client(
    project_key="<your-project-key>",
    client_id="<your-client-id>",
    client_secret="<your-client-secret>",
    scope=["<scopes>"],
    url="https://api.sphere.io",
    token_url="https://auth.sphere.io",
)

product = client.products.get_by_id("00633d11-c5bb-434e-b132-73f7e130b4e3")
print(product)

The client can also be configured by setting the following environment variables:

And then constructing a client without arguments:

from commercetools import Client

client = Client()

product = client.products.get_by_id("00633d11-c5bb-434e-b132-73f7e130b4e3")
print(product)

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

commercetools-1.1.0.tar.gz (238.6 kB view details)

Uploaded Source

Built Distribution

commercetools-1.1.0-py3-none-any.whl (128.6 kB view details)

Uploaded Python 3

File details

Details for the file commercetools-1.1.0.tar.gz.

File metadata

  • Download URL: commercetools-1.1.0.tar.gz
  • Upload date:
  • Size: 238.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.5

File hashes

Hashes for commercetools-1.1.0.tar.gz
Algorithm Hash digest
SHA256 88f19c686f31fa62b4bf2a2c63e8c6379d3482bbce1b093d1c73acf0d1d8e70f
MD5 8901d4c2ef1908f5bb7e1e7bb21361b8
BLAKE2b-256 8aea343b2c8b26053bedad28ce2cc0ce4478eed779a6b15ca71db4863dc8c5f6

See more details on using hashes here.

File details

Details for the file commercetools-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: commercetools-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 128.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.5

File hashes

Hashes for commercetools-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e0f8c3b27d54735f5d9dda6d216717e3f0fbaf998f27c467477eb5a1a9242032
MD5 5eb4e26a352becd5eb4acf585d8bd996
BLAKE2b-256 803bc4c3842d95d3d56f5b94fcc24c575567a8a0f72fe0dfa20315208210a546

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