fogstream / fs-pochta-api Goto Github PK
View Code? Open in Web Editor NEWБиблиотека для работы с API Почты России
License: MIT License
Библиотека для работы с API Почты России
License: MIT License
Добрый день. Есть ли возможность каким-то образом получать через API получения всего списка моих отправлений на сайте?
Нашёл только возможности для проверки статуса по отправлениям, по которым информация уже известна заранее, и добавление новых отправлений, но нужной мне функции не нашёл - возможно, что-то упускаю.
Здравствуйте, столкнулась с пробемой при применении метода helpers.Order.add_items().
`
def add_items(self, items: List[Item]) -> None:
"""
Добавление товарных вложений РПО.
:param items: Список вложений
"""
if not items:
self.items = items
else:
self.items.extend(items)
В то же время в __init__.py:
self.items = None`
Таким обрзам, вызывая метод add_items с ненулевым списком вызовет:
File "/root/.cache/pypoetry/virtualenvs/server-slTVhXXG-py3.7/lib/python3.7/site-packages/pochta/helpers.py", line 432, in add_items self.items.extend(items) AttributeError: 'NoneType' object has no attribute 'extend'
Необходимо заменить базовое значение items на пустой список.
3.6.9:
In [7]: from pochta import Tracking
File "/home/argon/.Envs/burgundy/lib/python3.6/site-packages/pochta/api/archive.py", line 1
from __future__ import annotations
^
SyntaxError: future feature annotations is not defined
3.7.0:
In [1]: from pochta import Tracking
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-1-031241b76e05> in <module>
----> 1 from pochta import Tracking
ImportError: cannot import name 'Tracking' from 'pochta' (/home/argon/.pyenv/versions/pochta/lib/python3.7/site-packages/pochta/__init__.py)
В итоге на 3.7.0 копаясь в сорцах выяснил что документация отстает от АПИ и на самом деле надо писать
from pochta import SingleTracker
Потом - вылазят совершенно не информативные ошибки:
Но в целом что-то удается получить из АПИ:D
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.