Releases: AfterShip/tracking-sdk-python
8.0.1
8.0.0
Breaking Changes - AfterShip Tracking Python SDK v8.0.0
1. Response Structure Complete Refactor
All Response classes now contain response_header and data structure:
# v7 - Direct access to response properties
response = client.tracking.create_tracking(request)
tracking_id = response.id
tracking_number = response.tracking_number
# v8 - Must access through data property
response = client.tracking.create_tracking(request)
tracking_id = response.data.id
tracking_number = response.data.tracking_number
headers = response.response_header # New feature: get response headersApplies to all API responses: create_tracking, get_tracking_by_id, get_trackings, update_tracking_by_id, get_couriers, etc.
2. Model Names Simplified
Tracking model naming convention changed:
# v7 - Suffix naming
from tracking.models.courier_estimated_delivery_date_tracking import CourierEstimatedDeliveryDateTracking
from tracking.models.shipment_weight_tracking import ShipmentWeightTracking
from tracking.models.aftership_estimated_delivery_date_tracking import AftershipEstimatedDeliveryDateTracking
# v8 - Prefix naming
from tracking.models.tracking_courier_estimated_delivery_date import TrackingCourierEstimatedDeliveryDate
from tracking.models.tracking_shipment_weight import TrackingShipmentWeight
from tracking.models.tracking_aftership_estimated_delivery_date import TrackingAftershipEstimatedDeliveryDateResponse class simplification:
- Old SDK had 150+ specialized response classes (e.g.,
AftershipEstimatedDeliveryDateCreateTrackingResponse,CarbonEmissionsGetTrackingByIdResponse) - New SDK unified these into simple, consistent response classes
3. String Parameters to Strong-Typed Enums
Parameters changed from string to enum types:
# v7 - String parameters
from tracking.models.mark_tracking_completed_by_id_request import MarkTrackingCompletedByIdRequest
request = MarkTrackingCompletedByIdRequest(
reason="DELIVERED" # String parameter
)
# v8 - Enum parameters
from tracking.models.mark_tracking_completed_by_id_request import MarkTrackingCompletedByIdRequest
from tracking.models.mark_tracking_completed_by_id_request_reason import MarkTrackingCompletedByIdRequestReason
request = MarkTrackingCompletedByIdRequest(
reason=MarkTrackingCompletedByIdRequestReason.DELIVERED # Enum parameter
)Enum constants also changed naming convention:
# v7 - Concatenated naming
Tag.INFORECEIVED
Tag.INTRANSIT
Tag.OUTFORDELIVERY
# v8 - Underscore separated naming
Tag.INFO_RECEIVED
Tag.IN_TRANSIT
Tag.OUT_FOR_DELIVERY7.1.0
7.0.0
What's Changed
- upgrade h11 by @1415003719 in #19
- support 2025-07 by @1415003719 in #20
- upgrade version by @1415003719 in #21
Full Changelog: 6.0.0...7.0.0
6.0.0
What's Changed
- support 2025-04 version by @1415003719 in #17
- upgrade release action verison by @1415003719 in #18
Full Changelog: 5.0.1...6.0.0
5.0.1
What's Changed
- fix: change the type of transit_time. by @AfterShip-Team-Mocha in #15
- chore: update GitHub Actions to use setup-python@v4 by @AfterShip-Team-Mocha in #16
Full Changelog: 5.0.0...5.0.1
5.0.0
What's Changed
- feat: added github action config file. by @AfterShip-Team-Mocha in #11
- feat: supporting 2025-01 version. by @AfterShip-Team-Mocha in #12
- Update pyproject.toml by @AfterShip-Team-Mocha in #13
New Contributors
- @AfterShip-Team-Mocha made their first contribution in #11
Full Changelog: https://github.com/AfterShip/tracking-sdk-python/commits/5.0.0
4.0.0
- supporting 2024-10 version.
API and SDK Version
Each SDK version is designed to work with a specific API version. Please refer to the table below to identify the supported API versions for each SDK version, ensuring you select the appropriate SDK version for the API version you intend to use.
| SDK Version | Supported API Version | Branch |
|---|---|---|
| 4.x.x | 2024-10 | https://github.com/AfterShip/tracking-sdk-python/tree/2024-10 |
| 3.x.x | 2024-07 | https://github.com/AfterShip/tracking-sdk-python/tree/2024-07 |
| 2.x.x | 2024-04 | https://github.com/AfterShip/tracking-sdk-python/tree/2024-04 |
| <=1.x.x | Legacy API | https://github.com/AfterShip/aftership-sdk-python |
3.0.0
- supporting 2024-07 version.
API and SDK Version
Each SDK version is designed to work with a specific API version. Please refer to the table below to identify the supported API versions for each SDK version, ensuring you select the appropriate SDK version for the API version you intend to use.
| SDK Version | Supported API Version | Branch |
|---|---|---|
| 3.x.x | 2024-07 | https://github.com/AfterShip/tracking-sdk-python/tree/2024-07 |
| 2.x.x | 2024-04 | https://github.com/AfterShip/tracking-sdk-python/tree/2024-04 |
| <=1.x.x | Legacy API | https://github.com/AfterShip/aftership-sdk-python |
2.0.1
- supporting Tracking API 2024-04 version.
API and SDK Version
Each SDK version is designed to work with a specific API version. Please refer to the table below to identify the supported API versions for each SDK version, ensuring you select the appropriate SDK version for the API version you intend to use.
| SDK Version | Supported API Version | Branch |
|---|---|---|
| 2.x.x | 2024-04 | https://github.com/AfterShip/tracking-sdk-python/tree/2024-04 |
| <=1.x.x | Legacy API | https://github.com/AfterShip/aftership-sdk-python |