open-logistics-sdk 0.2.2__tar.gz

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.
Files changed (85) hide show
  1. open_logistics_sdk-0.2.2/PKG-INFO +42 -0
  2. open_logistics_sdk-0.2.2/README.md +27 -0
  3. open_logistics_sdk-0.2.2/open_logistics/__init__.py +1 -0
  4. open_logistics_sdk-0.2.2/open_logistics/delhivery/__init__.py +94 -0
  5. open_logistics_sdk-0.2.2/open_logistics/delhivery/api/__init__.py +11 -0
  6. open_logistics_sdk-0.2.2/open_logistics/delhivery/api/orders_api.py +608 -0
  7. open_logistics_sdk-0.2.2/open_logistics/delhivery/api/pickup_requests_api.py +310 -0
  8. open_logistics_sdk-0.2.2/open_logistics/delhivery/api/rates_api.py +385 -0
  9. open_logistics_sdk-0.2.2/open_logistics/delhivery/api/serviceability_api.py +335 -0
  10. open_logistics_sdk-0.2.2/open_logistics/delhivery/api/shipments_api.py +318 -0
  11. open_logistics_sdk-0.2.2/open_logistics/delhivery/api/tracking_api.py +318 -0
  12. open_logistics_sdk-0.2.2/open_logistics/delhivery/api/waybills_api.py +682 -0
  13. open_logistics_sdk-0.2.2/open_logistics/delhivery/api_client.py +865 -0
  14. open_logistics_sdk-0.2.2/open_logistics/delhivery/api_response.py +21 -0
  15. open_logistics_sdk-0.2.2/open_logistics/delhivery/configuration.py +679 -0
  16. open_logistics_sdk-0.2.2/open_logistics/delhivery/exceptions.py +218 -0
  17. open_logistics_sdk-0.2.2/open_logistics/delhivery/models/__init__.py +33 -0
  18. open_logistics_sdk-0.2.2/open_logistics/delhivery/models/delhivery_api_error_body.py +121 -0
  19. open_logistics_sdk-0.2.2/open_logistics/delhivery/models/delhivery_api_error_body_errors_value.py +143 -0
  20. open_logistics_sdk-0.2.2/open_logistics/delhivery/models/delhivery_order_create_response.py +117 -0
  21. open_logistics_sdk-0.2.2/open_logistics/delhivery/models/delhivery_order_edit_payload.py +120 -0
  22. open_logistics_sdk-0.2.2/open_logistics/delhivery/models/delhivery_order_edit_response.py +107 -0
  23. open_logistics_sdk-0.2.2/open_logistics/delhivery/models/delhivery_packing_slip_response.py +107 -0
  24. open_logistics_sdk-0.2.2/open_logistics/delhivery/models/delhivery_pickup_location.py +88 -0
  25. open_logistics_sdk-0.2.2/open_logistics/delhivery/models/delhivery_pickup_request_payload.py +94 -0
  26. open_logistics_sdk-0.2.2/open_logistics/delhivery/models/delhivery_pickup_request_response.py +105 -0
  27. open_logistics_sdk-0.2.2/open_logistics/delhivery/models/delhivery_postal_code_serviceability.py +136 -0
  28. open_logistics_sdk-0.2.2/open_logistics/delhivery/models/delhivery_rate_response_inner.py +109 -0
  29. open_logistics_sdk-0.2.2/open_logistics/delhivery/models/delhivery_serviceability_response.py +108 -0
  30. open_logistics_sdk-0.2.2/open_logistics/delhivery/models/delhivery_serviceability_response_delivery_codes_inner.py +105 -0
  31. open_logistics_sdk-0.2.2/open_logistics/delhivery/models/delhivery_shipment_item.py +109 -0
  32. open_logistics_sdk-0.2.2/open_logistics/delhivery/models/delhivery_shipment_payload.py +199 -0
  33. open_logistics_sdk-0.2.2/open_logistics/delhivery/models/delhivery_shipment_payload_qc.py +143 -0
  34. open_logistics_sdk-0.2.2/open_logistics/delhivery/models/delhivery_tracking_response.py +101 -0
  35. open_logistics_sdk-0.2.2/open_logistics/delhivery/rest.py +334 -0
  36. open_logistics_sdk-0.2.2/open_logistics/py.typed +0 -0
  37. open_logistics_sdk-0.2.2/open_logistics/shiprocket/__init__.py +114 -0
  38. open_logistics_sdk-0.2.2/open_logistics/shiprocket/api/__init__.py +10 -0
  39. open_logistics_sdk-0.2.2/open_logistics/shiprocket/api/auth_api.py +309 -0
  40. open_logistics_sdk-0.2.2/open_logistics/shiprocket/api/courier_api.py +889 -0
  41. open_logistics_sdk-0.2.2/open_logistics/shiprocket/api/orders_api.py +1130 -0
  42. open_logistics_sdk-0.2.2/open_logistics/shiprocket/api/rates_api.py +367 -0
  43. open_logistics_sdk-0.2.2/open_logistics/shiprocket/api/shipments_api.py +1137 -0
  44. open_logistics_sdk-0.2.2/open_logistics/shiprocket/api/tracking_api.py +819 -0
  45. open_logistics_sdk-0.2.2/open_logistics/shiprocket/api_client.py +865 -0
  46. open_logistics_sdk-0.2.2/open_logistics/shiprocket/api_response.py +21 -0
  47. open_logistics_sdk-0.2.2/open_logistics/shiprocket/configuration.py +654 -0
  48. open_logistics_sdk-0.2.2/open_logistics/shiprocket/exceptions.py +218 -0
  49. open_logistics_sdk-0.2.2/open_logistics/shiprocket/models/__init__.py +44 -0
  50. open_logistics_sdk-0.2.2/open_logistics/shiprocket/models/assign_awb_payload.py +90 -0
  51. open_logistics_sdk-0.2.2/open_logistics/shiprocket/models/assign_awb_response.py +94 -0
  52. open_logistics_sdk-0.2.2/open_logistics/shiprocket/models/assign_awb_response_response.py +92 -0
  53. open_logistics_sdk-0.2.2/open_logistics/shiprocket/models/assign_awb_response_response_data.py +90 -0
  54. open_logistics_sdk-0.2.2/open_logistics/shiprocket/models/auth_credentials.py +90 -0
  55. open_logistics_sdk-0.2.2/open_logistics/shiprocket/models/auth_response.py +96 -0
  56. open_logistics_sdk-0.2.2/open_logistics/shiprocket/models/cancel_orders_payload.py +88 -0
  57. open_logistics_sdk-0.2.2/open_logistics/shiprocket/models/create_order_payload.py +160 -0
  58. open_logistics_sdk-0.2.2/open_logistics/shiprocket/models/generate_label_payload.py +88 -0
  59. open_logistics_sdk-0.2.2/open_logistics/shiprocket/models/generate_label_response.py +90 -0
  60. open_logistics_sdk-0.2.2/open_logistics/shiprocket/models/generate_manifest_payload.py +88 -0
  61. open_logistics_sdk-0.2.2/open_logistics/shiprocket/models/generate_pickup_payload.py +88 -0
  62. open_logistics_sdk-0.2.2/open_logistics/shiprocket/models/generate_pickup_response.py +94 -0
  63. open_logistics_sdk-0.2.2/open_logistics/shiprocket/models/generate_pickup_response_response.py +92 -0
  64. open_logistics_sdk-0.2.2/open_logistics/shiprocket/models/generate_pickup_response_response_data.py +88 -0
  65. open_logistics_sdk-0.2.2/open_logistics/shiprocket/models/manifest_response.py +88 -0
  66. open_logistics_sdk-0.2.2/open_logistics/shiprocket/models/message_response.py +88 -0
  67. open_logistics_sdk-0.2.2/open_logistics/shiprocket/models/order_item.py +100 -0
  68. open_logistics_sdk-0.2.2/open_logistics/shiprocket/models/order_response.py +117 -0
  69. open_logistics_sdk-0.2.2/open_logistics/shiprocket/models/paginated_orders.py +101 -0
  70. open_logistics_sdk-0.2.2/open_logistics/shiprocket/models/paginated_orders_meta.py +92 -0
  71. open_logistics_sdk-0.2.2/open_logistics/shiprocket/models/pagination.py +96 -0
  72. open_logistics_sdk-0.2.2/open_logistics/shiprocket/models/print_manifest_payload.py +88 -0
  73. open_logistics_sdk-0.2.2/open_logistics/shiprocket/models/shiprocket_error.py +92 -0
  74. open_logistics_sdk-0.2.2/open_logistics/shiprocket/models/track_activity.py +96 -0
  75. open_logistics_sdk-0.2.2/open_logistics/shiprocket/models/track_by_awb_response.py +92 -0
  76. open_logistics_sdk-0.2.2/open_logistics/shiprocket/models/track_by_awb_response_tracking_data.py +110 -0
  77. open_logistics_sdk-0.2.2/open_logistics/shiprocket/models/track_event.py +131 -0
  78. open_logistics_sdk-0.2.2/open_logistics/shiprocket/rest.py +334 -0
  79. open_logistics_sdk-0.2.2/open_logistics_sdk.egg-info/PKG-INFO +42 -0
  80. open_logistics_sdk-0.2.2/open_logistics_sdk.egg-info/SOURCES.txt +84 -0
  81. open_logistics_sdk-0.2.2/open_logistics_sdk.egg-info/dependency_links.txt +1 -0
  82. open_logistics_sdk-0.2.2/open_logistics_sdk.egg-info/requires.txt +4 -0
  83. open_logistics_sdk-0.2.2/open_logistics_sdk.egg-info/top_level.txt +1 -0
  84. open_logistics_sdk-0.2.2/pyproject.toml +97 -0
  85. open_logistics_sdk-0.2.2/setup.cfg +7 -0
@@ -0,0 +1,42 @@
1
+ Metadata-Version: 2.4
2
+ Name: open-logistics-sdk
3
+ Version: 0.2.2
4
+ Summary: Open Logistics — Shiprocket and Delhivery
5
+ Author: Open Logistics
6
+ License: MIT
7
+ Project-URL: Repository, https://github.com/kush34/open-logistics
8
+ Keywords: logistics,shiprocket,delhivery,shipping,api-client
9
+ Requires-Python: >=3.11
10
+ Description-Content-Type: text/markdown
11
+ Requires-Dist: urllib3<3.0.0,>=2.7.0
12
+ Requires-Dist: python-dateutil>=2.8.2
13
+ Requires-Dist: pydantic>=2.11
14
+ Requires-Dist: typing-extensions>=4.7.1
15
+
16
+ # open-logistics
17
+
18
+ Python client for the Shiprocket and Delhivery APIs.
19
+
20
+ ## Install
21
+
22
+ ```bash
23
+ pip install open-logistics-sdk
24
+ ```
25
+
26
+ The distribution is `open-logistics-sdk` because `open-logistics` is taken on
27
+ PyPI; the import package is `open_logistics`.
28
+
29
+ ## Modules
30
+
31
+ - `open_logistics.shiprocket` — Shiprocket APIs and models (docs in `docs/shiprocket/`)
32
+ - `open_logistics.delhivery` — Delhivery APIs and models (docs in `docs/delhivery/`)
33
+
34
+ ```python
35
+ from open_logistics.shiprocket import ApiClient, AuthApi, AuthCredentials, Configuration, OrdersApi
36
+
37
+ configuration = Configuration(host="https://apiv2.shiprocket.in/v1/external")
38
+ with ApiClient(configuration) as api_client:
39
+ auth = AuthApi(api_client).auth_login(AuthCredentials(email=..., password=...))
40
+ configuration.access_token = auth.token
41
+ order = OrdersApi(api_client).orders_create(payload)
42
+ ```
@@ -0,0 +1,27 @@
1
+ # open-logistics
2
+
3
+ Python client for the Shiprocket and Delhivery APIs.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ pip install open-logistics-sdk
9
+ ```
10
+
11
+ The distribution is `open-logistics-sdk` because `open-logistics` is taken on
12
+ PyPI; the import package is `open_logistics`.
13
+
14
+ ## Modules
15
+
16
+ - `open_logistics.shiprocket` — Shiprocket APIs and models (docs in `docs/shiprocket/`)
17
+ - `open_logistics.delhivery` — Delhivery APIs and models (docs in `docs/delhivery/`)
18
+
19
+ ```python
20
+ from open_logistics.shiprocket import ApiClient, AuthApi, AuthCredentials, Configuration, OrdersApi
21
+
22
+ configuration = Configuration(host="https://apiv2.shiprocket.in/v1/external")
23
+ with ApiClient(configuration) as api_client:
24
+ auth = AuthApi(api_client).auth_login(AuthCredentials(email=..., password=...))
25
+ configuration.access_token = auth.token
26
+ order = OrdersApi(api_client).orders_create(payload)
27
+ ```
@@ -0,0 +1 @@
1
+ """Open Logistics — Shiprocket and Delhivery clients."""
@@ -0,0 +1,94 @@
1
+ # coding: utf-8
2
+
3
+ # flake8: noqa
4
+
5
+ """
6
+ Open Logistics — Delhivery
7
+
8
+ OpenAPI description of the Delhivery B2C endpoints wrapped by `open-logistics`. Source of truth for generated Python and Rust clients. Operation IDs and schema field names are intentionally snake_case so every language exposes the same names. Delhivery overloads `POST /api/p/edit` for update and cancel, and `GET /api/v1/packages/json/` for single, order, and bulk tracking. OpenAPI permits one operation per path + method, so this spec exposes `orders_edit` and `tracking_fetch`; language facades may alias them as `update`, `cancel`, `by_waybill`, `by_order_id`, and `by_waybills`.
9
+
10
+ The version of the OpenAPI document: 0.2.2
11
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
12
+
13
+ Do not edit the class manually.
14
+ """ # noqa: E501
15
+
16
+
17
+ __version__ = "0.2.2"
18
+
19
+ # Define package exports
20
+ __all__ = [
21
+ "OrdersApi",
22
+ "PickupRequestsApi",
23
+ "RatesApi",
24
+ "ServiceabilityApi",
25
+ "ShipmentsApi",
26
+ "TrackingApi",
27
+ "WaybillsApi",
28
+ "ApiResponse",
29
+ "ApiClient",
30
+ "Configuration",
31
+ "OpenApiException",
32
+ "ApiTypeError",
33
+ "ApiValueError",
34
+ "ApiKeyError",
35
+ "ApiAttributeError",
36
+ "ApiException",
37
+ "DelhiveryApiErrorBody",
38
+ "DelhiveryApiErrorBodyErrorsValue",
39
+ "DelhiveryOrderCreateResponse",
40
+ "DelhiveryOrderEditPayload",
41
+ "DelhiveryOrderEditResponse",
42
+ "DelhiveryPackingSlipResponse",
43
+ "DelhiveryPickupLocation",
44
+ "DelhiveryPickupRequestPayload",
45
+ "DelhiveryPickupRequestResponse",
46
+ "DelhiveryPostalCodeServiceability",
47
+ "DelhiveryRateResponseInner",
48
+ "DelhiveryServiceabilityResponse",
49
+ "DelhiveryServiceabilityResponseDeliveryCodesInner",
50
+ "DelhiveryShipmentItem",
51
+ "DelhiveryShipmentPayload",
52
+ "DelhiveryShipmentPayloadQc",
53
+ "DelhiveryTrackingResponse",
54
+ ]
55
+
56
+ # import apis into sdk package
57
+ from open_logistics.delhivery.api.orders_api import OrdersApi as OrdersApi
58
+ from open_logistics.delhivery.api.pickup_requests_api import PickupRequestsApi as PickupRequestsApi
59
+ from open_logistics.delhivery.api.rates_api import RatesApi as RatesApi
60
+ from open_logistics.delhivery.api.serviceability_api import ServiceabilityApi as ServiceabilityApi
61
+ from open_logistics.delhivery.api.shipments_api import ShipmentsApi as ShipmentsApi
62
+ from open_logistics.delhivery.api.tracking_api import TrackingApi as TrackingApi
63
+ from open_logistics.delhivery.api.waybills_api import WaybillsApi as WaybillsApi
64
+
65
+ # import ApiClient
66
+ from open_logistics.delhivery.api_response import ApiResponse as ApiResponse
67
+ from open_logistics.delhivery.api_client import ApiClient as ApiClient
68
+ from open_logistics.delhivery.configuration import Configuration as Configuration
69
+ from open_logistics.delhivery.exceptions import OpenApiException as OpenApiException
70
+ from open_logistics.delhivery.exceptions import ApiTypeError as ApiTypeError
71
+ from open_logistics.delhivery.exceptions import ApiValueError as ApiValueError
72
+ from open_logistics.delhivery.exceptions import ApiKeyError as ApiKeyError
73
+ from open_logistics.delhivery.exceptions import ApiAttributeError as ApiAttributeError
74
+ from open_logistics.delhivery.exceptions import ApiException as ApiException
75
+
76
+ # import models into sdk package
77
+ from open_logistics.delhivery.models.delhivery_api_error_body import DelhiveryApiErrorBody as DelhiveryApiErrorBody
78
+ from open_logistics.delhivery.models.delhivery_api_error_body_errors_value import DelhiveryApiErrorBodyErrorsValue as DelhiveryApiErrorBodyErrorsValue
79
+ from open_logistics.delhivery.models.delhivery_order_create_response import DelhiveryOrderCreateResponse as DelhiveryOrderCreateResponse
80
+ from open_logistics.delhivery.models.delhivery_order_edit_payload import DelhiveryOrderEditPayload as DelhiveryOrderEditPayload
81
+ from open_logistics.delhivery.models.delhivery_order_edit_response import DelhiveryOrderEditResponse as DelhiveryOrderEditResponse
82
+ from open_logistics.delhivery.models.delhivery_packing_slip_response import DelhiveryPackingSlipResponse as DelhiveryPackingSlipResponse
83
+ from open_logistics.delhivery.models.delhivery_pickup_location import DelhiveryPickupLocation as DelhiveryPickupLocation
84
+ from open_logistics.delhivery.models.delhivery_pickup_request_payload import DelhiveryPickupRequestPayload as DelhiveryPickupRequestPayload
85
+ from open_logistics.delhivery.models.delhivery_pickup_request_response import DelhiveryPickupRequestResponse as DelhiveryPickupRequestResponse
86
+ from open_logistics.delhivery.models.delhivery_postal_code_serviceability import DelhiveryPostalCodeServiceability as DelhiveryPostalCodeServiceability
87
+ from open_logistics.delhivery.models.delhivery_rate_response_inner import DelhiveryRateResponseInner as DelhiveryRateResponseInner
88
+ from open_logistics.delhivery.models.delhivery_serviceability_response import DelhiveryServiceabilityResponse as DelhiveryServiceabilityResponse
89
+ from open_logistics.delhivery.models.delhivery_serviceability_response_delivery_codes_inner import DelhiveryServiceabilityResponseDeliveryCodesInner as DelhiveryServiceabilityResponseDeliveryCodesInner
90
+ from open_logistics.delhivery.models.delhivery_shipment_item import DelhiveryShipmentItem as DelhiveryShipmentItem
91
+ from open_logistics.delhivery.models.delhivery_shipment_payload import DelhiveryShipmentPayload as DelhiveryShipmentPayload
92
+ from open_logistics.delhivery.models.delhivery_shipment_payload_qc import DelhiveryShipmentPayloadQc as DelhiveryShipmentPayloadQc
93
+ from open_logistics.delhivery.models.delhivery_tracking_response import DelhiveryTrackingResponse as DelhiveryTrackingResponse
94
+
@@ -0,0 +1,11 @@
1
+ # flake8: noqa
2
+
3
+ # import apis into api package
4
+ from open_logistics.delhivery.api.orders_api import OrdersApi
5
+ from open_logistics.delhivery.api.pickup_requests_api import PickupRequestsApi
6
+ from open_logistics.delhivery.api.rates_api import RatesApi
7
+ from open_logistics.delhivery.api.serviceability_api import ServiceabilityApi
8
+ from open_logistics.delhivery.api.shipments_api import ShipmentsApi
9
+ from open_logistics.delhivery.api.tracking_api import TrackingApi
10
+ from open_logistics.delhivery.api.waybills_api import WaybillsApi
11
+