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

Your Name - 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

canadapostwrapper1-0.1.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.

canadapostwrapper1-0.1.0-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file canadapostwrapper1-0.1.0.tar.gz.

File metadata

  • Download URL: canadapostwrapper1-0.1.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 canadapostwrapper1-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3fa6f214cb9160ee1bc27121b68f8b33954f5d515eb712fcb98afa74cb308e6c
MD5 5f3aa06ac9cc4eba776d97ac420ac999
BLAKE2b-256 09d56fbc4ea152802ad4f8d1d6cd0676c9aac27b62edde89b2322f615667a613

See more details on using hashes here.

File details

Details for the file canadapostwrapper1-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for canadapostwrapper1-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f7d0f53046fba8205684d6e408905b7af53bd880f5b871c4a9e0c3c321f96725
MD5 55439b9e72c830741ea336923c65f8f5
BLAKE2b-256 5d29b09f7812c75b214db308fe46bf24ee578c71be9ffd5bc234f1323d1cd3a6

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