Skip to main content

A wrapper for tracking packages with Canada Post

Project description

CanadaPostWrapper

CanadaPostWrapper is a Python package that allows you to track packages using Canada Post's tracking service.

Installation

You can install the package using pip:

pip install canadapostwrapper

Usage

Parameters

  • tracking_id (str): The tracking ID of the package you want to track.
  • delay (int, optional): The delay in minutes between each tracking check. Default is 1 minute.

Methods

check_shipping()

Checks the current shipping status of the package.

Returns:

  • A dictionary containing the shipping information if the status has changed since the last check.
  • None if there is no change in status or if an error occurs.

start_tracking()

Starts continuous tracking of the package. This method will print the shipping information to the console every delay minutes.

Example

Initialize the tracker

tracker = CanadaPostTracker(tracking_id='123456789012')

Check the shipping status once

shipping_info = tracker.check_shipping() if shipping_info: print(shipping_info)

Start continuous tracking

tracker.start_tracking()

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! Please open an issue or submit a pull request on GitHub.

Author

shibakek - wilhemnorman732@gmail.com

Acknowledgments

  • Thanks to Canada Post for providing the tracking service.

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

canadapostwrapper-0.4.0.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

canadapostwrapper-0.4.0-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file canadapostwrapper-0.4.0.tar.gz.

File metadata

  • Download URL: canadapostwrapper-0.4.0.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for canadapostwrapper-0.4.0.tar.gz
Algorithm Hash digest
SHA256 ca8058d87744e334268d013b702942c11ae3b56c50af9fb2b687aaed5066c1f9
MD5 679fecaac86a59f40bd602cdcf8ad8d0
BLAKE2b-256 02ac6dc9cb0491116eb43115c2a8db62953a9928874b5cab082b8f1cc0920e23

See more details on using hashes here.

File details

Details for the file canadapostwrapper-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for canadapostwrapper-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 574861750e18071dffd422ff07b26df6de200a6b2a66a7e637e80e092807b544
MD5 ed37fe228dade5be0cace43541d95bc0
BLAKE2b-256 ea377dd057e1c459f8d22215ce14dbba1b050784e8df649b469e639e3c95ce80

See more details on using hashes here.

Supported by

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