karrio-parcelone 2026.1__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/parcelone/__init__.py +3 -0
- karrio/mappers/parcelone/mapper.py +50 -0
- karrio/mappers/parcelone/proxy.py +84 -0
- karrio/mappers/parcelone/settings.py +36 -0
- karrio/plugins/parcelone/__init__.py +28 -0
- karrio/providers/parcelone/__init__.py +17 -0
- karrio/providers/parcelone/error.py +76 -0
- karrio/providers/parcelone/rate.py +162 -0
- karrio/providers/parcelone/shipment/__init__.py +17 -0
- karrio/providers/parcelone/shipment/cancel.py +60 -0
- karrio/providers/parcelone/shipment/create.py +250 -0
- karrio/providers/parcelone/tracking.py +141 -0
- karrio/providers/parcelone/units.py +326 -0
- karrio/providers/parcelone/utils.py +63 -0
- karrio/schemas/parcelone/__init__.py +6 -0
- karrio/schemas/parcelone/error.py +27 -0
- karrio/schemas/parcelone/shipping_request.py +202 -0
- karrio/schemas/parcelone/shipping_response.py +171 -0
- karrio/schemas/parcelone/tracking_response.py +45 -0
- karrio_parcelone-2026.1.dist-info/METADATA +47 -0
- karrio_parcelone-2026.1.dist-info/RECORD +26 -0
- karrio_parcelone-2026.1.dist-info/WHEEL +5 -0
- karrio_parcelone-2026.1.dist-info/entry_points.txt +2 -0
- karrio_parcelone-2026.1.dist-info/top_level.txt +5 -0
- modules/connectors/parcelone/karrio/schemas/__init__.py +0 -0
- modules/connectors/parcelone/karrio/schemas/parcelone/__init__.py +0 -0
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
"""ParcelOne Shipping REST API v1 - Response Types."""
|
|
2
|
+
|
|
3
|
+
import attr
|
|
4
|
+
import jstruct
|
|
5
|
+
import typing
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@attr.s(auto_attribs=True)
|
|
9
|
+
class FormatType:
|
|
10
|
+
"""Document format."""
|
|
11
|
+
|
|
12
|
+
Type: typing.Optional[str] = None
|
|
13
|
+
Size: typing.Optional[str] = None
|
|
14
|
+
Unit: typing.Optional[str] = None
|
|
15
|
+
Orientation: typing.Optional[int] = None
|
|
16
|
+
Height: typing.Optional[str] = None
|
|
17
|
+
Width: typing.Optional[str] = None
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@attr.s(auto_attribs=True)
|
|
21
|
+
class AmountType:
|
|
22
|
+
"""Monetary amount."""
|
|
23
|
+
|
|
24
|
+
Currency: typing.Optional[str] = None
|
|
25
|
+
Value: typing.Optional[str] = None
|
|
26
|
+
Description: typing.Optional[str] = None
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
@attr.s(auto_attribs=True)
|
|
30
|
+
class ShipmentErrorType:
|
|
31
|
+
"""Error information."""
|
|
32
|
+
|
|
33
|
+
ErrorNo: typing.Optional[str] = None
|
|
34
|
+
Message: typing.Optional[str] = None
|
|
35
|
+
StatusCode: typing.Optional[str] = None
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
@attr.s(auto_attribs=True)
|
|
39
|
+
class ShipmentWarningType:
|
|
40
|
+
"""Warning information."""
|
|
41
|
+
|
|
42
|
+
WarningNo: typing.Optional[str] = None
|
|
43
|
+
Message: typing.Optional[str] = None
|
|
44
|
+
StatusCode: typing.Optional[str] = None
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
@attr.s(auto_attribs=True)
|
|
48
|
+
class ShipmentActionResultType:
|
|
49
|
+
"""Result of shipment action with IDs and status."""
|
|
50
|
+
|
|
51
|
+
ShipmentID: typing.Optional[str] = None
|
|
52
|
+
ShipmentRef: typing.Optional[str] = None
|
|
53
|
+
TrackingID: typing.Optional[str] = None
|
|
54
|
+
Success: typing.Optional[int] = None
|
|
55
|
+
Errors: typing.Optional[typing.List[ShipmentErrorType]] = jstruct.JList[ShipmentErrorType]
|
|
56
|
+
Warnings: typing.Optional[typing.List[ShipmentWarningType]] = jstruct.JList[ShipmentWarningType]
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
@attr.s(auto_attribs=True)
|
|
60
|
+
class ShipmentPackageResultType:
|
|
61
|
+
"""Package result with label and tracking info."""
|
|
62
|
+
|
|
63
|
+
ShipmentID: typing.Optional[str] = None
|
|
64
|
+
PackageID: typing.Optional[int] = None
|
|
65
|
+
PackageRef: typing.Optional[str] = None
|
|
66
|
+
TrackingID: typing.Optional[str] = None
|
|
67
|
+
DocType: typing.Optional[str] = None
|
|
68
|
+
Format: typing.Optional[FormatType] = jstruct.JStruct[FormatType]
|
|
69
|
+
Label: typing.Optional[str] = None
|
|
70
|
+
TrackingURL: typing.Optional[str] = None
|
|
71
|
+
CarrierTrackURL: typing.Optional[str] = None
|
|
72
|
+
Charges: typing.Optional[typing.List[AmountType]] = jstruct.JList[AmountType]
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
@attr.s(auto_attribs=True)
|
|
76
|
+
class ShipmentDocumentsResultType:
|
|
77
|
+
"""Document result (returns, customs docs, etc)."""
|
|
78
|
+
|
|
79
|
+
ShipmentID: typing.Optional[str] = None
|
|
80
|
+
PackageID: typing.Optional[str] = None
|
|
81
|
+
TrackingID: typing.Optional[str] = None
|
|
82
|
+
DocType: typing.Optional[str] = None
|
|
83
|
+
Format: typing.Optional[FormatType] = jstruct.JStruct[FormatType]
|
|
84
|
+
Document: typing.Optional[str] = None
|
|
85
|
+
Charges: typing.Optional[typing.List[AmountType]] = jstruct.JList[AmountType]
|
|
86
|
+
PackageRef: typing.Optional[str] = None
|
|
87
|
+
PackageTrackingID: typing.Optional[str] = None
|
|
88
|
+
ActionResult: typing.Optional[ShipmentActionResultType] = jstruct.JStruct[ShipmentActionResultType]
|
|
89
|
+
DocumentID: typing.Optional[str] = None
|
|
90
|
+
Type: typing.Optional[str] = None
|
|
91
|
+
Size: typing.Optional[str] = None
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
@attr.s(auto_attribs=True)
|
|
95
|
+
class ShipmentResultType:
|
|
96
|
+
"""Complete shipment result with labels and documents."""
|
|
97
|
+
|
|
98
|
+
YourShipmentID: typing.Optional[str] = None
|
|
99
|
+
ActionResult: typing.Optional[ShipmentActionResultType] = jstruct.JStruct[ShipmentActionResultType]
|
|
100
|
+
LabelURL: typing.Optional[str] = None
|
|
101
|
+
Charges: typing.Optional[typing.List[AmountType]] = jstruct.JList[AmountType]
|
|
102
|
+
TotalCharges: typing.Optional[AmountType] = jstruct.JStruct[AmountType]
|
|
103
|
+
PackageResults: typing.Optional[typing.List[ShipmentPackageResultType]] = jstruct.JList[ShipmentPackageResultType]
|
|
104
|
+
DocumentsResults: typing.Optional[typing.List[ShipmentDocumentsResultType]] = jstruct.JList[ShipmentDocumentsResultType]
|
|
105
|
+
InternationalDocumentsResults: typing.Optional[typing.List[ShipmentDocumentsResultType]] = jstruct.JList[ShipmentDocumentsResultType]
|
|
106
|
+
LabelsAvailable: typing.Optional[int] = None
|
|
107
|
+
DocumentsAvailable: typing.Optional[int] = None
|
|
108
|
+
InternationalDocumentsAvailable: typing.Optional[int] = None
|
|
109
|
+
InternationalDocumentsNeeded: typing.Optional[int] = None
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
@attr.s(auto_attribs=True)
|
|
113
|
+
class ShippingResponseType:
|
|
114
|
+
"""Root shipping response wrapper."""
|
|
115
|
+
|
|
116
|
+
status: typing.Optional[int] = None
|
|
117
|
+
success: typing.Optional[int] = None
|
|
118
|
+
message: typing.Optional[str] = None
|
|
119
|
+
type: typing.Optional[str] = None
|
|
120
|
+
instance: typing.Optional[str] = None
|
|
121
|
+
results: typing.Optional[ShipmentResultType] = jstruct.JStruct[ShipmentResultType]
|
|
122
|
+
UniqId: typing.Optional[str] = None
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
@attr.s(auto_attribs=True)
|
|
126
|
+
class ShipmentStatusResultType:
|
|
127
|
+
"""Shipment status result."""
|
|
128
|
+
|
|
129
|
+
ActionResult: typing.Optional[ShipmentActionResultType] = jstruct.JStruct[ShipmentActionResultType]
|
|
130
|
+
ShipmentStatusCode: typing.Optional[str] = None
|
|
131
|
+
ShipmentStatus: typing.Optional[str] = None
|
|
132
|
+
LastTrackingNo: typing.Optional[str] = None
|
|
133
|
+
LastCEP: typing.Optional[str] = None
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
@attr.s(auto_attribs=True)
|
|
137
|
+
class ShipmentStatusResponseType:
|
|
138
|
+
"""Shipment status API response."""
|
|
139
|
+
|
|
140
|
+
status: typing.Optional[int] = None
|
|
141
|
+
success: typing.Optional[int] = None
|
|
142
|
+
message: typing.Optional[str] = None
|
|
143
|
+
type: typing.Optional[str] = None
|
|
144
|
+
instance: typing.Optional[str] = None
|
|
145
|
+
results: typing.Optional[ShipmentStatusResultType] = jstruct.JStruct[ShipmentStatusResultType]
|
|
146
|
+
UniqId: typing.Optional[str] = None
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
@attr.s(auto_attribs=True)
|
|
150
|
+
class CancelShipmentResultType:
|
|
151
|
+
"""Cancel shipment result."""
|
|
152
|
+
|
|
153
|
+
ShipmentID: typing.Optional[str] = None
|
|
154
|
+
ShipmentRef: typing.Optional[str] = None
|
|
155
|
+
TrackingID: typing.Optional[str] = None
|
|
156
|
+
Success: typing.Optional[int] = None
|
|
157
|
+
Errors: typing.Optional[typing.List[ShipmentErrorType]] = jstruct.JList[ShipmentErrorType]
|
|
158
|
+
Warnings: typing.Optional[typing.List[ShipmentWarningType]] = jstruct.JList[ShipmentWarningType]
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
@attr.s(auto_attribs=True)
|
|
162
|
+
class CancelShipmentResponseType:
|
|
163
|
+
"""Cancel shipment API response."""
|
|
164
|
+
|
|
165
|
+
status: typing.Optional[int] = None
|
|
166
|
+
success: typing.Optional[int] = None
|
|
167
|
+
message: typing.Optional[str] = None
|
|
168
|
+
type: typing.Optional[str] = None
|
|
169
|
+
instance: typing.Optional[str] = None
|
|
170
|
+
results: typing.Optional[CancelShipmentResultType] = jstruct.JStruct[CancelShipmentResultType]
|
|
171
|
+
UniqId: typing.Optional[str] = None
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"""ParcelOne TrackLMC REST API v1 - Response Types."""
|
|
2
|
+
|
|
3
|
+
import attr
|
|
4
|
+
import jstruct
|
|
5
|
+
import typing
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@attr.s(auto_attribs=True)
|
|
9
|
+
class TrackingEventType:
|
|
10
|
+
"""Single tracking event."""
|
|
11
|
+
|
|
12
|
+
DateTime: typing.Optional[str] = None
|
|
13
|
+
Location: typing.Optional[str] = None
|
|
14
|
+
Status: typing.Optional[str] = None
|
|
15
|
+
StatusCode: typing.Optional[str] = None
|
|
16
|
+
Description: typing.Optional[str] = None
|
|
17
|
+
Carrier: typing.Optional[str] = None
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@attr.s(auto_attribs=True)
|
|
21
|
+
class TrackingResultType:
|
|
22
|
+
"""Tracking result with events."""
|
|
23
|
+
|
|
24
|
+
TrackingID: typing.Optional[str] = None
|
|
25
|
+
CarrierIDLMC: typing.Optional[str] = None
|
|
26
|
+
CarrierTrackingID: typing.Optional[str] = None
|
|
27
|
+
Status: typing.Optional[str] = None
|
|
28
|
+
StatusCode: typing.Optional[str] = None
|
|
29
|
+
DeliveryDate: typing.Optional[str] = None
|
|
30
|
+
EstimatedDelivery: typing.Optional[str] = None
|
|
31
|
+
SignedBy: typing.Optional[str] = None
|
|
32
|
+
Events: typing.Optional[typing.List[TrackingEventType]] = jstruct.JList[TrackingEventType]
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
@attr.s(auto_attribs=True)
|
|
36
|
+
class TrackingResponseType:
|
|
37
|
+
"""TrackLMC API response."""
|
|
38
|
+
|
|
39
|
+
status: typing.Optional[int] = None
|
|
40
|
+
success: typing.Optional[int] = None
|
|
41
|
+
message: typing.Optional[str] = None
|
|
42
|
+
type: typing.Optional[str] = None
|
|
43
|
+
instance: typing.Optional[str] = None
|
|
44
|
+
results: typing.Optional[TrackingResultType] = jstruct.JStruct[TrackingResultType]
|
|
45
|
+
UniqId: typing.Optional[str] = None
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: karrio_parcelone
|
|
3
|
+
Version: 2026.1
|
|
4
|
+
Summary: Karrio - ParcelOne Shipping Extension
|
|
5
|
+
Author-email: karrio <hello@karrio.io>
|
|
6
|
+
License-Expression: LGPL-3.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.parcelone
|
|
16
|
+
|
|
17
|
+
This package is a ParcelOne 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.parcelone
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Usage
|
|
30
|
+
|
|
31
|
+
```python
|
|
32
|
+
import karrio
|
|
33
|
+
from karrio.mappers.parcelone.settings import Settings
|
|
34
|
+
|
|
35
|
+
# Initialize a gateway with your ParcelOne credentials
|
|
36
|
+
gateway = karrio.gateway["parcelone"].create(
|
|
37
|
+
Settings(
|
|
38
|
+
username="your-username",
|
|
39
|
+
password="your-password",
|
|
40
|
+
mandator_id="your-mandator-id",
|
|
41
|
+
consigner_id="your-consigner-id",
|
|
42
|
+
test_mode=True,
|
|
43
|
+
)
|
|
44
|
+
)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Check the [karrio documentation](https://docs.karrio.io) for more details.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
karrio/mappers/parcelone/__init__.py,sha256=Hm9BZgD1F-cH6se9I5Lm9UbfPiN_QcdQ4A5ttNVN6Bo,155
|
|
2
|
+
karrio/mappers/parcelone/mapper.py,sha256=Ykbr_l7VrHOK-AwRDkdYoz9yxkIDwOrnlr9YmmORlzA,1967
|
|
3
|
+
karrio/mappers/parcelone/proxy.py,sha256=hzpB2eXCdB8Kf2PF6wbhYCuKOHwttM-Vuqruut1nWCE,3050
|
|
4
|
+
karrio/mappers/parcelone/settings.py,sha256=pV7bY8h1r-f9MFO3YlOVz-HUM2CEmTY0wV7SMhxvSPM,1093
|
|
5
|
+
karrio/plugins/parcelone/__init__.py,sha256=_HfYwz4S1WJ7slylNLWHgVdSiRRxLYG_HGcJ7_O1R-g,1016
|
|
6
|
+
karrio/providers/parcelone/__init__.py,sha256=rPdlLNi9BuIe-KvOGApmypWKXe6ed1OZdSk-iJ7mYEE,458
|
|
7
|
+
karrio/providers/parcelone/error.py,sha256=S1eHg4Glhg4bJeUQQIrPa4Xqoc7aD0UpWnT4WRUHDwI,2680
|
|
8
|
+
karrio/providers/parcelone/rate.py,sha256=K3VphVI_fsF23auRoMYi_0tS4q9zGf2l-aNyY09rPKY,6033
|
|
9
|
+
karrio/providers/parcelone/tracking.py,sha256=6K4PbYPM2KjgcmZZ1OxrcVrf9obSI9CAPlOvoq0mJqQ,4735
|
|
10
|
+
karrio/providers/parcelone/units.py,sha256=T1q_4RDG_5PgUyoWAtTrP4P6fGaN7vreau6BSXUudp4,9913
|
|
11
|
+
karrio/providers/parcelone/utils.py,sha256=RCFFMyvnzamRZozZPH9y1kaoI3cqqLhkTI52Tu9bIyk,1594
|
|
12
|
+
karrio/providers/parcelone/shipment/__init__.py,sha256=PHnQyOCF2Nd7pJ2um51RBubPNBlN72w41Ialoz93qB4,411
|
|
13
|
+
karrio/providers/parcelone/shipment/cancel.py,sha256=P4hufFBTOkyUFQgWqXR6SMS_grVWCuWwLb_cQvVRMLM,1995
|
|
14
|
+
karrio/providers/parcelone/shipment/create.py,sha256=_siw6FYpZ7xxHC4t38pa27Gch_gXmPrayitvgS02JSI,10338
|
|
15
|
+
karrio/schemas/parcelone/__init__.py,sha256=WfvAzf5Bf2YmkigHqWpsHgwfFZrRpBoDYojc2QMxjxY,250
|
|
16
|
+
karrio/schemas/parcelone/error.py,sha256=Js8AAYR5m24C_anVYEhDUQ1e1wYI98HPVT8rCPn8eh0,718
|
|
17
|
+
karrio/schemas/parcelone/shipping_request.py,sha256=cEmB5WMvWOAbzZPpPdLnKG0g8voWHkya7dKLWZkBF6c,6802
|
|
18
|
+
karrio/schemas/parcelone/shipping_response.py,sha256=ufxUaLy_4ML05pADxIYHYOhxFapHbc18dgQ0UcEMoLQ,6205
|
|
19
|
+
karrio/schemas/parcelone/tracking_response.py,sha256=emkJ4kcX3dnHPMCYz-CW6iCea0AlONdb_igba4UO-dQ,1413
|
|
20
|
+
modules/connectors/parcelone/karrio/schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
21
|
+
modules/connectors/parcelone/karrio/schemas/parcelone/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
22
|
+
karrio_parcelone-2026.1.dist-info/METADATA,sha256=COZGvYiIkKOsBBmOvicEyQn0ndrgbsSjgrhYrhqw0pM,1156
|
|
23
|
+
karrio_parcelone-2026.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
24
|
+
karrio_parcelone-2026.1.dist-info/entry_points.txt,sha256=1OkpMf6SZ1OT_O_KDu2HDN1aAi53cZs7hKuEMZeBob0,63
|
|
25
|
+
karrio_parcelone-2026.1.dist-info/top_level.txt,sha256=vW2vHMlcvPhowYde9HXvS4SbHP3s8Kk0TmJE1d4dfHE,35
|
|
26
|
+
karrio_parcelone-2026.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|