pyinsales


Namepyinsales JSON
Version 1.8.1 PyPI version JSON
download
home_pageNone
SummaryInSales e-commerce platform API bindings
upload_time2024-07-13 12:54:44
maintainerNone
docs_urlNone
authorNone
requires_python>=3.6
licenseNone
keywords insales api bindings
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            pyinsales — это набор биндингов для API популярной e-commerce платформы InSales,
целью которого является облегчение разработки дополнений к платформе на Python’е.

Биндинги выделены из приложения [Incrates](http://incrates.ru), для которого они были
созданы изначально. Они достаточно низкоуровневые и универсальные, поэтому и были
выделены в отдельный Open Source проект.

Установка
---------

`$ pip install pyinsales`

Зависимости
-----------

 * iso8601 для работы с датами

Быстродействие
--------------

Самое узкое место — разбор входящего XML. Оно было многократно оптимизировано и сейчас
основывается на высокоскоростном парсере Expat, написанном на C и работающем по модели
SAX.

Таким образом даже обработка гигантского потока данных не отнимет большого количества
памяти и вычислительных ресурсов.

Примеры
-------

```python
>>> from pprint import pprint
>>> from insales import InSalesApi

>>> api = InSalesApi.from_credentials('your-account-name', 'your-api-key', 'your-api-pass')

>>> orders = api.get_orders(per_page=2, page=3)
>>> pprint(orders)
... [{u'accepted-at': None,
...   u'id': 749627,
...   u'client': {u'client-group-id': None,
...               u'created-at': datetime.datetime(2012, 8, 11, 14, 21, 21, tzinfo=<FixedOffset u'+04:00'>),
...               u'email': None,
...               u'fields-values': [],
...               u'id': 696407,
...               u'middlename': None,
...               u'name': u'Вася Пупкин',
...               u'phone': u'+79031034423',
...               u'registered': False,
...               u'subscribe': True,
...               u'surname': None,
...               u'updated-at': datetime.datetime(2012, 8, 11, 14, 21, 21, tzinfo=<FixedOffset u'+04:00'>)},
...   u'comment': None,
...   u'created-at': datetime.datetime(2012, 8, 11, 14, 21, 21, tzinfo=<FixedOffset u'+04:00'>),
...   u'delivered-at': None,
...   u'delivery-date': None,
...   u'delivery-description': u'Почта России',
... # ...

>>> order = api.create_order({
...     'client': {
...         'phone': '+70000000000',
...         'name': u'Вася',
...     },
...     'order-lines-attributes': [{
...         'variant-id': 4274495,
...         'quantity': 3,
...     }],
...     'payment-gateway-id': 79172,
...     'delivery-variant-id': 21797,
... })

>>> pprint(order)
... [{u'accepted-at': None,
...   u'id': 749629,
...   u'client': {u'client-group-id': None,
...               u'created-at': datetime.datetime(2012, 8, 11, 14, 23, 24, tzinfo=<FixedOffset u'+04:00'>),
...               u'email': None,
...               u'fields-values': [],
...               u'id': 696412,
...               u'middlename': None,
...               u'name': u'Вася Пупкин',
...               u'phone': u'+7000000000',
...               u'registered': False,
...               u'subscribe': True,
...               u'surname': None,
...               u'updated-at': datetime.datetime(2012, 8, 11, 14, 23, 24, tzinfo=<FixedOffset u'+04:00'>)},
...   u'comment': None,
...   u'created-at': datetime.datetime(2012, 8, 11, 14, 23, 24, tzinfo=<FixedOffset u'+04:00'>),
...   u'delivered-at': None,
...   u'delivery-date': None,
...   u'delivery-description': u'Почта России',
... # ...

>>> order = api.update_order(749629, {
...     'fulfillment-status': 'accepted',
...     'order-lines-attributes': [{
...         'variant-id': 4274495,
...         'quantity': 2,
...     }],
... })

>>> pprint(order)
... [{u'accepted-at': datetime.datetime(2012, 8, 11, 14, 24, 47, tzinfo=<FixedOffset u'+04:00'>),
...   u'id': 749629,
...   u'client': {u'client-group-id': None,
...               u'created-at': datetime.datetime(2012, 8, 11, 14, 23, 24, tzinfo=<FixedOffset u'+04:00'>),
...               u'email': None,
...               u'fields-values': [],
...               u'id': 696412,
...               u'middlename': None,
...               u'name': u'Вася Пупкин',
...               u'phone': u'+7000000000',
...               u'registered': False,
...               u'subscribe': True,
...               u'surname': None,
...               u'updated-at': datetime.datetime(2012, 8, 11, 14, 23, 24, tzinfo=<FixedOffset u'+04:00'>)},
...   u'comment': None,
...   u'created-at': datetime.datetime(2012, 8, 11, 14, 23, 24, tzinfo=<FixedOffset u'+04:00'>),
...   u'delivered-at': None,
...   u'delivery-date': None,
...   u'delivery-description': u'Почта России',
... # ...

>>> api.delete_order(749629)
```

Философия
---------

 * Все ответы от InSales возвращаются как вложенные структуры данных с правильной типизацией.
   Для дат используется `datetime`, для вещественных чисел — `Decimal` и т.д.
 * Все строковые значения в возвращаемых ответах приводятся к `unicode`
 * Все методы для обновления и создания объектов принимают произвольные
   структуры данных. То есть имена и набор полей в них никак не форсируются
   со стороны pyinsales. Это обеспечивает прямую совместимость с возможными будущими нововведениями InSales
   За документацией о необходимых и допустимых параметрах следует обращаться на
   [InSales API Wiki](http://wiki.insales.ru/wiki/%D0%9A%D0%BE%D0%BC%D0%B0%D0%BD%D0%B4%D1%8B_API)
 * Все передаваемые в параметрах строки могут быть как `unicode`, так и `str` в кодировке UTF-8
 * Все передаваемые для get-запросов аргументов приводятся к строкам должным образом. В том
   числе `datetime` переводятся в строковый формат, принятый в InSales
 * Если метод должен возвращать список объектов (заказы, товары и т.п.), и этот список оказывается
   пустым, метод возвращает `[]`, не `None`

Методы InSalesApi
-----------------

Для параметров суффикс `_id` означает ID объекта на платформе InSales. Он
может быть или `int` или строкой. Суффикс `_data` означает вложенную структуру
данных из словарей и списков, точный формат которой определяется
REST-endpoint’ом со стороны InSales для данного конкретного метода.

```python
#========================================================================
# Заказы
#========================================================================
get_orders(self, per_page=25, page=1, updated_since=None):
get_order(self, order_id):
update_order(self, order_id, order_data):
delete_order(self, order_id):
create_order(self, order_data):
get_order_delivery_variants(self, order_data):
get_order_payment_gateways(self, order_data):

#========================================================================
# Поля заказов
#========================================================================
get_orders_fields(self):

#========================================================================
# Категории на складе
#========================================================================
get_categories(self):
get_category(self, category_id):
add_category(self, category_data):
update_category(self, category_id, category_data):
delete_category(self, category_id):

#========================================================================
# Категории на сайте
#========================================================================
get_collections(self):
get_collection(self, collection_id):
add_collection(self, collection_data):
update_collection(self, collection_id, collection_data):
delete_collection(self, collection_id):

#========================================================================
# Свойства товаров
#========================================================================
get_option_names(self):
get_option_name(self, option_name_id):
add_option_name(self, option_name):
update_option_name(self, option_name_id, option_name_data):
delete_option_name(self, option_name_id):

#========================================================================
# Значения свойств
#========================================================================
get_option_values(self, option_name_id=None):
get_option_value(self, option_name_id, option_value_id):
add_option_value(self, option_name_id, option_value_data):
update_option_value(self, option_name_id, option_value_id, option_value_data):
delete_option_value(self, option_name_id, option_value_id):

#========================================================================
# Товары
#========================================================================
get_products(self, limit=50, page=1, updated_since=None):
get_product(self, product_id):
add_product(self, product_data):
update_product(self, product_id, product_data):
delete_product(self, product_id):

#========================================================================
# Модификации товаров
#========================================================================
get_product_variants(self, product_id):
get_product_variant(self, product_id, variant_id):
add_product_variant(self, product_id, variant_data):
update_product_variant(self, product_id, variant_id, variant_data):
delete_product_variant(self, product_id, variant_id):

#========================================================================
# Изображения товара
#========================================================================
get_product_images(self, product_id):
get_product_image(self, product_id, image_id):
add_product_image(self, product_id, image_data):
update_product_image(self, product_id, image_id, image_data):
delete_product_image(self, product_id, image_id):

#========================================================================
# Размещение товара
#========================================================================
get_collects(self, product_id=None, collection_id=None):
add_collect(self, collect_data):
update_collect(self, collect_id, collect_data):
delete_collect(self, collect_id):

#========================================================================
# Веб-хуки
#========================================================================
get_webhooks(self):
get_webhook(self, webhook_id):
add_webhook(self, webhook):
update_webhook(self, webhook_id, webhook_data):
delete_webhook(self, webhook_id):

#========================================================================
# Биллинг
#========================================================================
get_recurring_application_charge(self):
add_recurring_application_charge(self, recurring_application_charge_data):
update_recurring_application_charge(self, recurring_application_charge_data):
```

Лицензия
--------

pyinsales распространяется на условиях лицензии MIT.

Автор
-----

Виктор Накоряков ([nailxx](https://github.com/nailxx))


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pyinsales",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "insales, API, bindings",
    "author": null,
    "author_email": "Victor Nakoryakov <nail.xx@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/b6/50/ad6b56c71fd5143d221d00986cacbcbde6fe714a64af22c82dd4e096e2a6/pyinsales-1.8.1.tar.gz",
    "platform": null,
    "description": "pyinsales \u2014 \u044d\u0442\u043e \u043d\u0430\u0431\u043e\u0440 \u0431\u0438\u043d\u0434\u0438\u043d\u0433\u043e\u0432 \u0434\u043b\u044f API \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0439 e-commerce \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b InSales,\n\u0446\u0435\u043b\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0431\u043b\u0435\u0433\u0447\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0439 \u043a \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 \u043d\u0430 Python\u2019\u0435.\n\n\u0411\u0438\u043d\u0434\u0438\u043d\u0433\u0438 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u044b \u0438\u0437 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f [Incrates](http://incrates.ru), \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043e\u043d\u0438 \u0431\u044b\u043b\u0438\n\u0441\u043e\u0437\u0434\u0430\u043d\u044b \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e. \u041e\u043d\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u0435 \u0438 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438 \u0431\u044b\u043b\u0438\n\u0432\u044b\u0434\u0435\u043b\u0435\u043d\u044b \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 Open Source \u043f\u0440\u043e\u0435\u043a\u0442.\n\n\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430\n---------\n\n`$ pip install pyinsales`\n\n\u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438\n-----------\n\n * iso8601 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u0442\u0430\u043c\u0438\n\n\u0411\u044b\u0441\u0442\u0440\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435\n--------------\n\n\u0421\u0430\u043c\u043e\u0435 \u0443\u0437\u043a\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u2014 \u0440\u0430\u0437\u0431\u043e\u0440 \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e XML. \u041e\u043d\u043e \u0431\u044b\u043b\u043e \u043c\u043d\u043e\u0433\u043e\u043a\u0440\u0430\u0442\u043d\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0438 \u0441\u0435\u0439\u0447\u0430\u0441\n\u043e\u0441\u043d\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0432\u044b\u0441\u043e\u043a\u043e\u0441\u043a\u043e\u0440\u043e\u0441\u0442\u043d\u043e\u043c \u043f\u0430\u0440\u0441\u0435\u0440\u0435 Expat, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u043c \u043d\u0430 C \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0435\u043c \u043f\u043e \u043c\u043e\u0434\u0435\u043b\u0438\nSAX.\n\n\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0434\u0430\u0436\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0433\u0438\u0433\u0430\u043d\u0442\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0435 \u043e\u0442\u043d\u0438\u043c\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430\n\u043f\u0430\u043c\u044f\u0442\u0438 \u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432.\n\n\u041f\u0440\u0438\u043c\u0435\u0440\u044b\n-------\n\n```python\n>>> from pprint import pprint\n>>> from insales import InSalesApi\n\n>>> api = InSalesApi.from_credentials('your-account-name', 'your-api-key', 'your-api-pass')\n\n>>> orders = api.get_orders(per_page=2, page=3)\n>>> pprint(orders)\n... [{u'accepted-at': None,\n...   u'id': 749627,\n...   u'client': {u'client-group-id': None,\n...               u'created-at': datetime.datetime(2012, 8, 11, 14, 21, 21, tzinfo=<FixedOffset u'+04:00'>),\n...               u'email': None,\n...               u'fields-values': [],\n...               u'id': 696407,\n...               u'middlename': None,\n...               u'name': u'\u0412\u0430\u0441\u044f \u041f\u0443\u043f\u043a\u0438\u043d',\n...               u'phone': u'+79031034423',\n...               u'registered': False,\n...               u'subscribe': True,\n...               u'surname': None,\n...               u'updated-at': datetime.datetime(2012, 8, 11, 14, 21, 21, tzinfo=<FixedOffset u'+04:00'>)},\n...   u'comment': None,\n...   u'created-at': datetime.datetime(2012, 8, 11, 14, 21, 21, tzinfo=<FixedOffset u'+04:00'>),\n...   u'delivered-at': None,\n...   u'delivery-date': None,\n...   u'delivery-description': u'\u041f\u043e\u0447\u0442\u0430 \u0420\u043e\u0441\u0441\u0438\u0438',\n... # ...\n\n>>> order = api.create_order({\n...     'client': {\n...         'phone': '+70000000000',\n...         'name': u'\u0412\u0430\u0441\u044f',\n...     },\n...     'order-lines-attributes': [{\n...         'variant-id': 4274495,\n...         'quantity': 3,\n...     }],\n...     'payment-gateway-id': 79172,\n...     'delivery-variant-id': 21797,\n... })\n\n>>> pprint(order)\n... [{u'accepted-at': None,\n...   u'id': 749629,\n...   u'client': {u'client-group-id': None,\n...               u'created-at': datetime.datetime(2012, 8, 11, 14, 23, 24, tzinfo=<FixedOffset u'+04:00'>),\n...               u'email': None,\n...               u'fields-values': [],\n...               u'id': 696412,\n...               u'middlename': None,\n...               u'name': u'\u0412\u0430\u0441\u044f \u041f\u0443\u043f\u043a\u0438\u043d',\n...               u'phone': u'+7000000000',\n...               u'registered': False,\n...               u'subscribe': True,\n...               u'surname': None,\n...               u'updated-at': datetime.datetime(2012, 8, 11, 14, 23, 24, tzinfo=<FixedOffset u'+04:00'>)},\n...   u'comment': None,\n...   u'created-at': datetime.datetime(2012, 8, 11, 14, 23, 24, tzinfo=<FixedOffset u'+04:00'>),\n...   u'delivered-at': None,\n...   u'delivery-date': None,\n...   u'delivery-description': u'\u041f\u043e\u0447\u0442\u0430 \u0420\u043e\u0441\u0441\u0438\u0438',\n... # ...\n\n>>> order = api.update_order(749629, {\n...     'fulfillment-status': 'accepted',\n...     'order-lines-attributes': [{\n...         'variant-id': 4274495,\n...         'quantity': 2,\n...     }],\n... })\n\n>>> pprint(order)\n... [{u'accepted-at': datetime.datetime(2012, 8, 11, 14, 24, 47, tzinfo=<FixedOffset u'+04:00'>),\n...   u'id': 749629,\n...   u'client': {u'client-group-id': None,\n...               u'created-at': datetime.datetime(2012, 8, 11, 14, 23, 24, tzinfo=<FixedOffset u'+04:00'>),\n...               u'email': None,\n...               u'fields-values': [],\n...               u'id': 696412,\n...               u'middlename': None,\n...               u'name': u'\u0412\u0430\u0441\u044f \u041f\u0443\u043f\u043a\u0438\u043d',\n...               u'phone': u'+7000000000',\n...               u'registered': False,\n...               u'subscribe': True,\n...               u'surname': None,\n...               u'updated-at': datetime.datetime(2012, 8, 11, 14, 23, 24, tzinfo=<FixedOffset u'+04:00'>)},\n...   u'comment': None,\n...   u'created-at': datetime.datetime(2012, 8, 11, 14, 23, 24, tzinfo=<FixedOffset u'+04:00'>),\n...   u'delivered-at': None,\n...   u'delivery-date': None,\n...   u'delivery-description': u'\u041f\u043e\u0447\u0442\u0430 \u0420\u043e\u0441\u0441\u0438\u0438',\n... # ...\n\n>>> api.delete_order(749629)\n```\n\n\u0424\u0438\u043b\u043e\u0441\u043e\u0444\u0438\u044f\n---------\n\n * \u0412\u0441\u0435 \u043e\u0442\u0432\u0435\u0442\u044b \u043e\u0442 InSales \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442\u0441\u044f \u043a\u0430\u043a \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u0435\u0439.\n   \u0414\u043b\u044f \u0434\u0430\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f `datetime`, \u0434\u043b\u044f \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u2014 `Decimal` \u0438 \u0442.\u0434.\n * \u0412\u0441\u0435 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0445 \u043e\u0442\u0432\u0435\u0442\u0430\u0445 \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043a `unicode`\n * \u0412\u0441\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0434\u043b\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0435\n   \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445. \u0422\u043e \u0435\u0441\u0442\u044c \u0438\u043c\u0435\u043d\u0430 \u0438 \u043d\u0430\u0431\u043e\u0440 \u043f\u043e\u043b\u0435\u0439 \u0432 \u043d\u0438\u0445 \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0444\u043e\u0440\u0441\u0438\u0440\u0443\u044e\u0442\u0441\u044f\n   \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b pyinsales. \u042d\u0442\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u044f\u043c\u0443\u044e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c\u0438 \u0431\u0443\u0434\u0443\u0449\u0438\u043c\u0438 \u043d\u043e\u0432\u043e\u0432\u0432\u0435\u0434\u0435\u043d\u0438\u044f\u043c\u0438 InSales\n   \u0417\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0435\u0439 \u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0438 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043d\u0430\n   [InSales API Wiki](http://wiki.insales.ru/wiki/%D0%9A%D0%BE%D0%BC%D0%B0%D0%BD%D0%B4%D1%8B_API)\n * \u0412\u0441\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0435 \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445 \u0441\u0442\u0440\u043e\u043a\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043a\u0430\u043a `unicode`, \u0442\u0430\u043a \u0438 `str` \u0432 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0435 UTF-8\n * \u0412\u0441\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0435 \u0434\u043b\u044f get-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043a \u0441\u0442\u0440\u043e\u043a\u0430\u043c \u0434\u043e\u043b\u0436\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c. \u0412 \u0442\u043e\u043c\n   \u0447\u0438\u0441\u043b\u0435 `datetime` \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442, \u043f\u0440\u0438\u043d\u044f\u0442\u044b\u0439 \u0432 InSales\n * \u0415\u0441\u043b\u0438 \u043c\u0435\u0442\u043e\u0434 \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 (\u0437\u0430\u043a\u0430\u0437\u044b, \u0442\u043e\u0432\u0430\u0440\u044b \u0438 \u0442.\u043f.), \u0438 \u044d\u0442\u043e\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f\n   \u043f\u0443\u0441\u0442\u044b\u043c, \u043c\u0435\u0442\u043e\u0434 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 `[]`, \u043d\u0435 `None`\n\n\u041c\u0435\u0442\u043e\u0434\u044b InSalesApi\n-----------------\n\n\u0414\u043b\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0441\u0443\u0444\u0444\u0438\u043a\u0441 `_id` \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 ID \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043d\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 InSales. \u041e\u043d\n\u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u043b\u0438 `int` \u0438\u043b\u0438 \u0441\u0442\u0440\u043e\u043a\u043e\u0439. \u0421\u0443\u0444\u0444\u0438\u043a\u0441 `_data` \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443\n\u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0441\u043b\u043e\u0432\u0430\u0440\u0435\u0439 \u0438 \u0441\u043f\u0438\u0441\u043a\u043e\u0432, \u0442\u043e\u0447\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f\nREST-endpoint\u2019\u043e\u043c \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b InSales \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430.\n\n```python\n#========================================================================\n# \u0417\u0430\u043a\u0430\u0437\u044b\n#========================================================================\nget_orders(self, per_page=25, page=1, updated_since=None):\nget_order(self, order_id):\nupdate_order(self, order_id, order_data):\ndelete_order(self, order_id):\ncreate_order(self, order_data):\nget_order_delivery_variants(self, order_data):\nget_order_payment_gateways(self, order_data):\n\n#========================================================================\n# \u041f\u043e\u043b\u044f \u0437\u0430\u043a\u0430\u0437\u043e\u0432\n#========================================================================\nget_orders_fields(self):\n\n#========================================================================\n# \u041a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u043d\u0430 \u0441\u043a\u043b\u0430\u0434\u0435\n#========================================================================\nget_categories(self):\nget_category(self, category_id):\nadd_category(self, category_data):\nupdate_category(self, category_id, category_data):\ndelete_category(self, category_id):\n\n#========================================================================\n# \u041a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435\n#========================================================================\nget_collections(self):\nget_collection(self, collection_id):\nadd_collection(self, collection_data):\nupdate_collection(self, collection_id, collection_data):\ndelete_collection(self, collection_id):\n\n#========================================================================\n# \u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0442\u043e\u0432\u0430\u0440\u043e\u0432\n#========================================================================\nget_option_names(self):\nget_option_name(self, option_name_id):\nadd_option_name(self, option_name):\nupdate_option_name(self, option_name_id, option_name_data):\ndelete_option_name(self, option_name_id):\n\n#========================================================================\n# \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0432\u043e\u0439\u0441\u0442\u0432\n#========================================================================\nget_option_values(self, option_name_id=None):\nget_option_value(self, option_name_id, option_value_id):\nadd_option_value(self, option_name_id, option_value_data):\nupdate_option_value(self, option_name_id, option_value_id, option_value_data):\ndelete_option_value(self, option_name_id, option_value_id):\n\n#========================================================================\n# \u0422\u043e\u0432\u0430\u0440\u044b\n#========================================================================\nget_products(self, limit=50, page=1, updated_since=None):\nget_product(self, product_id):\nadd_product(self, product_data):\nupdate_product(self, product_id, product_data):\ndelete_product(self, product_id):\n\n#========================================================================\n# \u041c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0442\u043e\u0432\u0430\u0440\u043e\u0432\n#========================================================================\nget_product_variants(self, product_id):\nget_product_variant(self, product_id, variant_id):\nadd_product_variant(self, product_id, variant_data):\nupdate_product_variant(self, product_id, variant_id, variant_data):\ndelete_product_variant(self, product_id, variant_id):\n\n#========================================================================\n# \u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0442\u043e\u0432\u0430\u0440\u0430\n#========================================================================\nget_product_images(self, product_id):\nget_product_image(self, product_id, image_id):\nadd_product_image(self, product_id, image_data):\nupdate_product_image(self, product_id, image_id, image_data):\ndelete_product_image(self, product_id, image_id):\n\n#========================================================================\n# \u0420\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0442\u043e\u0432\u0430\u0440\u0430\n#========================================================================\nget_collects(self, product_id=None, collection_id=None):\nadd_collect(self, collect_data):\nupdate_collect(self, collect_id, collect_data):\ndelete_collect(self, collect_id):\n\n#========================================================================\n# \u0412\u0435\u0431-\u0445\u0443\u043a\u0438\n#========================================================================\nget_webhooks(self):\nget_webhook(self, webhook_id):\nadd_webhook(self, webhook):\nupdate_webhook(self, webhook_id, webhook_data):\ndelete_webhook(self, webhook_id):\n\n#========================================================================\n# \u0411\u0438\u043b\u043b\u0438\u043d\u0433\n#========================================================================\nget_recurring_application_charge(self):\nadd_recurring_application_charge(self, recurring_application_charge_data):\nupdate_recurring_application_charge(self, recurring_application_charge_data):\n```\n\n\u041b\u0438\u0446\u0435\u043d\u0437\u0438\u044f\n--------\n\npyinsales \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0438 MIT.\n\n\u0410\u0432\u0442\u043e\u0440\n-----\n\n\u0412\u0438\u043a\u0442\u043e\u0440 \u041d\u0430\u043a\u043e\u0440\u044f\u043a\u043e\u0432 ([nailxx](https://github.com/nailxx))\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "InSales e-commerce platform API bindings",
    "version": "1.8.1",
    "project_urls": {
        "Homepage": "https://github.com/nailxx/pyinsales"
    },
    "split_keywords": [
        "insales",
        " api",
        " bindings"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b650ad6b56c71fd5143d221d00986cacbcbde6fe714a64af22c82dd4e096e2a6",
                "md5": "472799340e6baef78d4e102f096a0745",
                "sha256": "7178a02587b2e6dc8a6ab7576bf831b021a3e7981ee5fd21417874c598f1004f"
            },
            "downloads": -1,
            "filename": "pyinsales-1.8.1.tar.gz",
            "has_sig": false,
            "md5_digest": "472799340e6baef78d4e102f096a0745",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 14080,
            "upload_time": "2024-07-13T12:54:44",
            "upload_time_iso_8601": "2024-07-13T12:54:44.232091Z",
            "url": "https://files.pythonhosted.org/packages/b6/50/ad6b56c71fd5143d221d00986cacbcbde6fe714a64af22c82dd4e096e2a6/pyinsales-1.8.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-13 12:54:44",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "nailxx",
    "github_project": "pyinsales",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "pyinsales"
}
        
Elapsed time: 0.98707s