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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
trackj-0.1.0.tar.gz
(2.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file trackj-0.1.0.tar.gz.
File metadata
- Download URL: trackj-0.1.0.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
poetry/1.8.3 CPython/3.12.3 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e7df29e9656beb81db03de4c60d4f6f484ab3b8e9e99a94bed82209b5d1003b
|
|
| MD5 |
12895a88d9cbbf6ce7fea2e121b3956a
|
|
| BLAKE2b-256 |
15e7586acd15fc66cd58adb8a6e3ff29cf0b918bb58aaf0ad5dfa356e888c0ab
|
File details
Details for the file trackj-0.1.0-py3-none-any.whl.
File metadata
- Download URL: trackj-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
poetry/1.8.3 CPython/3.12.3 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70c800c2bf0848593739b4194bd1c6b9cf24e838c0871947d2e96f0e1c7ca4c5
|
|
| MD5 |
26ba368bf80f8b2a7a4fceb48aba596c
|
|
| BLAKE2b-256 |
f73b8605ad24c1b9133efd43b8832f08c08d897ae1943480208b40a04a70085b
|