# Python SDK for Commercetools

**Author:** Michael van Tellingen  
**Date:** 2018-11-02T12:15:13.376Z  
**Tags:** ecommerce, python, open-source, software-development

Python SDK for Commercetools -- As you might have seen, we have added a new technology to our portfolio: Commercetools . We have been doing e-commerce for many...

# Python SDK for Commercetools

--

As you might have seen, we have added a new technology to our portfolio: [Commercetools](https://commercetools.com/).

We have been doing e-commerce for many years and found Commercetools to be a good fit with our core values as a technology company. Primarily the way it is set up (API-First and Cloud Native) and a focus on the open source ecosystem is what made it really appealing to us.

For our larger deployments we have already introduced our [Terraform Provider along with a Go SDK](/blog/commercetools-terraform-a-match-made-in-heaven). This greatly improves the way we can manage individual Commercetools deployments using Infrastructure-as-Code practices, and proves very useful across our projects.

As Lab Digital is a Python house, we decided to start work on a Python SDK as well, as Commercetools does not have this available. This way we can leverage our years of e-commerce experience with [Oscar Commerce ](http://oscarcommerce.com/)— another Python based Commerce platform, to the full extent with Commercetools.

## Code generation

During the Hackathon we had at Commercetools we briefly talked about code generation, which is a technique that Commercetools uses to support SDK’s in multiple languages from a single source.

Key in this approach is the way that Commercetools documents its API, using a [RAML specification](https://github.com/commercetools/commercetools-api-reference/).

For the Python SDK we followed this approach as well: large parts of the SDK are generated using Pythons Abstract Syntax Tree (AST) module. This makes maintenance easier and allows for a really consistent implementation of the SDK, including Type Annotation for a better developer experience.

## commercetools-python-sdk

At the moment the SDK is not feature complete and it may be a bit rough around the edges. We are currently implementing a couple of Commercetools projects against the SDK, and will be adding broader endpoint-coverage along with those projects.

Documentation is also lacking at the moment (coming soon!). Though we believe the SDK is quite self-explanatory, when you work with the [Commercetools HTTP API documentation](https://docs.commercetools.com/http-api.html).

If there are endpoints missing that you need right away, don’t hesitate to submit a Pull Request or open a ticket for it.

You can find the repository at the usual place!