Skip to main content

An simple API for to track package info from 17track.com

Project description

py17track: A Simple Python API for 17track.net

https://travis-ci.org/bachya/py17track.svg?branch=master https://img.shields.io/pypi/v/py17track.svg https://img.shields.io/pypi/pyversions/py17track.svg https://img.shields.io/pypi/l/py17track.svg https://codecov.io/gh/bachya/py17track/branch/master/graph/badge.svg https://api.codeclimate.com/v1/badges/af60d65b69d416136fc9/maintainability https://img.shields.io/badge/SayThanks-!-1EAEDB.svg

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 to

  • info: a text description of the latest status

  • location: the current location (if known)

  • origin_country: the country the package was shipped from

  • package_type: the type of package (if known)

  • status: the overall package status (“In Transit”, “Delivered”, etc.)

  • tracking_info_language: the language of the tracking info

  • tracking_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

  1. Check for open features/bugs or initiate a discussion on one.

  2. Fork the repository.

  3. Install the dev environment: make init.

  4. Enter the virtual environment: pipenv shell

  5. Code your new feature or bug fix.

  6. Write a test that covers your new functionality.

  7. Run tests: make test

  8. Build new docs: make docs

  9. Add yourself to AUTHORS.rst.

  10. Submit a pull request!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py17track-1.1.3.tar.gz (11.1 kB view hashes)

Uploaded Source

Built Distribution

py17track-1.1.3-py3-none-any.whl (11.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page