Skip to main content

Very simple web-app to generate courier-sized labels with QR code for InPost returns (10-digit codes, usually from Allegro).

Project description

InPostReturnLabel

Very simple web-app to generate courier-sized labels with QR code for InPost returns (10-digit codes, usually from Allegro).

Obviously, this is not affiliated with neither InPost nor Allegro and only exists because I'm too lazy to write codes down by hand and to get my phone to open parcel locker from the app.

The concept is to input 10-digit code and program sends QR and code itself to label printer loaded with courier-sized labels (approx 100x150mm).

Current limitations

  • For printing, CLI assumes there's lpr on UNIX system. This should be handled better.
  • Label template relies on Monaco font, which is not bundled. Instead, the default option is to point to macOS /System/Library/Fonts/Monaco.ttf and user can override that. If a font can't be bundled, there should be a discovery process or some local config file.

What's there - work in progress

CLI

Simple CLI to send to local printer using lpr or open file if no printer is provided.

Installation

PyPI: InPostReturnLabel

pipx install InPostReturnLabel

Usage

Help:

❯ InPostReturnLabel --help
Usage: InPostReturnLabel [OPTIONS] CODE

  InPostReturnLabel

  CODE is InPost return label code, 10 digits, e.g. 1234567890

Options:
  --version           Show the version and exit.
  -p, --printer TEXT  Local CUPS printer name; if ommited, then file will be
                      opened
  -f, --font TEXT     Path to font file, default:
                      /System/Library/Fonts/Monaco.ttf
  --help              Show this message and exit.

Example:

❯ InPostReturnLabel -f /System/Library/Fonts/Monaco.ttf -p intermec 1234567890
Label generated and stored at /var/folders/y0/xhrlswfd40gbzh5m50cbp1fxr3p32g/T/tmpi9nb7pts.png
Sending label to intermec

Simple web-app - TBD

The goal is to load it on home Docker/k8s and start printing over network.

Technical background

InPost parcel lockers accept returns by entering 10-digit code - either from keypad on device or by scanning QR code. The only tricky bit here is that parcel lockers can only read numeric mode and most common QR generators insist on generating them in alphanumeric mode, even when only digits 0-9 are provided.

Example label

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

inpostreturnlabel-0.0.2.tar.gz (21.4 kB view details)

Uploaded Source

Built Distribution

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

inpostreturnlabel-0.0.2-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file inpostreturnlabel-0.0.2.tar.gz.

File metadata

  • Download URL: inpostreturnlabel-0.0.2.tar.gz
  • Upload date:
  • Size: 21.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for inpostreturnlabel-0.0.2.tar.gz
Algorithm Hash digest
SHA256 5a1adde67dcd7e1191ae535816b8b9f06d0ed2914b29c1da5de968a9943f9531
MD5 ab2e65289469d6e5cfccd4dd922f3e60
BLAKE2b-256 d52a3d345354cd75638a3e653302fb67bfdc35482e37449b98ae4df95f214ccf

See more details on using hashes here.

File details

Details for the file inpostreturnlabel-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for inpostreturnlabel-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ce05a7809fb633a77e02938d309a2ec46ec1d89192ecc4f46fb5a455c36ef400
MD5 828dedbdae661d271ba94222ed9bbe76
BLAKE2b-256 f06029eaae7280557208481cb172a01df2d58a93a1ccc3744fd6a9661e09ec84

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