trackj
A simple Python library for determining shipping carriers and generating tracking URLs from tracking numbers. Supports multiple carriers with regex-based detection.
Installation
pip install trackj
Or using Poetry:
poetry add trackj
Usage
Import the trackj module and use the available functions to match carriers, generate URLs, or get carrier IDs.
import trackj
# Match a tracking number to a carrier and URL
result = trackj.match("1Z999AA10123456784")
print(result) # {'carrier': 'ups', 'url': 'http://wwwapps.ups.com/...'}
# Get only the tracking URL
url = trackj.url("1Z999AA10123456784")
print(url) # 'http://wwwapps.ups.com/...'
# Get only the carrier ID
carrier = trackj.carrier("1Z999AA10123456784")
print(carrier) # 'ups'
# Access the full mapping of carriers, regex patterns, and URLs
print(trackj.MAP)
Supported Carriers
- UPS
- FedEx
- USPS
- DHL
- Canada Post
- Royal Mail
- Australia Post
- China Post
- Japan Post
- Hermes UK
- GLS
- PostNL
- Correos Spain
- Deutsche Post
- Aramex
- SF Express
License
MIT License
Metadata
Release files for trackj 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| trackj-0.1.0.tar.gz | 2.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| trackj-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.4 kB
Release files / trackj-0.1.0.tar.gz
| Download URL | trackj-0.1.0.tar.gz |
|---|---|
| Size | 2.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3e7df29e9656beb81db03de4c60d4f6f484ab3b8e9e99a94bed82209b5d1003b
|
|
BLAKE2b-256 checksum How to use checksums |
15e7586acd15fc66cd58adb8a6e3ff29cf0b918bb58aaf0ad5dfa356e888c0ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.3 Windows/10
|
Release files / trackj-0.1.0-py3-none-any.whl
| Download URL | trackj-0.1.0-py3-none-any.whl |
|---|---|
| Size | 2.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
70c800c2bf0848593739b4194bd1c6b9cf24e838c0871947d2e96f0e1c7ca4c5
|
|
BLAKE2b-256 checksum How to use checksums |
f73b8605ad24c1b9133efd43b8832f08c08d897ae1943480208b40a04a70085b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.3 Windows/10
|