Skip to main content

Automatically track and record records for NVC shipments!

Project description

Project generated with PyScaffold

nvc-dhl-tracker

Automatically track and record records for NVC shipments!

Installation

pip install nvc-dhl-tracker

Or clone from github and run

pip install -e "."

Usage

  • Follow the gspread documentation to create a service account: https://docs.gspread.org/en/latest/

  • Copy the URL of the google spreadsheet

  • Create a new sheet in the document and copy the ID out of the URL, this will be the tracking sheet ID.

Then run

i129f_nvc_tracker

And answer the questions it asks. You should be able to let this run indefinitely, but eventually the database will fill up.

As a SystemD service

Before running as a systemd service you should run the command with a –start-number to seed the database. Otherwise if the service crashes it will restart from the previous start number which may be significantly out of date.

/root/i129fvenv/bin/python -m i129f.nvc_dhl_tracker.cli --no-input --dhl-keys [..., ...] --start-number [...] --google-spreadsheet-url [...] --google-sheet-id [...]

The command below does not include –start-number to make it easier to copy and paste.

[Unit]
Description=i129f SystemD Service

[Service]
ExecStart=/root/i129fvenv/bin/python -m i129f.nvc_dhl_tracker.cli --no-input --dhl-keys [..., ...] --google-spreadsheet-url [...] --google-sheet-id [...]
Restart=on-failure

[Install]
WantedBy=multi-user.target
  • no-input: This disables any input from the command, so that it won’t interrupt a daemonized service

  • dhl-keys: The keys to use with the DHL API

  • start-number: The number from which to start polling

  • google-spreadsheet-url: The URL of the Google spreadsheet

  • google-sheet-id: The ID of the sheet in the spreadsheet to use. This is appended to the URL if you view the spreadsheet in your browser.

You have 1 DHL keys setup, do you want to remove them? If you want to add new DHL API keys enter them now, leave blank when finished: Starting at JD0030110676223010 What is the google spreadsheet URL? https://docs.google.com/spreadsheets/d/1Qs7_BaMRvUzr11YNc4b_JxahToGTf3knXFt_9Tjh5-c/ What is the google sheet id? 692605677

Making Changes & Contributing

This project uses pre-commit, please make sure to install it before making any changes:

pip install pre-commit
cd nvc-dhl-tracker
pre-commit install

It is a good idea to update the hooks to the latest version:

pre-commit autoupdate

Don’t forget to tell your contributors to also install and use pre-commit.

Note

This project has been set up using PyScaffold 4.5. For details and usage information on PyScaffold see https://pyscaffold.org/.

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

nvc-dhl-tracker-0.1.13.tar.gz (31.3 kB view details)

Uploaded Source

Built Distribution

nvc_dhl_tracker-0.1.13-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

File details

Details for the file nvc-dhl-tracker-0.1.13.tar.gz.

File metadata

  • Download URL: nvc-dhl-tracker-0.1.13.tar.gz
  • Upload date:
  • Size: 31.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for nvc-dhl-tracker-0.1.13.tar.gz
Algorithm Hash digest
SHA256 aca81acc488f33f98f9dcf1c69b623fd23a4014a396a0c4b8aafd3c791f47ef7
MD5 783872129fc9b41edec620f216feff8c
BLAKE2b-256 032483349b7aee5d0a9b31e5c3e6795b08fdfd8cc112d3a67a0f284c147f6cd6

See more details on using hashes here.

File details

Details for the file nvc_dhl_tracker-0.1.13-py3-none-any.whl.

File metadata

File hashes

Hashes for nvc_dhl_tracker-0.1.13-py3-none-any.whl
Algorithm Hash digest
SHA256 06afa4cf7d2121f6a6cb90fb0942f5864452cc2bd5d3ffcbc52a0278a363f831
MD5 e861d3b2caa5ab91ba1c7337e492b49c
BLAKE2b-256 d999af2384713105da7cd314ceaa3c2c8286ebf8a71769f5c12d64c5edafc7f5

See more details on using hashes here.

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