PyCDEK3
Библиотека для работы с API транспортной компании СДЭК.
Документация и описание протокола обмена данными доступны по ссылке: https://confluence.cdek.ru/pages/viewpage.action?pageId=15616120
Общая информация об интеграции СДЭК указана на сайте транспортной компании.
Данный репозиторий является форком pycdek, написанного onrik. В отличие от оргинального pycdek, в текущем добавлена поддержка python 3 версии (3.4+), обновление информации для текущей версии API и полное тестирование проекта.
Установка pycdek3:
pip install pycdek3
Пример использования:
Методы не требующие логина и пароля:
from pycdek import Client
MOSCOW_ID = 44
SP_ID = 137
# получение пунктов самовывоза в Москве
for point in Client.get_delivery_points(MOSCOW_ID):
print(point['Code'], point['Address'])
# расчет доставки Москва - Санкт-Петербург одной посылки весом 1кг и габаритами (см) 50x10x20
tariffs = [5, 10, 15, 62, 63, 136] # тарифы склад-склад (самовывоз)
print(Client.get_shipping_cost(MOSCOW_ID, SP_ID, tariffs, goods=[{'weight': 1, 'length': 50, 'width': 10, 'height': 20}]))
# расчет доставки Санкт-Петербург - Москва одной посылки весом 2кг и габаритами (см) 100x10x20
tariffs = [11, 16, 137] # тарифы склад-дверь (доставка курьером)
print(Client.get_shipping_cost(SP_ID, MOSCOW_ID, tariffs, goods=[{'weight': 2, 'length': 100, 'width': 10, 'height': 20}]))
Пример использования методов, требующих логин и пароль с использованием Django моделей, доступен в файле example.py (Для получения логина и пароля необходимо заключить договор с транспортной компанией).
Metadata
Release files for pycdek3 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pycdek3-0.2.0.tar.gz | 7.7 kB | Without provenance | Details for pycdek3-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pycdek3-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for pycdek3-0.2.0-py3-none-any.whl |
Total release size: 16.7 kB
Release files / pycdek3-0.2.0.tar.gz
| Download URL | pycdek3-0.2.0.tar.gz |
|---|---|
| Size | 7.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aea57dbf7b685937783b998a6bb8e3573ba926080f93cfbf8a2d277b4f7aefba
|
|
BLAKE2b-256 checksum How to use checksums |
56298aee867d7fce4f52ff97bcca558a63bd710f3f87f1c5fb1490161073075c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8
|
Release files / pycdek3-0.2.0-py3-none-any.whl
| Download URL | pycdek3-0.2.0-py3-none-any.whl |
|---|---|
| Size | 9.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
45547f5ec9feb2a8c4cdd093672e3de003df844e1419f10b0e407e12ad08baf1
|
|
BLAKE2b-256 checksum How to use checksums |
6702bfedbb9304e12543363ec2017b1682cae458491cc481a97fa7e51e081160
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8
|
Security for pycdek3 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.