{"id":18930034,"url":"https://github.com/labd/commercetools-python-sdk","last_synced_at":"2025-04-15T15:31:15.244Z","repository":{"id":33456922,"uuid":"147785133","full_name":"labd/commercetools-python-sdk","owner":"labd","description":"Commercetools Python SDK","archived":false,"fork":false,"pushed_at":"2024-04-06T07:08:44.000Z","size":4705,"stargazers_count":17,"open_issues_count":13,"forks_count":16,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-04-08T11:19:42.904Z","etag":null,"topics":["commercetools","commercetools-sdk"],"latest_commit_sha":null,"homepage":"https://commercetools-python-sdk.readthedocs.io/en/latest/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/labd.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-07T07:10:00.000Z","updated_at":"2024-05-02T20:35:50.000Z","dependencies_parsed_at":"2024-11-08T11:51:35.150Z","dependency_job_id":null,"html_url":"https://github.com/labd/commercetools-python-sdk","commit_stats":{"total_commits":726,"total_committers":20,"mean_commits":36.3,"dds":0.6446280991735538,"last_synced_commit":"d31c02475c1d01cb7f87e8bfbe40bdb7bd9d5a97"},"previous_names":[],"tags_count":83,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labd%2Fcommercetools-python-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labd%2Fcommercetools-python-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labd%2Fcommercetools-python-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labd%2Fcommercetools-python-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/labd","download_url":"https://codeload.github.com/labd/commercetools-python-sdk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249097890,"owners_count":21212371,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["commercetools","commercetools-sdk"],"created_at":"2024-11-08T11:36:20.110Z","updated_at":"2025-04-15T15:31:13.582Z","avatar_url":"https://github.com/labd.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":".. start-no-pypi\n\n.. image:: https://github.com/labd/commercetools-python-sdk/workflows/Python%20Tests/badge.svg\n    :target: https://github.com/labd/commercetools-python-sdk/actions\n\n.. image:: http://codecov.io/github/labd/commercetools-python-sdk/coverage.svg?branch=main\n    :target: http://codecov.io/github/labd/commercetools-python-sdk?branch=main\n\n.. image:: https://img.shields.io/pypi/v/commercetools.svg\n    :target: https://pypi.python.org/pypi/commercetools/\n.. image:: https://readthedocs.org/projects/commercetools-python-sdk/badge/?version=latest\n    :target: https://commercetools-python-sdk.readthedocs.io/en/latest/?badge=latest\n    :alt: Documentation Status\n.. end-no-pypi\n\n\nPython SDK for Commercetools\n============================\n\nThis is an unofficial Python SDK for the Commercetools platform. It only\nsupports Python 3.6+ and uses type annotation for an improved development\nexperience.\n\nThe API is generated using the commercetools api RAML file and uses\nmarshmallow for the serialization and deserialization.\n\nInstallation\n------------\n\n    pip install commercetools\n\nExample\n-------\n\n.. code-block:: python\n\n    from commercetools.platform import Client\n\n    client = Client(\n        client_id=\"\u003cyour-client-id\u003e\",\n        client_secret=\"\u003cyour-client-secret\u003e\",\n        scope=[\"\u003cscopes\u003e\"],\n        url=\"https://api.europe-west1.gcp.commercetools.com\",\n        token_url=\"https://auth.europe-west1.gcp.commercetools.com\",\n    )\n\n    product = (\n        client\n        .with_project_key(\"\u003cyour-project-key\u003e\")\n        .products()\n        .with_id(\"00633d11-c5bb-434e-b132-73f7e130b4e3\")\n        .get())\n    print(product)\n\nThe client can also be configured by setting the following environment\nvariables:\n\n.. code-block:: sh\n\n    export CTP_CLIENT_SECRET=\"\u003cclient secret\u003e\"\n    export CTP_CLIENT_ID=\"\u003cclient id\u003e\"\n    export CTP_AUTH_URL=\"https://api.europe-west1.gcp.commercetools.com\"\n    export CTP_API_URL=\"https://auth.europe-west1.gcp.commercetools.com\"\n    export CTP_SCOPES=\"\u003ccomma seperated list of scopes\u003e\"\n\nAnd then constructing a client without arguments:\n\n.. code-block:: python\n\n    from commercetools.platform import Client\n\n    client = Client()\n\n    product = (\n        client\n        .with_project_key(\"\u003cyour-project-key\u003e\")\n        .products()\n        .with_id(\"00633d11-c5bb-434e-b132-73f7e130b4e3\")\n        .get())\n\n    print(product)\n\n\nReleasing\n---------\n\nTo release this package first (pip) install bump2version and update the\nCHANGES file. Then update the version (either major/minor/patch depending on\nthe change)\n\n\n.. code-block:: sh\n\n    bumpversion --tag \u003cmajor,minor,patch\u003e\n\nbumpversion is naive because it string replaces, so do a sanity check it\ndidn't accidentally update a Pypi dependency. If not, push the code:\n\n\n.. code-block:: sh\n\n    git push --follow-tags\n\nWe use GitHub actions so make sure the build succeeds and then go to the tags\ntab (https://github.com/labd/commercetools-python-sdk/tags).\n\nClick the dots to trigger a release action. Copy the changelog items in the\nrelease description and enter the release version. This will upload the\nrelease to PyPi.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flabd%2Fcommercetools-python-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flabd%2Fcommercetools-python-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flabd%2Fcommercetools-python-sdk/lists"}