python-sendparcel-inpost 0.1.1__py3-none-any.whl → 0.2.0__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.
@@ -0,0 +1,106 @@
1
+ Metadata-Version: 2.4
2
+ Name: python-sendparcel-inpost
3
+ Version: 0.2.0
4
+ Summary: InPost ShipX provider for python-sendparcel.
5
+ Project-URL: Homepage, https://github.com/python-sendparcel/python-sendparcel-inpost
6
+ Project-URL: Repository, https://github.com/python-sendparcel/python-sendparcel-inpost
7
+ Project-URL: Changelog, https://github.com/python-sendparcel/python-sendparcel-inpost/blob/main/CHANGELOG.md
8
+ Project-URL: Issue Tracker, https://github.com/python-sendparcel/python-sendparcel-inpost/issues
9
+ Author-email: Dominik Kozaczko <dominik@kozaczko.info>
10
+ License: MIT
11
+ License-File: LICENSE
12
+ Keywords: inpost,parcel,sendparcel,shipping,shipx
13
+ Classifier: Development Status :: 3 - Alpha
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Natural Language :: English
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
+ Classifier: Typing :: Typed
22
+ Requires-Python: >=3.12
23
+ Requires-Dist: anyio>=4.0
24
+ Requires-Dist: httpx>=0.27.0
25
+ Requires-Dist: python-sendparcel>=0.1.1
26
+ Provides-Extra: dev
27
+ Requires-Dist: pytest-asyncio>=0.24.0; extra == 'dev'
28
+ Requires-Dist: pytest-cov>=5.0; extra == 'dev'
29
+ Requires-Dist: pytest>=8.0; extra == 'dev'
30
+ Requires-Dist: respx>=0.22.0; extra == 'dev'
31
+ Requires-Dist: ruff>=0.9.0; extra == 'dev'
32
+ Requires-Dist: ty>=0.0.1a11; extra == 'dev'
33
+ Description-Content-Type: text/markdown
34
+
35
+ # python-sendparcel-inpost
36
+
37
+ InPost ShipX provider package for the `python-sendparcel` ecosystem.
38
+
39
+ > Alpha notice: this package tracks the still-changing `python-sendparcel` core.
40
+
41
+ ## What it provides
42
+
43
+ - `InPostLockerProvider` for locker shipments
44
+ - `InPostCourierProvider` for courier shipments
45
+ - `ShipXClient` for direct async ShipX API access
46
+ - ShipX-to-sendparcel status normalization helpers
47
+
48
+ ## Contract
49
+
50
+ This package follows the cleaned core contract:
51
+
52
+ - `create_shipment(...) -> ShipmentCreateResult`
53
+ - `create_label(...) -> LabelInfo`
54
+ - `handle_callback(...) -> ShipmentUpdateResult`
55
+ - `fetch_shipment_status(...) -> ShipmentUpdateResult`
56
+ - `cancel_shipment(...) -> bool`
57
+
58
+ Providers do not mutate shipment state directly. They translate ShipX responses into normalized results that the core flow applies.
59
+
60
+ ## Installation
61
+
62
+ ```bash
63
+ uv add python-sendparcel-inpost
64
+ ```
65
+
66
+ or:
67
+
68
+ ```bash
69
+ pip install python-sendparcel-inpost
70
+ ```
71
+
72
+ ## Configuration
73
+
74
+ | Key | Type | Description |
75
+ |---|---|---|
76
+ | `token` | `str` | ShipX API bearer token |
77
+ | `organization_id` | `int` | ShipX organization ID |
78
+ | `sandbox` | `bool` | Use sandbox API |
79
+ | `base_url` | `str` | Optional API base override |
80
+ | `timeout` | `float` | Request timeout in seconds |
81
+
82
+ ## Status normalization
83
+
84
+ ShipX statuses are normalized to sendparcel shipment statuses.
85
+
86
+ - recognized ShipX statuses produce `{"status": ...}`
87
+ - tracking numbers are included when available
88
+ - unknown ShipX statuses do not invent fake sendparcel statuses
89
+
90
+ That means callback and polling updates can safely return only tracking data when ShipX introduces a new status the mapper does not know yet.
91
+
92
+ ## Labels
93
+
94
+ Labels are returned as payloads.
95
+
96
+ - PDF labels are returned as base64 content in `LabelInfo["content_base64"]`
97
+ - no label URL is persisted by the core contract
98
+
99
+ ## Development
100
+
101
+ ```bash
102
+ uv sync --extra dev
103
+ uv run pytest
104
+ uv run ruff check src tests
105
+ uv run mypy src tests
106
+ ```
@@ -0,0 +1,16 @@
1
+ sendparcel_inpost/__init__.py,sha256=iF669tt96Ux4fW-DD2XAIiYEX7_F36gFGxZ9Mui-nzA,460
2
+ sendparcel_inpost/client.py,sha256=wxoCH-7FQc7zdqE2xEXDyBLt-DSdKPHN4s1opTj6YvQ,25607
3
+ sendparcel_inpost/enums.py,sha256=8R0BPxTc_PQdPTjYXMIFlFjNju4X6hL8Xq3EEUe5J94,384
4
+ sendparcel_inpost/exceptions.py,sha256=JRCsLiqLU_u96aVVa5xz9a4MAVBxB6CqR6g_83YyD44,2061
5
+ sendparcel_inpost/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
+ sendparcel_inpost/status_mapping.py,sha256=XPmp-92CUOidLY1EPeL7d0PGDEsqgRAJxK3247y5zWk,2251
7
+ sendparcel_inpost/types.py,sha256=Pu-OJpC6te4_gY6PLv-Ag0o2IoulYytdr9t0FGf4GIA,1426
8
+ sendparcel_inpost/providers/__init__.py,sha256=akn431q6mekenZV5Y4wjCh2UkLSi2s51umBHZ37orJg,336
9
+ sendparcel_inpost/providers/base.py,sha256=dNxSTiE-BrJCCEmTlMVOuriLqpKu1wkMtM8dQspu5C4,12613
10
+ sendparcel_inpost/providers/courier.py,sha256=N-lGvL_6R6wq0nnJUum8wvMwKLjDric8Vv4xODWm5Rg,2799
11
+ sendparcel_inpost/providers/locker.py,sha256=1DG5nPcJGNlJP-ul87U_VBZkvt4VZXKhIws54kYTRe0,3074
12
+ python_sendparcel_inpost-0.2.0.dist-info/METADATA,sha256=XKB409WqD0F3SmgsND_xHd43uy29VUeZ5u9_-WBQGQ0,3446
13
+ python_sendparcel_inpost-0.2.0.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
14
+ python_sendparcel_inpost-0.2.0.dist-info/entry_points.txt,sha256=XuQdmE0LIuIc3TvGPWnYjoB14zXCEof6Q8h1tMp2arE,170
15
+ python_sendparcel_inpost-0.2.0.dist-info/licenses/LICENSE,sha256=IZXSBOjgGvChgayLmtTnU40iE7hsrrU3WVEYKx0sywY,1075
16
+ python_sendparcel_inpost-0.2.0.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.29.0
2
+ Generator: hatchling 1.30.1
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -0,0 +1,10 @@
1
+
2
+ MIT License
3
+
4
+ Copyright (c) 2025, Dominik Kozaczko
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
7
+
8
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
9
+
10
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,12 +1,14 @@
1
1
  """InPost ShipX provider for python-sendparcel."""
2
2
 
3
- __version__ = "0.1.0"
3
+ __version__ = "0.2.0"
4
4
 
5
5
  from sendparcel_inpost.client import ShipXClient
6
+ from sendparcel_inpost.exceptions import CircuitBreakerError
6
7
  from sendparcel_inpost.providers.courier import InPostCourierProvider
7
8
  from sendparcel_inpost.providers.locker import InPostLockerProvider
8
9
 
9
10
  __all__ = [
11
+ "CircuitBreakerError",
10
12
  "InPostCourierProvider",
11
13
  "InPostLockerProvider",
12
14
  "ShipXClient",