commercetools-ratdev-1.5.1
توضیحات
Ratan's fork of SDK for Commercetools
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | commercetools-ratdev-1.5.1 |
| نام | commercetools-ratdev |
| نسخه کتابخانه | 1.5.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Lab Digital B.V. |
| ایمیل نویسنده | opensource@labdigital.nl |
| آدرس صفحه اصلی | https://github.co/labd/commercetools-python-sdk |
| آدرس اینترنتی | https://pypi.org/project/commercetools-ratdev/ |
| مجوز | MIT |
Python SDK for Commercetools
============================
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
-------
.. code-block:: python
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/oauth/token",
)
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:
.. code-block:: sh
export CTP_PROJECT_KEY="<project key>"
export CTP_CLIENT_SECRET="<client secret>"
export CTP_CLIENT_ID="<client id>"
export CTP_AUTH_URL="https://auth.sphere.io"
export CTP_API_URL="https://api.sphere.io"
export CTP_SCOPES="<comma seperated list of scopes>"
And then constructing a client without arguments:
.. code-block:: python
from commercetools import Client
client = Client()
product = client.products.get_by_id("00633d11-c5bb-434e-b132-73f7e130b4e3")
print(product)
نیازمندی
| مقدار | نام |
|---|---|
| >=2.7.0 | requests |
| - | pytz |
| >=1.0.0 | requests-oauthlib |
| >=18.2.0 | attrs |
| >=3.0.0b17 | marshmallow |
| ==1.4.1 | marshmallow-enum |
| ==1.8.4 | WebOb |
| ==1.10.0 | wrapt |
| ==3.13 | PyYAML |
| ==1.6.1 | astunparse |
| ==18.9b0 | black |
| - | isort |
| >=1.8.1 | Sphinx |
| ==0.4.2 | sphinx-rtd-theme |
| ==1.4.0 | sphinx-autodoc-typehints |
| ==0.3.8 | freezegun |
| ==2.0.0 | mock |
| ==1.0.8 | pretend |
| ==2.5.1 | pytest-cov |
| ==3.1.3 | pytest |
| >=0.7.0 | requests-mock |
| ==4.2.15 | isort |
| ==3.3.0 | flake8 |
| ==0.1.1 | flake8-blind-except |
| ==1.4.0 | flake8-debugger |
| ==0.1.1 | flake8-imports |
| ==0.630 | mypy |
نحوه نصب
نصب پکیج whl commercetools-ratdev-1.5.1:
pip install commercetools-ratdev-1.5.1.whl
نصب پکیج tar.gz commercetools-ratdev-1.5.1:
pip install commercetools-ratdev-1.5.1.tar.gz