Installing the Package Dependencies

To make it easier to track packages being handled by FedEx or UPS, we are going to use a Python package called packagetrack. This wrapper helps parse the XML-formatted tracking data provided by the courier’s web services, making it much easier to handle the data. While it would have been possible to use a Python screen-scraping library like Beautiful Soup, such solutions can be brittle. Not to mention, couriers the size of FedEx and UPS offer comprehensive APIs to their web services partially to discourage screen scrapers from data harvesting their sites. As such, before installing the packagetrack library, you will need to use an existing UPS and FedEx customer account to sign up for each company’s service ...

Get Programming Your Home now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.