karrio-sendcloud 2025.5rc7__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- karrio/mappers/sendcloud/__init__.py +20 -0
- karrio/mappers/sendcloud/mapper.py +84 -0
- karrio/mappers/sendcloud/proxy.py +114 -0
- karrio/mappers/sendcloud/settings.py +21 -0
- karrio/plugins/sendcloud/__init__.py +2 -0
- karrio/providers/sendcloud/__init__.py +24 -0
- karrio/providers/sendcloud/error.py +74 -0
- karrio/providers/sendcloud/pickup/__init__.py +14 -0
- karrio/providers/sendcloud/pickup/cancel.py +53 -0
- karrio/providers/sendcloud/pickup/create.py +66 -0
- karrio/providers/sendcloud/pickup/update.py +67 -0
- karrio/providers/sendcloud/rate.py +139 -0
- karrio/providers/sendcloud/shipment/__init__.py +9 -0
- karrio/providers/sendcloud/shipment/cancel.py +57 -0
- karrio/providers/sendcloud/shipment/create.py +128 -0
- karrio/providers/sendcloud/tracking.py +115 -0
- karrio/providers/sendcloud/units.py +87 -0
- karrio/providers/sendcloud/utils.py +108 -0
- karrio/schemas/sendcloud/__init__.py +0 -0
- karrio/schemas/sendcloud/auth_request.py +32 -0
- karrio/schemas/sendcloud/auth_response.py +13 -0
- karrio/schemas/sendcloud/error.py +22 -0
- karrio/schemas/sendcloud/rate_request.py +17 -0
- karrio/schemas/sendcloud/rate_response.py +144 -0
- karrio/schemas/sendcloud/shipment_request.py +45 -0
- karrio/schemas/sendcloud/shipment_response.py +207 -0
- karrio/schemas/sendcloud/tracking_request.py +22 -0
- karrio/schemas/sendcloud/tracking_response.py +129 -0
- karrio_sendcloud-2025.5rc7.dist-info/METADATA +44 -0
- karrio_sendcloud-2025.5rc7.dist-info/RECORD +33 -0
- karrio_sendcloud-2025.5rc7.dist-info/WHEEL +5 -0
- karrio_sendcloud-2025.5rc7.dist-info/entry_points.txt +2 -0
- karrio_sendcloud-2025.5rc7.dist-info/top_level.txt +3 -0
@@ -0,0 +1,144 @@
|
|
1
|
+
import attr
|
2
|
+
import jstruct
|
3
|
+
import typing
|
4
|
+
|
5
|
+
|
6
|
+
@attr.s(auto_attribs=True)
|
7
|
+
class BilledWeightType:
|
8
|
+
unit: typing.Optional[str] = None
|
9
|
+
value: typing.Optional[str] = None
|
10
|
+
volumetric: typing.Optional[bool] = None
|
11
|
+
|
12
|
+
|
13
|
+
@attr.s(auto_attribs=True)
|
14
|
+
class CarrierType:
|
15
|
+
code: typing.Optional[str] = None
|
16
|
+
name: typing.Optional[str] = None
|
17
|
+
|
18
|
+
|
19
|
+
@attr.s(auto_attribs=True)
|
20
|
+
class ContractType:
|
21
|
+
id: typing.Optional[int] = None
|
22
|
+
clientid: typing.Optional[str] = None
|
23
|
+
carriercode: typing.Optional[str] = None
|
24
|
+
name: typing.Optional[str] = None
|
25
|
+
|
26
|
+
|
27
|
+
@attr.s(auto_attribs=True)
|
28
|
+
class FunctionalitiesType:
|
29
|
+
b2b: typing.Optional[bool] = None
|
30
|
+
b2c: typing.Optional[bool] = None
|
31
|
+
ers: typing.Optional[bool] = None
|
32
|
+
size: typing.Any = None
|
33
|
+
tyres: typing.Optional[bool] = None
|
34
|
+
sorted: typing.Optional[bool] = None
|
35
|
+
boxable: typing.Optional[bool] = None
|
36
|
+
premium: typing.Optional[bool] = None
|
37
|
+
returns: typing.Optional[bool] = None
|
38
|
+
segment: typing.Any = None
|
39
|
+
tracked: typing.Optional[bool] = None
|
40
|
+
idcheck: typing.Optional[bool] = None
|
41
|
+
incoterm: typing.Any = None
|
42
|
+
manually: typing.Optional[bool] = None
|
43
|
+
priority: typing.Any = None
|
44
|
+
agecheck: typing.Any = None
|
45
|
+
insurance: typing.Any = None
|
46
|
+
labelless: typing.Optional[bool] = None
|
47
|
+
lastmile: typing.Optional[str] = None
|
48
|
+
signature: typing.Optional[bool] = None
|
49
|
+
surcharge: typing.Optional[bool] = None
|
50
|
+
firstmile: typing.Optional[str] = None
|
51
|
+
multicollo: typing.Optional[bool] = None
|
52
|
+
bulkygoods: typing.Optional[bool] = None
|
53
|
+
formfactor: typing.Optional[str] = None
|
54
|
+
freshgoods: typing.Optional[bool] = None
|
55
|
+
ecodelivery: typing.Optional[bool] = None
|
56
|
+
servicearea: typing.Optional[str] = None
|
57
|
+
flexdelivery: typing.Optional[bool] = None
|
58
|
+
fragilegoods: typing.Optional[bool] = None
|
59
|
+
nonconveyable: typing.Optional[bool] = None
|
60
|
+
dangerousgoods: typing.Optional[bool] = None
|
61
|
+
deliverybefore: typing.Any = None
|
62
|
+
cashondelivery: typing.Any = None
|
63
|
+
harmonizedlabel: typing.Optional[bool] = None
|
64
|
+
weekenddelivery: typing.Any = None
|
65
|
+
carrierinsurance: typing.Optional[bool] = None
|
66
|
+
deliveryattempts: typing.Any = None
|
67
|
+
deliverydeadline: typing.Optional[str] = None
|
68
|
+
neighbordelivery: typing.Optional[bool] = None
|
69
|
+
customsvaluelimit: typing.Any = None
|
70
|
+
registereddelivery: typing.Optional[bool] = None
|
71
|
+
carrierbillingtype: typing.Any = None
|
72
|
+
personalizeddelivery: typing.Optional[bool] = None
|
73
|
+
|
74
|
+
|
75
|
+
@attr.s(auto_attribs=True)
|
76
|
+
class MaxDimensionsType:
|
77
|
+
length: typing.Optional[str] = None
|
78
|
+
width: typing.Optional[str] = None
|
79
|
+
height: typing.Optional[str] = None
|
80
|
+
unit: typing.Optional[str] = None
|
81
|
+
|
82
|
+
|
83
|
+
@attr.s(auto_attribs=True)
|
84
|
+
class TotalType:
|
85
|
+
value: typing.Optional[int] = None
|
86
|
+
currency: typing.Optional[str] = None
|
87
|
+
|
88
|
+
|
89
|
+
@attr.s(auto_attribs=True)
|
90
|
+
class BreakdownType:
|
91
|
+
type: typing.Optional[str] = None
|
92
|
+
label: typing.Optional[str] = None
|
93
|
+
price: typing.Optional[TotalType] = jstruct.JStruct[TotalType]
|
94
|
+
|
95
|
+
|
96
|
+
@attr.s(auto_attribs=True)
|
97
|
+
class PriceType:
|
98
|
+
breakdown: typing.Optional[typing.List[BreakdownType]] = jstruct.JList[BreakdownType]
|
99
|
+
total: typing.Optional[TotalType] = jstruct.JStruct[TotalType]
|
100
|
+
|
101
|
+
|
102
|
+
@attr.s(auto_attribs=True)
|
103
|
+
class MaxType:
|
104
|
+
value: typing.Optional[str] = None
|
105
|
+
unit: typing.Optional[str] = None
|
106
|
+
|
107
|
+
|
108
|
+
@attr.s(auto_attribs=True)
|
109
|
+
class WeightType:
|
110
|
+
min: typing.Optional[MaxType] = jstruct.JStruct[MaxType]
|
111
|
+
max: typing.Optional[MaxType] = jstruct.JStruct[MaxType]
|
112
|
+
|
113
|
+
|
114
|
+
@attr.s(auto_attribs=True)
|
115
|
+
class QuoteType:
|
116
|
+
weight: typing.Optional[WeightType] = jstruct.JStruct[WeightType]
|
117
|
+
price: typing.Optional[PriceType] = jstruct.JStruct[PriceType]
|
118
|
+
leadtime: typing.Optional[int] = None
|
119
|
+
|
120
|
+
|
121
|
+
@attr.s(auto_attribs=True)
|
122
|
+
class RequirementsType:
|
123
|
+
fields: typing.Optional[typing.List[typing.Any]] = None
|
124
|
+
exportdocuments: typing.Optional[bool] = None
|
125
|
+
|
126
|
+
|
127
|
+
@attr.s(auto_attribs=True)
|
128
|
+
class DatumType:
|
129
|
+
code: typing.Optional[str] = None
|
130
|
+
name: typing.Optional[str] = None
|
131
|
+
carrier: typing.Optional[CarrierType] = jstruct.JStruct[CarrierType]
|
132
|
+
product: typing.Optional[CarrierType] = jstruct.JStruct[CarrierType]
|
133
|
+
functionalities: typing.Optional[FunctionalitiesType] = jstruct.JStruct[FunctionalitiesType]
|
134
|
+
contract: typing.Optional[ContractType] = jstruct.JStruct[ContractType]
|
135
|
+
weight: typing.Optional[WeightType] = jstruct.JStruct[WeightType]
|
136
|
+
maxdimensions: typing.Optional[MaxDimensionsType] = jstruct.JStruct[MaxDimensionsType]
|
137
|
+
billedweight: typing.Optional[BilledWeightType] = jstruct.JStruct[BilledWeightType]
|
138
|
+
requirements: typing.Optional[RequirementsType] = jstruct.JStruct[RequirementsType]
|
139
|
+
quotes: typing.Optional[typing.List[QuoteType]] = jstruct.JList[QuoteType]
|
140
|
+
|
141
|
+
|
142
|
+
@attr.s(auto_attribs=True)
|
143
|
+
class RateResponseType:
|
144
|
+
data: typing.Optional[typing.List[DatumType]] = jstruct.JList[DatumType]
|
@@ -0,0 +1,45 @@
|
|
1
|
+
import attr
|
2
|
+
import jstruct
|
3
|
+
import typing
|
4
|
+
|
5
|
+
|
6
|
+
@attr.s(auto_attribs=True)
|
7
|
+
class ParcelItemType:
|
8
|
+
description: typing.Optional[str] = None
|
9
|
+
quantity: typing.Optional[int] = None
|
10
|
+
weight: typing.Optional[str] = None
|
11
|
+
value: typing.Optional[str] = None
|
12
|
+
hscode: typing.Optional[str] = None
|
13
|
+
origincountry: typing.Optional[str] = None
|
14
|
+
sku: typing.Optional[str] = None
|
15
|
+
productid: typing.Optional[str] = None
|
16
|
+
|
17
|
+
|
18
|
+
@attr.s(auto_attribs=True)
|
19
|
+
class ShipmentRequestType:
|
20
|
+
name: typing.Optional[str] = None
|
21
|
+
address: typing.Optional[str] = None
|
22
|
+
address2: typing.Optional[str] = None
|
23
|
+
housenumber: typing.Optional[int] = None
|
24
|
+
city: typing.Optional[str] = None
|
25
|
+
postalcode: typing.Optional[str] = None
|
26
|
+
country: typing.Optional[str] = None
|
27
|
+
companyname: typing.Optional[str] = None
|
28
|
+
email: typing.Optional[str] = None
|
29
|
+
telephone: typing.Optional[str] = None
|
30
|
+
weight: typing.Optional[str] = None
|
31
|
+
length: typing.Optional[int] = None
|
32
|
+
width: typing.Optional[int] = None
|
33
|
+
height: typing.Optional[int] = None
|
34
|
+
requestlabel: typing.Optional[bool] = None
|
35
|
+
applyshippingrules: typing.Optional[bool] = None
|
36
|
+
shippingmethod: typing.Optional[int] = None
|
37
|
+
externalreference: typing.Optional[str] = None
|
38
|
+
ordernumber: typing.Optional[str] = None
|
39
|
+
insuredvalue: typing.Optional[float] = None
|
40
|
+
totalinsuredvalue: typing.Optional[float] = None
|
41
|
+
senderaddress: typing.Optional[int] = None
|
42
|
+
shipmentuuid: typing.Optional[str] = None
|
43
|
+
customsinvoicenr: typing.Optional[str] = None
|
44
|
+
customsshipmenttype: typing.Optional[int] = None
|
45
|
+
parcelitems: typing.Optional[typing.List[ParcelItemType]] = jstruct.JList[ParcelItemType]
|
@@ -0,0 +1,207 @@
|
|
1
|
+
import attr
|
2
|
+
import jstruct
|
3
|
+
import typing
|
4
|
+
|
5
|
+
|
6
|
+
@attr.s(auto_attribs=True)
|
7
|
+
class AddressType:
|
8
|
+
type: typing.Optional[str] = None
|
9
|
+
description: typing.Optional[str] = None
|
10
|
+
|
11
|
+
|
12
|
+
@attr.s(auto_attribs=True)
|
13
|
+
class HouseNumberType:
|
14
|
+
type: typing.Optional[str] = None
|
15
|
+
|
16
|
+
|
17
|
+
@attr.s(auto_attribs=True)
|
18
|
+
class AddressDividedPropertiesType:
|
19
|
+
housenumber: typing.Optional[HouseNumberType] = jstruct.JStruct[HouseNumberType]
|
20
|
+
street: typing.Optional[HouseNumberType] = jstruct.JStruct[HouseNumberType]
|
21
|
+
|
22
|
+
|
23
|
+
@attr.s(auto_attribs=True)
|
24
|
+
class AddressDividedType:
|
25
|
+
type: typing.Optional[str] = None
|
26
|
+
properties: typing.Optional[AddressDividedPropertiesType] = jstruct.JStruct[AddressDividedPropertiesType]
|
27
|
+
|
28
|
+
|
29
|
+
@attr.s(auto_attribs=True)
|
30
|
+
class CountryPropertiesType:
|
31
|
+
iso2: typing.Optional[HouseNumberType] = jstruct.JStruct[HouseNumberType]
|
32
|
+
iso3: typing.Optional[HouseNumberType] = jstruct.JStruct[HouseNumberType]
|
33
|
+
name: typing.Optional[HouseNumberType] = jstruct.JStruct[HouseNumberType]
|
34
|
+
|
35
|
+
|
36
|
+
@attr.s(auto_attribs=True)
|
37
|
+
class CountryType:
|
38
|
+
type: typing.Optional[str] = None
|
39
|
+
properties: typing.Optional[CountryPropertiesType] = jstruct.JStruct[CountryPropertiesType]
|
40
|
+
|
41
|
+
|
42
|
+
@attr.s(auto_attribs=True)
|
43
|
+
class CustomsDeclarationPropertiesType:
|
44
|
+
eorinumber: typing.Optional[HouseNumberType] = jstruct.JStruct[HouseNumberType]
|
45
|
+
license: typing.Optional[HouseNumberType] = jstruct.JStruct[HouseNumberType]
|
46
|
+
certificate: typing.Optional[HouseNumberType] = jstruct.JStruct[HouseNumberType]
|
47
|
+
invoice: typing.Optional[HouseNumberType] = jstruct.JStruct[HouseNumberType]
|
48
|
+
|
49
|
+
|
50
|
+
@attr.s(auto_attribs=True)
|
51
|
+
class CustomsDeclarationType:
|
52
|
+
type: typing.Optional[str] = None
|
53
|
+
properties: typing.Optional[CustomsDeclarationPropertiesType] = jstruct.JStruct[CustomsDeclarationPropertiesType]
|
54
|
+
|
55
|
+
|
56
|
+
@attr.s(auto_attribs=True)
|
57
|
+
class CustomsShipmentTypePropertiesType:
|
58
|
+
id: typing.Optional[HouseNumberType] = jstruct.JStruct[HouseNumberType]
|
59
|
+
name: typing.Optional[HouseNumberType] = jstruct.JStruct[HouseNumberType]
|
60
|
+
|
61
|
+
|
62
|
+
@attr.s(auto_attribs=True)
|
63
|
+
class CustomsShipmentTypeObjectType:
|
64
|
+
type: typing.Optional[typing.List[str]] = None
|
65
|
+
properties: typing.Optional[CustomsShipmentTypePropertiesType] = jstruct.JStruct[CustomsShipmentTypePropertiesType]
|
66
|
+
|
67
|
+
|
68
|
+
@attr.s(auto_attribs=True)
|
69
|
+
class DateCreatedType:
|
70
|
+
type: typing.Optional[str] = None
|
71
|
+
format: typing.Optional[str] = None
|
72
|
+
description: typing.Optional[str] = None
|
73
|
+
|
74
|
+
|
75
|
+
@attr.s(auto_attribs=True)
|
76
|
+
class PurplePropertiesType:
|
77
|
+
type: typing.Optional[HouseNumberType] = jstruct.JStruct[HouseNumberType]
|
78
|
+
size: typing.Optional[HouseNumberType] = jstruct.JStruct[HouseNumberType]
|
79
|
+
link: typing.Optional[HouseNumberType] = jstruct.JStruct[HouseNumberType]
|
80
|
+
|
81
|
+
|
82
|
+
@attr.s(auto_attribs=True)
|
83
|
+
class DocumentsItemsType:
|
84
|
+
type: typing.Optional[str] = None
|
85
|
+
properties: typing.Optional[PurplePropertiesType] = jstruct.JStruct[PurplePropertiesType]
|
86
|
+
|
87
|
+
|
88
|
+
@attr.s(auto_attribs=True)
|
89
|
+
class DocumentsType:
|
90
|
+
type: typing.Optional[str] = None
|
91
|
+
items: typing.Optional[DocumentsItemsType] = jstruct.JStruct[DocumentsItemsType]
|
92
|
+
|
93
|
+
|
94
|
+
@attr.s(auto_attribs=True)
|
95
|
+
class NormalPrinterType:
|
96
|
+
type: typing.Optional[typing.List[str]] = None
|
97
|
+
|
98
|
+
|
99
|
+
@attr.s(auto_attribs=True)
|
100
|
+
class LabelPropertiesType:
|
101
|
+
labelprinter: typing.Optional[HouseNumberType] = jstruct.JStruct[HouseNumberType]
|
102
|
+
normalprinter: typing.Optional[NormalPrinterType] = jstruct.JStruct[NormalPrinterType]
|
103
|
+
|
104
|
+
|
105
|
+
@attr.s(auto_attribs=True)
|
106
|
+
class LabelType:
|
107
|
+
type: typing.Optional[str] = None
|
108
|
+
properties: typing.Optional[LabelPropertiesType] = jstruct.JStruct[LabelPropertiesType]
|
109
|
+
|
110
|
+
|
111
|
+
@attr.s(auto_attribs=True)
|
112
|
+
class FluffyPropertiesType:
|
113
|
+
description: typing.Optional[HouseNumberType] = jstruct.JStruct[HouseNumberType]
|
114
|
+
quantity: typing.Optional[HouseNumberType] = jstruct.JStruct[HouseNumberType]
|
115
|
+
weight: typing.Optional[HouseNumberType] = jstruct.JStruct[HouseNumberType]
|
116
|
+
value: typing.Optional[HouseNumberType] = jstruct.JStruct[HouseNumberType]
|
117
|
+
hscode: typing.Optional[HouseNumberType] = jstruct.JStruct[HouseNumberType]
|
118
|
+
origincountry: typing.Optional[HouseNumberType] = jstruct.JStruct[HouseNumberType]
|
119
|
+
sku: typing.Optional[HouseNumberType] = jstruct.JStruct[HouseNumberType]
|
120
|
+
productid: typing.Optional[HouseNumberType] = jstruct.JStruct[HouseNumberType]
|
121
|
+
|
122
|
+
|
123
|
+
@attr.s(auto_attribs=True)
|
124
|
+
class ParcelItemsItemsType:
|
125
|
+
type: typing.Optional[str] = None
|
126
|
+
properties: typing.Optional[FluffyPropertiesType] = jstruct.JStruct[FluffyPropertiesType]
|
127
|
+
|
128
|
+
|
129
|
+
@attr.s(auto_attribs=True)
|
130
|
+
class ParcelItemsType:
|
131
|
+
type: typing.Optional[str] = None
|
132
|
+
description: typing.Optional[str] = None
|
133
|
+
items: typing.Optional[ParcelItemsItemsType] = jstruct.JStruct[ParcelItemsItemsType]
|
134
|
+
|
135
|
+
|
136
|
+
@attr.s(auto_attribs=True)
|
137
|
+
class ShipmentType:
|
138
|
+
type: typing.Optional[str] = None
|
139
|
+
properties: typing.Optional[CustomsShipmentTypePropertiesType] = jstruct.JStruct[CustomsShipmentTypePropertiesType]
|
140
|
+
|
141
|
+
|
142
|
+
@attr.s(auto_attribs=True)
|
143
|
+
class StatusPropertiesType:
|
144
|
+
id: typing.Optional[HouseNumberType] = jstruct.JStruct[HouseNumberType]
|
145
|
+
message: typing.Optional[HouseNumberType] = jstruct.JStruct[HouseNumberType]
|
146
|
+
|
147
|
+
|
148
|
+
@attr.s(auto_attribs=True)
|
149
|
+
class StatusType:
|
150
|
+
type: typing.Optional[str] = None
|
151
|
+
properties: typing.Optional[StatusPropertiesType] = jstruct.JStruct[StatusPropertiesType]
|
152
|
+
|
153
|
+
|
154
|
+
@attr.s(auto_attribs=True)
|
155
|
+
class ToServicePointType:
|
156
|
+
type: typing.Optional[typing.List[str]] = None
|
157
|
+
description: typing.Optional[str] = None
|
158
|
+
|
159
|
+
|
160
|
+
@attr.s(auto_attribs=True)
|
161
|
+
class ParcelPropertiesType:
|
162
|
+
id: typing.Optional[AddressType] = jstruct.JStruct[AddressType]
|
163
|
+
address: typing.Optional[AddressType] = jstruct.JStruct[AddressType]
|
164
|
+
address2: typing.Optional[AddressType] = jstruct.JStruct[AddressType]
|
165
|
+
addressdivided: typing.Optional[AddressDividedType] = jstruct.JStruct[AddressDividedType]
|
166
|
+
city: typing.Optional[AddressType] = jstruct.JStruct[AddressType]
|
167
|
+
companyname: typing.Optional[AddressType] = jstruct.JStruct[AddressType]
|
168
|
+
country: typing.Optional[CountryType] = jstruct.JStruct[CountryType]
|
169
|
+
datecreated: typing.Optional[DateCreatedType] = jstruct.JStruct[DateCreatedType]
|
170
|
+
email: typing.Optional[DateCreatedType] = jstruct.JStruct[DateCreatedType]
|
171
|
+
name: typing.Optional[AddressType] = jstruct.JStruct[AddressType]
|
172
|
+
postalcode: typing.Optional[AddressType] = jstruct.JStruct[AddressType]
|
173
|
+
reference: typing.Optional[AddressType] = jstruct.JStruct[AddressType]
|
174
|
+
shipment: typing.Optional[ShipmentType] = jstruct.JStruct[ShipmentType]
|
175
|
+
status: typing.Optional[StatusType] = jstruct.JStruct[StatusType]
|
176
|
+
telephone: typing.Optional[AddressType] = jstruct.JStruct[AddressType]
|
177
|
+
trackingnumber: typing.Optional[AddressType] = jstruct.JStruct[AddressType]
|
178
|
+
weight: typing.Optional[AddressType] = jstruct.JStruct[AddressType]
|
179
|
+
label: typing.Optional[LabelType] = jstruct.JStruct[LabelType]
|
180
|
+
customsdeclaration: typing.Optional[CustomsDeclarationType] = jstruct.JStruct[CustomsDeclarationType]
|
181
|
+
ordernumber: typing.Optional[AddressType] = jstruct.JStruct[AddressType]
|
182
|
+
insuredvalue: typing.Optional[AddressType] = jstruct.JStruct[AddressType]
|
183
|
+
totalinsuredvalue: typing.Optional[AddressType] = jstruct.JStruct[AddressType]
|
184
|
+
toservicepoint: typing.Optional[ToServicePointType] = jstruct.JStruct[ToServicePointType]
|
185
|
+
customsinvoicenr: typing.Optional[AddressType] = jstruct.JStruct[AddressType]
|
186
|
+
customsshipmenttype: typing.Optional[CustomsShipmentTypeObjectType] = jstruct.JStruct[CustomsShipmentTypeObjectType]
|
187
|
+
parcelitems: typing.Optional[ParcelItemsType] = jstruct.JStruct[ParcelItemsType]
|
188
|
+
documents: typing.Optional[DocumentsType] = jstruct.JStruct[DocumentsType]
|
189
|
+
|
190
|
+
|
191
|
+
@attr.s(auto_attribs=True)
|
192
|
+
class ParcelType:
|
193
|
+
type: typing.Optional[str] = None
|
194
|
+
properties: typing.Optional[ParcelPropertiesType] = jstruct.JStruct[ParcelPropertiesType]
|
195
|
+
required: typing.Optional[typing.List[str]] = None
|
196
|
+
|
197
|
+
|
198
|
+
@attr.s(auto_attribs=True)
|
199
|
+
class ShipmentResponsePropertiesType:
|
200
|
+
parcel: typing.Optional[ParcelType] = jstruct.JStruct[ParcelType]
|
201
|
+
|
202
|
+
|
203
|
+
@attr.s(auto_attribs=True)
|
204
|
+
class ShipmentResponseType:
|
205
|
+
type: typing.Optional[str] = None
|
206
|
+
properties: typing.Optional[ShipmentResponsePropertiesType] = jstruct.JStruct[ShipmentResponsePropertiesType]
|
207
|
+
required: typing.Optional[typing.List[str]] = None
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import attr
|
2
|
+
import jstruct
|
3
|
+
import typing
|
4
|
+
|
5
|
+
|
6
|
+
@attr.s(auto_attribs=True)
|
7
|
+
class CarrierType:
|
8
|
+
type: typing.Optional[str] = None
|
9
|
+
description: typing.Optional[str] = None
|
10
|
+
|
11
|
+
|
12
|
+
@attr.s(auto_attribs=True)
|
13
|
+
class PropertiesType:
|
14
|
+
trackingnumber: typing.Optional[CarrierType] = jstruct.JStruct[CarrierType]
|
15
|
+
carrier: typing.Optional[CarrierType] = jstruct.JStruct[CarrierType]
|
16
|
+
|
17
|
+
|
18
|
+
@attr.s(auto_attribs=True)
|
19
|
+
class TrackingRequestType:
|
20
|
+
type: typing.Optional[str] = None
|
21
|
+
properties: typing.Optional[PropertiesType] = jstruct.JStruct[PropertiesType]
|
22
|
+
required: typing.Optional[typing.List[str]] = None
|
@@ -0,0 +1,129 @@
|
|
1
|
+
import attr
|
2
|
+
import jstruct
|
3
|
+
import typing
|
4
|
+
|
5
|
+
|
6
|
+
@attr.s(auto_attribs=True)
|
7
|
+
class CodeType:
|
8
|
+
type: typing.Optional[str] = None
|
9
|
+
|
10
|
+
|
11
|
+
@attr.s(auto_attribs=True)
|
12
|
+
class CarrierPropertiesType:
|
13
|
+
code: typing.Optional[CodeType] = jstruct.JStruct[CodeType]
|
14
|
+
name: typing.Optional[CodeType] = jstruct.JStruct[CodeType]
|
15
|
+
|
16
|
+
|
17
|
+
@attr.s(auto_attribs=True)
|
18
|
+
class CarrierType:
|
19
|
+
type: typing.Optional[str] = None
|
20
|
+
properties: typing.Optional[CarrierPropertiesType] = jstruct.JStruct[CarrierPropertiesType]
|
21
|
+
|
22
|
+
|
23
|
+
@attr.s(auto_attribs=True)
|
24
|
+
class DateCreatedType:
|
25
|
+
type: typing.Optional[str] = None
|
26
|
+
format: typing.Optional[str] = None
|
27
|
+
description: typing.Optional[str] = None
|
28
|
+
|
29
|
+
|
30
|
+
@attr.s(auto_attribs=True)
|
31
|
+
class IDType:
|
32
|
+
type: typing.Optional[str] = None
|
33
|
+
description: typing.Optional[str] = None
|
34
|
+
|
35
|
+
|
36
|
+
@attr.s(auto_attribs=True)
|
37
|
+
class ShipmentPropertiesType:
|
38
|
+
id: typing.Optional[CodeType] = jstruct.JStruct[CodeType]
|
39
|
+
name: typing.Optional[CodeType] = jstruct.JStruct[CodeType]
|
40
|
+
|
41
|
+
|
42
|
+
@attr.s(auto_attribs=True)
|
43
|
+
class ShipmentType:
|
44
|
+
type: typing.Optional[str] = None
|
45
|
+
properties: typing.Optional[ShipmentPropertiesType] = jstruct.JStruct[ShipmentPropertiesType]
|
46
|
+
|
47
|
+
|
48
|
+
@attr.s(auto_attribs=True)
|
49
|
+
class StatusPropertiesType:
|
50
|
+
id: typing.Optional[CodeType] = jstruct.JStruct[CodeType]
|
51
|
+
message: typing.Optional[CodeType] = jstruct.JStruct[CodeType]
|
52
|
+
|
53
|
+
|
54
|
+
@attr.s(auto_attribs=True)
|
55
|
+
class StatusType:
|
56
|
+
type: typing.Optional[str] = None
|
57
|
+
properties: typing.Optional[StatusPropertiesType] = jstruct.JStruct[StatusPropertiesType]
|
58
|
+
|
59
|
+
|
60
|
+
@attr.s(auto_attribs=True)
|
61
|
+
class LocationPropertiesType:
|
62
|
+
country: typing.Optional[CodeType] = jstruct.JStruct[CodeType]
|
63
|
+
state: typing.Optional[CodeType] = jstruct.JStruct[CodeType]
|
64
|
+
city: typing.Optional[CodeType] = jstruct.JStruct[CodeType]
|
65
|
+
postalcode: typing.Optional[CodeType] = jstruct.JStruct[CodeType]
|
66
|
+
|
67
|
+
|
68
|
+
@attr.s(auto_attribs=True)
|
69
|
+
class LocationType:
|
70
|
+
type: typing.Optional[str] = None
|
71
|
+
properties: typing.Optional[LocationPropertiesType] = jstruct.JStruct[LocationPropertiesType]
|
72
|
+
|
73
|
+
|
74
|
+
@attr.s(auto_attribs=True)
|
75
|
+
class TimestampType:
|
76
|
+
type: typing.Optional[str] = None
|
77
|
+
format: typing.Optional[str] = None
|
78
|
+
|
79
|
+
|
80
|
+
@attr.s(auto_attribs=True)
|
81
|
+
class ItemsPropertiesType:
|
82
|
+
message: typing.Optional[CodeType] = jstruct.JStruct[CodeType]
|
83
|
+
timestamp: typing.Optional[TimestampType] = jstruct.JStruct[TimestampType]
|
84
|
+
status: typing.Optional[CodeType] = jstruct.JStruct[CodeType]
|
85
|
+
carrier: typing.Optional[CodeType] = jstruct.JStruct[CodeType]
|
86
|
+
location: typing.Optional[LocationType] = jstruct.JStruct[LocationType]
|
87
|
+
|
88
|
+
|
89
|
+
@attr.s(auto_attribs=True)
|
90
|
+
class ItemsType:
|
91
|
+
type: typing.Optional[str] = None
|
92
|
+
properties: typing.Optional[ItemsPropertiesType] = jstruct.JStruct[ItemsPropertiesType]
|
93
|
+
|
94
|
+
|
95
|
+
@attr.s(auto_attribs=True)
|
96
|
+
class TrackingEventsType:
|
97
|
+
type: typing.Optional[str] = None
|
98
|
+
items: typing.Optional[ItemsType] = jstruct.JStruct[ItemsType]
|
99
|
+
|
100
|
+
|
101
|
+
@attr.s(auto_attribs=True)
|
102
|
+
class ParcelPropertiesType:
|
103
|
+
id: typing.Optional[IDType] = jstruct.JStruct[IDType]
|
104
|
+
trackingnumber: typing.Optional[IDType] = jstruct.JStruct[IDType]
|
105
|
+
status: typing.Optional[StatusType] = jstruct.JStruct[StatusType]
|
106
|
+
datecreated: typing.Optional[DateCreatedType] = jstruct.JStruct[DateCreatedType]
|
107
|
+
trackingurl: typing.Optional[DateCreatedType] = jstruct.JStruct[DateCreatedType]
|
108
|
+
shipment: typing.Optional[ShipmentType] = jstruct.JStruct[ShipmentType]
|
109
|
+
carrier: typing.Optional[CarrierType] = jstruct.JStruct[CarrierType]
|
110
|
+
trackingevents: typing.Optional[TrackingEventsType] = jstruct.JStruct[TrackingEventsType]
|
111
|
+
|
112
|
+
|
113
|
+
@attr.s(auto_attribs=True)
|
114
|
+
class ParcelType:
|
115
|
+
type: typing.Optional[str] = None
|
116
|
+
properties: typing.Optional[ParcelPropertiesType] = jstruct.JStruct[ParcelPropertiesType]
|
117
|
+
required: typing.Optional[typing.List[str]] = None
|
118
|
+
|
119
|
+
|
120
|
+
@attr.s(auto_attribs=True)
|
121
|
+
class TrackingResponsePropertiesType:
|
122
|
+
parcel: typing.Optional[ParcelType] = jstruct.JStruct[ParcelType]
|
123
|
+
|
124
|
+
|
125
|
+
@attr.s(auto_attribs=True)
|
126
|
+
class TrackingResponseType:
|
127
|
+
type: typing.Optional[str] = None
|
128
|
+
properties: typing.Optional[TrackingResponsePropertiesType] = jstruct.JStruct[TrackingResponsePropertiesType]
|
129
|
+
required: typing.Optional[typing.List[str]] = None
|
@@ -0,0 +1,44 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: karrio_sendcloud
|
3
|
+
Version: 2025.5rc7
|
4
|
+
Summary: Karrio - SendCloud Shipping Extension
|
5
|
+
Author-email: karrio <hello@karrio.io>
|
6
|
+
License-Expression: Apache-2.0
|
7
|
+
Project-URL: Homepage, https://github.com/karrioapi/karrio
|
8
|
+
Classifier: Intended Audience :: Developers
|
9
|
+
Classifier: Operating System :: OS Independent
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
11
|
+
Requires-Python: >=3.11
|
12
|
+
Description-Content-Type: text/markdown
|
13
|
+
Requires-Dist: karrio
|
14
|
+
|
15
|
+
# karrio.sendcloud
|
16
|
+
|
17
|
+
This package is a SendCloud extension of the [karrio](https://pypi.org/project/karrio) multi carrier shipping SDK.
|
18
|
+
|
19
|
+
## Requirements
|
20
|
+
|
21
|
+
`Python 3.11+`
|
22
|
+
|
23
|
+
## Installation
|
24
|
+
|
25
|
+
```bash
|
26
|
+
pip install karrio.sendcloud
|
27
|
+
```
|
28
|
+
|
29
|
+
## Usage
|
30
|
+
|
31
|
+
```python
|
32
|
+
import karrio.sdk as karrio
|
33
|
+
from karrio.mappers.sendcloud.settings import Settings
|
34
|
+
|
35
|
+
|
36
|
+
# Initialize a carrier gateway
|
37
|
+
sendcloud = karrio.gateway["sendcloud"].create(
|
38
|
+
Settings(
|
39
|
+
...
|
40
|
+
)
|
41
|
+
)
|
42
|
+
```
|
43
|
+
|
44
|
+
Check the [Karrio Mutli-carrier SDK docs](https://docs.karrio.io) for Shipping API requests
|
@@ -0,0 +1,33 @@
|
|
1
|
+
karrio/mappers/sendcloud/__init__.py,sha256=qUN38tQmwbEBj9qq3yU2do2F2oBKW0q58JATXMNxhAM,628
|
2
|
+
karrio/mappers/sendcloud/mapper.py,sha256=KfYehNksqb5nph6CmXg5LX1w5HdSLH8ekilbrwrtd4s,3295
|
3
|
+
karrio/mappers/sendcloud/proxy.py,sha256=aJeqRecTfc_KmRqsOkG00k1XiOWzYzPz4cwPryycQI8,4069
|
4
|
+
karrio/mappers/sendcloud/settings.py,sha256=_Jz7AquYNvvGQCEOp_CoaikqqqnjpX-FBbyVOEbPNfw,494
|
5
|
+
karrio/plugins/sendcloud/__init__.py,sha256=gW2ogLVfHILze_ml1wjTrju2tL2jSZwP717CwIfbfCc,109
|
6
|
+
karrio/providers/sendcloud/__init__.py,sha256=td9lE2JpENsAgxs9kEdPTJqSmxDC8EqmPd_Z-S2l2xU,675
|
7
|
+
karrio/providers/sendcloud/error.py,sha256=D3K6yQZ5th1qcUhZzcGUiiE3snXnnbs0jfmzKYi912k,2826
|
8
|
+
karrio/providers/sendcloud/rate.py,sha256=Z-J78C9Yra_KP5GJS7fZGRJa5LbmsXOgo9HipJ4Kf9g,5473
|
9
|
+
karrio/providers/sendcloud/tracking.py,sha256=isJPUfGe-Mi0QgttwMpQbpyyxA9QkUGPorr2VIhD0wg,4231
|
10
|
+
karrio/providers/sendcloud/units.py,sha256=F_dQEkOrJp_7mvkFaOtQqChrq-H1MzecVixtPVl8d80,2970
|
11
|
+
karrio/providers/sendcloud/utils.py,sha256=JIQOUg7IBmO6CzBJodeuAbCaElS5CLB9dnFsN7LcMTA,3525
|
12
|
+
karrio/providers/sendcloud/pickup/__init__.py,sha256=17f06Abtw3zzEVusbKgW-Nn5CgKDAufqJeMgRvB9PoY,383
|
13
|
+
karrio/providers/sendcloud/pickup/cancel.py,sha256=f2fmeBU15yD2PH6ziSGfrX9dg7M6Uh7n9XdgS2cw0m8,1605
|
14
|
+
karrio/providers/sendcloud/pickup/create.py,sha256=xnKyUeTH1kznyWAy1PuyeBCF4a79Jc0FI8QxN2PeltM,2277
|
15
|
+
karrio/providers/sendcloud/pickup/update.py,sha256=HMz2pMU4k7TSpEx9Wiy8V3mU8bGTxGeT7RS1e3VL0zo,2337
|
16
|
+
karrio/providers/sendcloud/shipment/__init__.py,sha256=HDg9MsTlevxl7P5Ry3nWcqJxogxJ_nCaLdgDyeI-idE,235
|
17
|
+
karrio/providers/sendcloud/shipment/cancel.py,sha256=Wwk9X3vRKmJsf1P3K5E9MWhvq4gBAnwPvFRm8Lq7RFU,1936
|
18
|
+
karrio/providers/sendcloud/shipment/create.py,sha256=Ofclh5SERGXCY7Th9f4CUT-JPbnaMbo51k8Ex9Oz02c,4685
|
19
|
+
karrio/schemas/sendcloud/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
20
|
+
karrio/schemas/sendcloud/auth_request.py,sha256=Vpd9uvHscthP8BPAZVqcDb2LiG9scSXXLK-YP8HrAb0,1041
|
21
|
+
karrio/schemas/sendcloud/auth_response.py,sha256=33sWgKxB7aJ2xJnTqpLLJbouZtA8FdVxXoy49xf9KDM,341
|
22
|
+
karrio/schemas/sendcloud/error.py,sha256=O_Z0cVBu9_u6q1rWPAG_Ere8yFilMXhIKE5dAZdqvKc,556
|
23
|
+
karrio/schemas/sendcloud/rate_request.py,sha256=6bYsyuMXPG1G-6MM0h5GTjb8ynrIQiev8TR0NN8kZc4,531
|
24
|
+
karrio/schemas/sendcloud/rate_response.py,sha256=aReDMweUBrjG0heDhl7inGRozcSE1WHRwlowjmU8jHk,4868
|
25
|
+
karrio/schemas/sendcloud/shipment_request.py,sha256=VfXMIxLp9iBh7j3ZIP5bz_gCVPXF16wQm7V3Jp0dCoo,1691
|
26
|
+
karrio/schemas/sendcloud/shipment_response.py,sha256=UfzevRBbJv0n7be2gtu6kEqhqWCIWcSMupngmjdg7t0,8310
|
27
|
+
karrio/schemas/sendcloud/tracking_request.py,sha256=6Is7FJWVkKSVOWGLCeLZzBiWQprok8mxEq0K6YhANZE,607
|
28
|
+
karrio/schemas/sendcloud/tracking_response.py,sha256=qj17ax1HdEYGZSOrXVJQ8unGw0KpnuNuBTuntkTlGaE,4216
|
29
|
+
karrio_sendcloud-2025.5rc7.dist-info/METADATA,sha256=GfLqf3tc_FdwyOLTqcZ2nuJSrrgynH7yNjnEJmBH1Pc,1009
|
30
|
+
karrio_sendcloud-2025.5rc7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
31
|
+
karrio_sendcloud-2025.5rc7.dist-info/entry_points.txt,sha256=RmkhiX-qLHX5rZ8NsJzx0VAW4otKb1Oc4ZrVaU8vhrc,54
|
32
|
+
karrio_sendcloud-2025.5rc7.dist-info/top_level.txt,sha256=FZCY8Nwft8oEGHdl--xku8P3TrnOxu5dETEU_fWpRSM,20
|
33
|
+
karrio_sendcloud-2025.5rc7.dist-info/RECORD,,
|