No description
Find a file
Kumi ebe1eff2f4
Handle case when no events are found for a given tracking number.
- Added handling for case when no events are found for a given tracking number.
2023-08-26 07:29:25 +02:00
src/trackbert Handle case when no events are found for a given tracking number. 2023-08-26 07:29:25 +02:00
.gitignore Update .gitignore 2023-08-25 07:44:22 +02:00
.gitlab-ci.yml Making trackbert a proper package 2023-08-25 07:37:43 +02:00
config.dist.ini Add new files and update existing files with configuration details. 2023-08-18 09:59:40 +02:00
LICENSE Add new files and update existing files with configuration details. 2023-08-18 09:59:40 +02:00
pyproject.toml Bump version to 0.1.1 in pyproject.toml & add GLS tracker 2023-08-25 07:54:34 +02:00
README.md Add GLS as a new tracking provider and update installation instructions 2023-08-25 08:33:32 +02:00

Trackbert

A simple Python script for tracking shipments, primarily through KeyDelivery.

If your system provides notify-send, you will get a desktop notification when the status of your shipment changes.

Status information is stored in a SQLite database.

Currently supported tracking providers

More tracking providers can be added easily by subclassing trackbert.trackers.base.BaseTracker. This should be relatively self-explanatory if you look at the existing implementations. Pull requests are welcome!

Requirements

The script was developed and tested on Arch Linux using Python 3.11. The "Never" type hint is used, so I suppose it will not work on older Python versions. It should work on any Linux distribution. You can technically run it on Windows and macOS as well, but you will not get desktop notifications.

In order to get desktop notifications, you need to have notify-send installed. On Arch Linux, this is provided by the libnotify package. If your desktop environment does not provide a notification server, you have to install one yourself. How to do this is beyond the scope of this README.

Installation

First, create a virtual environment and install the package:

python -m venv venv
source venv/bin/activate
pip install trackbert

Then create a config.ini in your working directory (see config.dist.ini) and fill in your KeyDelivery API details, which you can find in your KeyDelivery API management. You can find your API key in your KeyDelivery account settings.

You can also omit this step, but then you will only be able to track shipments from Austrian Post and GLS.

Usage

First, assure that the virtual environment is activated:

source venv/bin/activate

To add a new shipment, run trackbert --tracking-number <tracking-number> --carrier <carrier-id>. Find the required carrier ID in the KeyDelivery API management.

To run the main loop, run trackbert. This will check the status of all shipments every 5 minutes, and print the status to the console. If the status of a shipment changes, you will get a desktop notification.

License

This project is licensed under the MIT License. See the LICENSE file for details.