An simple API for to track package info from 17track.com
Project description
py17track: A Simple Python API for 17track.net
py17track is a simple Python library to track pacakges via 17track.net.
Installation
$ pip install py17track
Usage
Tracking individual packages via tracking number is easy!
from py17track import Client
client = Client()
# Use as many tracking numbers as you'd like:
packages = client.track.find('12345ABCDE', '78901FGHIJ')
# >>> {Package(...), Package(...)}
Each Package object has the following info:
destination_country
: the country the package was shipped toinfo
: a text description of the latest statuslocation
: the current location (if known)origin_country
: the country the package was shipped frompackage_type
: the type of package (if known)status
: the overall package status (“In Transit”, “Delivered”, etc.)tracking_info_language
: the language of the tracking infotracking_number
: the all-important tracking number
Since this is uses an unofficial API, there’s no guarantee that 17track.net will provide every field for every package, all the time.
If you have a 17track.net account, you can also find packages associated with that account:
from py17track import Client
client = Client()
client.profile.authenticate('<EMAIL ADDRESS>', '<PASSWORD>')
client.profile.packages()
# >>> {Package(...), Package(...), Package(...), Package(...)}
Contributing
Check for open features/bugs or initiate a discussion on one.
Install the dev environment:
make init
.Enter the virtual environment:
pipenv shell
Code your new feature or bug fix.
Write a test that covers your new functionality.
Run tests:
make test
Build new docs:
make docs
Add yourself to AUTHORS.rst.
Submit a pull request!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for py17track-1.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0fd67c72809fd5ce6980e9a347cf76e36c011a1a37e5686f38068abb00df2aa0 |
|
MD5 | 68d296b645f0f5401887fc6e72197273 |
|
BLAKE2b-256 | 4a7a932f0ff97415de65cc93c6676995f19c79c0cc6d75beb6e95afed6f0598e |