Shipkore tracking library & CLI to track packages across couriers. This is first Open source product of Innerkore Technologies. We are commited to do things differently.
pip install libshipkore
libshipkore providers
To get all the supported Couriers.
libshipkore track
To track a package in supported Couriers. It will ask for 2 things
- Provider (Couries)
- Waybill (Tracking number)
from libshipkore.track import get_track_data
from libshipkore.track import get_providers
get_track_data provides tracking utility to track package in supported Couriers. get_providers provides list of all the supported logistics providers.
Install poetry first. Then, to install dependencies,
poetry install
To run track command,
poetry run python -m libshipkore.cli track --provider zinc --waybill ZPYAA0073001334YQ
- Tracking through CLI
- Embeddable as library
- Give standard response
- Convert Courier's statuses to standard statuses
- Convert date & time to timezone specific ISO Format
- InfoReceived
- InTransit
- OutForDelivery
- AttemptFail
- Delivered
- AvailableForPickup
- Exception
- ReverseDelivered
- ReverseOutForDelivery
- ReverseInTransit
and many many more see here
{
"title": "Track",
"type": "object",
"properties": {
"checkpoints": {
"title": "Checkpoints",
"type": "array",
"items": {
"$ref": "#/definitions/Checkpoint"
}
},
"waybill": {
"title": "Waybill",
"type": "string"
},
"provider": {
"title": "Provider",
"type": "string"
},
"status": {
"default": "Exception",
"allOf": [
{
"$ref": "#/definitions/StatusChoice"
}
]
},
"substatus": {
"title": "Substatus",
"type": "string"
},
"estimated_date": {
"title": "Estimated Date",
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "string",
"format": "date"
}
]
},
"reference_no": {
"title": "Reference No",
"type": "string"
},
"package_type": {
"title": "Package Type",
"type": "string"
},
"destination": {
"title": "Destination",
"type": "string"
},
"client": {
"title": "Client",
"type": "string"
},
"consignee_address": {
"title": "Consignee Address",
"type": "string"
},
"product": {
"title": "Product",
"type": "string"
},
"receiver_name": {
"title": "Receiver Name",
"type": "string"
},
"delivered_date": {
"title": "Delivered Date",
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "string",
"format": "date"
}
]
}
},
"required": [
"checkpoints",
"waybill",
"provider"
],
"definitions": {
"StatusChoice": {
"title": "StatusChoice",
"description": "An enumeration.",
"enum": [
"InfoReceived",
"InTransit",
"OutForDelivery",
"AttemptFail",
"Delivered",
"AvailableForPickup",
"Exception",
"ReverseDelivered",
"ReverseOutForDelivery",
"ReverseInTransit"
],
"type": "string"
},
"Checkpoint": {
"title": "Checkpoint",
"type": "object",
"properties": {
"slug": {
"title": "Slug",
"type": "string"
},
"city": {
"title": "City",
"type": "string"
},
"location": {
"title": "Location",
"type": "string"
},
"country_name": {
"title": "Country Name",
"type": "string"
},
"message": {
"title": "Message",
"type": "string"
},
"submessage": {
"title": "Submessage",
"type": "string"
},
"country_iso3": {
"title": "Country Iso3",
"type": "string"
},
"status": {
"default": "Exception",
"allOf": [
{
"$ref": "#/definitions/StatusChoice"
}
]
},
"substatus": {
"title": "Substatus",
"type": "string"
},
"checkpoint_time": {
"title": "Checkpoint Time",
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "string",
"format": "date"
}
]
},
"state": {
"title": "State",
"type": "string"
},
"zip": {
"title": "Zip",
"type": "string"
}
},
"required": [
"slug",
"checkpoint_time"
]
}
}
}
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.