cdek.apps.office package

class cdek.apps.office.OfficeApp(client: CdekClient)[исходный код]

Базовые классы: App

Класс для работы с ПВЗ СДЭК

get(filter_params: OfficeFilter | None = None) dict[str, list[OfficeResponse] | dict][исходный код]

Получение списка ПВЗ СДЭК

Args:

filter_params (OfficeFilter): фильтр для получения списка ПВЗ СДЭК

Returns:

list[OfficeResponse]: список объектов OfficeResponse с информацией о ПВЗ dict: заголовки ответа

property headers: dict[str, str]
class cdek.apps.office.OfficeFilter(*, code: Annotated[str | None, MaxLen(max_length=255)] = None, type: Literal['PVZ', 'POSTAMAT', 'ALL'] = 'ALL', postal_code: Annotated[str | None, MaxLen(max_length=255)] = None, city_code: int | None = None, country_code: Annotated[str | None, MaxLen(max_length=2)] = None, region_code: int | None = None, have_cashless: bool | None = None, have_cash: bool | None = None, is_dressing_room: bool | None = None, weight_max: Annotated[int | None, Gt(gt=0)] = None, weight_min: Annotated[int | None, Gt(gt=0)] = None, lang: str = 'rus', take_only: bool | None = None, is_handout: bool | None = None, is_reception: bool | None = None, is_marketplace: bool | None = None, is_ltl: bool | None = None, fulfillment: bool | None = None, fias_guid: UUID | None = None, size: Annotated[int | None, Ge(ge=0)] = None, page: Annotated[int | None, Ge(ge=0)] = None)[исходный код]

Базовые классы: BaseModel

Фильтр для ПВЗ

city_code: int | None
code: str | None
country_code: str | None
fias_guid: UUID | None
fulfillment: bool | None
have_cash: bool | None
have_cashless: bool | None
is_dressing_room: bool | None
is_handout: bool | None
is_ltl: bool | None
is_marketplace: bool | None
is_reception: bool | None
lang: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

page: int | None
postal_code: str | None
region_code: int | None
size: int | None
take_only: bool | None
type: Literal['PVZ', 'POSTAMAT', 'ALL']
weight_max: int | None
weight_min: int | None
class cdek.apps.office.OfficeLocation(*, postal_code: str | None = None, address: str | None = None, address_full: str | None = None, longitude: float | None = None, latitude: float | None = None, region: str | None = None, region_code: int | None = None, kladr_region_code: str | None = None, sub_region: str | None = None, country_code: Annotated[str | None, MaxLen(max_length=2)] = None, country: Annotated[str | None, MaxLen(max_length=255)] = None, city_code: int, city_uuid: UUID, city: str | None = None, fias_guid: UUID | None = None)[исходный код]

Базовые классы: FullLocation

Модель ответа локации офиса

city: str | None
code: int
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

region: str | None
class cdek.apps.office.OfficeResponse(*, code: str, uuid: str, address_comment: str | None = None, nearest_station: str | None = None, nearest_metro_station: str | None = None, work_time: str, phones: list[Phone] | None = None, email: str | None = None, note: str | None = None, type: str | None = None, owner_code: str, take_only: bool, is_handout: bool, is_reception: bool, is_dressing_room: bool, is_marketplace: bool | None = None, is_ltl: bool | None = None, have_cashless: bool, have_cash: bool, have_fast_payment_system: bool, allowed_cod: bool, site: str | None = None, office_image_list: list[Image] | None = None, work_time_list: list[WorkTime], work_time_exception_list: list[WorkTimeException], weight_min: float | None = None, weight_max: float | None = None, dimensions: list[Dimensions] | None = None, errors: list[Error] | None = None, warnings: list[WarningModel] | None = None, location: OfficeLocation, distance: int | None = None, fulfillment: bool | None = None)[исходный код]

Базовые классы: BaseModel

Модель ответа офиса

address_comment: str | None
allowed_cod: bool
code: str
dimensions: list[Dimensions] | None
distance: int | None
email: str | None
errors: list[Error] | None
fulfillment: bool | None
have_cash: bool
have_cashless: bool
have_fast_payment_system: bool
is_dressing_room: bool
is_handout: bool
is_ltl: bool | None
is_marketplace: bool | None
is_reception: bool
location: OfficeLocation
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

nearest_metro_station: str | None
nearest_station: str | None
note: str | None
office_image_list: list[Image] | None
owner_code: str
phones: list[Phone] | None
site: str | None
take_only: bool
type: str | None
uuid: str
warnings: list[WarningModel] | None
weight_max: float | None
weight_min: float | None
work_time: str
work_time_exception_list: list[WorkTimeException]
work_time_list: list[WorkTime]

Submodules

cdek.apps.office.filters module

class cdek.apps.office.filters.OfficeFilter(*, code: Annotated[str | None, MaxLen(max_length=255)] = None, type: Literal['PVZ', 'POSTAMAT', 'ALL'] = 'ALL', postal_code: Annotated[str | None, MaxLen(max_length=255)] = None, city_code: int | None = None, country_code: Annotated[str | None, MaxLen(max_length=2)] = None, region_code: int | None = None, have_cashless: bool | None = None, have_cash: bool | None = None, is_dressing_room: bool | None = None, weight_max: Annotated[int | None, Gt(gt=0)] = None, weight_min: Annotated[int | None, Gt(gt=0)] = None, lang: str = 'rus', take_only: bool | None = None, is_handout: bool | None = None, is_reception: bool | None = None, is_marketplace: bool | None = None, is_ltl: bool | None = None, fulfillment: bool | None = None, fias_guid: UUID | None = None, size: Annotated[int | None, Ge(ge=0)] = None, page: Annotated[int | None, Ge(ge=0)] = None)[исходный код]

Базовые классы: BaseModel

Фильтр для ПВЗ

city_code: int | None
code: str | None
country_code: str | None
fias_guid: UUID | None
fulfillment: bool | None
have_cash: bool | None
have_cashless: bool | None
is_dressing_room: bool | None
is_handout: bool | None
is_ltl: bool | None
is_marketplace: bool | None
is_reception: bool | None
lang: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

page: int | None
postal_code: str | None
region_code: int | None
size: int | None
take_only: bool | None
type: Literal['PVZ', 'POSTAMAT', 'ALL']
weight_max: int | None
weight_min: int | None

cdek.apps.office.office module

class cdek.apps.office.office.OfficeApp(client: CdekClient)[исходный код]

Базовые классы: App

Класс для работы с ПВЗ СДЭК

get(filter_params: OfficeFilter | None = None) dict[str, list[OfficeResponse] | dict][исходный код]

Получение списка ПВЗ СДЭК

Args:

filter_params (OfficeFilter): фильтр для получения списка ПВЗ СДЭК

Returns:

list[OfficeResponse]: список объектов OfficeResponse с информацией о ПВЗ dict: заголовки ответа

property headers: dict[str, str]

cdek.apps.office.responses module

class cdek.apps.office.responses.OfficeLocation(*, postal_code: str | None = None, address: str | None = None, address_full: str | None = None, longitude: float | None = None, latitude: float | None = None, region: str | None = None, region_code: int | None = None, kladr_region_code: str | None = None, sub_region: str | None = None, country_code: Annotated[str | None, MaxLen(max_length=2)] = None, country: Annotated[str | None, MaxLen(max_length=255)] = None, city_code: int, city_uuid: UUID, city: str | None = None, fias_guid: UUID | None = None)[исходный код]

Базовые классы: FullLocation

Модель ответа локации офиса

address: str | None
address_full: str | None
city: str | None
city_uuid: UUID
code: int
country: str | None
country_code: str | None
fias_guid: UUID | None
kladr_region_code: str | None
latitude: float | None
longitude: float | None
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

postal_code: str | None
region: str | None
region_code: int | None
sub_region: str | None
class cdek.apps.office.responses.OfficeResponse(*, code: str, uuid: str, address_comment: str | None = None, nearest_station: str | None = None, nearest_metro_station: str | None = None, work_time: str, phones: list[Phone] | None = None, email: str | None = None, note: str | None = None, type: str | None = None, owner_code: str, take_only: bool, is_handout: bool, is_reception: bool, is_dressing_room: bool, is_marketplace: bool | None = None, is_ltl: bool | None = None, have_cashless: bool, have_cash: bool, have_fast_payment_system: bool, allowed_cod: bool, site: str | None = None, office_image_list: list[Image] | None = None, work_time_list: list[WorkTime], work_time_exception_list: list[WorkTimeException], weight_min: float | None = None, weight_max: float | None = None, dimensions: list[Dimensions] | None = None, errors: list[Error] | None = None, warnings: list[WarningModel] | None = None, location: OfficeLocation, distance: int | None = None, fulfillment: bool | None = None)[исходный код]

Базовые классы: BaseModel

Модель ответа офиса

address_comment: str | None
allowed_cod: bool
code: str
dimensions: list[Dimensions] | None
distance: int | None
email: str | None
errors: list[Error] | None
fulfillment: bool | None
have_cash: bool
have_cashless: bool
have_fast_payment_system: bool
is_dressing_room: bool
is_handout: bool
is_ltl: bool | None
is_marketplace: bool | None
is_reception: bool
location: OfficeLocation
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

nearest_metro_station: str | None
nearest_station: str | None
note: str | None
office_image_list: list[Image] | None
owner_code: str
phones: list[Phone] | None
site: str | None
take_only: bool
type: str | None
uuid: str
warnings: list[WarningModel] | None
weight_max: float | None
weight_min: float | None
work_time: str
work_time_exception_list: list[WorkTimeException]
work_time_list: list[WorkTime]