
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
yandex-delivery-sdk
Advanced tools
Клиентская библиотека для работы с API Яндекс.Доставки.
Данная библиотека предоставляет удобный интерфейс для взаимодействия с API Яндекс.Доставки v2. Она позволяет создавать заявки на доставку, проверять стоимость доставки и управлять процессом доставки.
from yandex_delivery.client import YandexDeliveryClient
client = YandexDeliveryClient(api_key="ваш_api_ключ")
from yandex_delivery.objects import RoutePointWithAddress, ClientRequirements
from yandex_delivery.enums import TaxiClasses
# Создание точек маршрута
route_points = [
RoutePointWithAddress(
id=1,
coordinates=[74.635061, 42.856681],
fullname="Бишкек, ул. Горького, 1/2"
),
RoutePointWithAddress(
id=2,
coordinates=[74.590261, 42.874537],
fullname="Бишкек, ул. Горького, 1/2"
)
]
# Требования к доставке
requirements = ClientRequirements(
taxi_class=TaxiClasses.EXPRESS
)
# Получение стоимости
price = client.check_price(
route_points=route_points,
client_requirements=requirements
)
print(f"Стоимость доставки: {price} сом.")
from uuid import uuid4
from yandex_delivery.objects import (
Item, RoutePoint, Contact, Address,
ClientRequirements
)
from yandex_delivery.enums import RoutePointType, TaxiClasses
# Создание товара
item = Item(
extra_id="ORDER-123",
pickup_point=1,
droppof_point=2,
title="Товар 1",
cost_value="1000",
cost_currency="KGS",
quantity=1
)
# Создание точек маршрута
route_points = [
RoutePoint(
point_id=1,
visit_order=1,
contact=Contact(
name="Yryskeldi",
phone="+996999999999"
),
address=Address(
coordinates=[74.635061, 42.856681],
fullname="Бишкек, ул. Горького, 1/2"
),
type=RoutePointType.SOURCE.value
),
RoutePoint(
point_id=2,
visit_order=2,
contact=Contact(
name="Eldos",
phone="+996999999999"
),
address=Address(
coordinates=[74.590261, 42.874537],
fullname="Бишкек, ул. Горького, 1/2"
),
type=RoutePointType.DESTINATION.value
)
]
# Создание заявки
claim_id = client.create_claim(
request_id=uuid4(),
items=[item],
route_points=route_points,
client_requirements=ClientRequirements(
taxi_class=TaxiClasses.EXPRESS
),
comment="Комментарий к заказу",
skip_door_to_door=False
)
Библиотека поддерживает все статусы заявок Яндекс.Доставки:
new
- новая заявкаestimating
- расчет стоимостиaccepted
- заявка принятаperformer_lookup
- поиск исполнителяperformer_found
- исполнитель найденpickuped
- груз забранdelivered
- доставленоClaimStatuses
)Библиотека предоставляет специальный класс APIError
для обработки ошибок API:
from yandex_delivery.exceptions import APIError
try:
price = client.check_price(route_points, requirements)
except APIError as e:
print(f"Ошибка API: {e.code} - {e.message}")
if e.response:
print(f"Детали ответа: {e.response}")
Используется для описания точек маршрута при проверке стоимости:
Детали адреса не обязательны и могут быть пустыми. Подробнее в RoutePointWithAddress
route_point = RoutePointWithAddress(
id=1,
coordinates=[74.635061, 42.856681],
building="1",
city="Бишкек",
country="Кыргызстан",
fullname="Бишкек ул. Горького 1/2",
street="Горького",
)
Определяет требования к доставке:
requirements = ClientRequirements(
taxi_class=TaxiClasses.EXPRESS,
cargo_type=CargoType.VAN,
cargo_options=[CargoOptions.THERMOBAG],
cargo_loaders=1
)
MIT
При возникновении проблем или вопросов создавайте issue в репозитории проекта.
FAQs
SDK для удобной работы с API Yandex Delivery
We found that yandex-delivery-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.