Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Reason given by maintainers: Library not presently stable or suitable for use.

BCBP

A Python module to help decode IATA-standard boarding passes with barcodes.

Data is usually stored on PDF417, QR Code, Aztec, or Data Matrix barcodes as defined by IATA Resolution 792.

Module on PyPi

Read more about the standard:

On the IATA website


Available under the GNU GPLv3 Licence.

Published under the name "hattr".


Usage

Install BCBP using pip install bcbp.

You will need the datetime, re, and json modules installed for BCBP to function properly.

The following commands are available in BCBP:

  • bcbp.decode("[IATA Resolution 792-standard BCBP data string.]")
  • bcbp.encode("[firstname]", "[lastname]", "[pnr]", "[origin]", "[destination]", "[operator]", "[flight number]", "[date]", "[cabin class]", "[seat number]", "[check-in sequence]", [softerror])

Parameters for the bcbp.encode() command:

Parameter Data Type Values Description
Firstname String Any value which, when combined with Lastname, does not exceed 19 characters. The passenger's first name, can include titles "MR","MRS","MSTR", "DR", or "MS" after the name.
Lastname String Any value which, when combined with Firstname, does not exceed 19 characters. The passenger's last name.
PNR String Any value which does not exceed 7 characters. The Passenger Name Reference (also referred to as a Booking Reference).
Origin String 3-character IATA airport code. Search Airport Codes Here (IATA Website)
Destination String 3-character IATA airport code. Search Airport Codes Here (IATA Website)
Operator String 2-character airline/operator code. Search Airline Codes Here (IATA Website)
Flight Number String Any value which does not exceed 4 characters. The flight number, usually preceeded by the operator code but this value must only be the number.
Date String A Python datetime date object with at least a month and a day. A month and day which can be translated into the julian date. Must be a Python datetime date.
Cabin Class String 1-character value. A single character symbol that represents the class the seat is located in.
Seat Number String 4-character value. The passenger's seat, usually a 3-digit row followed by a single character seat identifier.
Check-In Sequence String 4-character value. A 4-digit number that shows which check-in the passenger had (e.g: 1st passenger to check in: 0001, 25th passenger to check in: 0025).
Softerror Boolean A boolean (True/False) value. Set to True for the command to return an error message in the output rather than a BCBP code. Set to false for an exception to be raised whenever there is an error.

Planned Upgrades

  • Error catching when improper string is passed.
  • bcbp.encode() function.

Acknowledgements

https://shaun.net/notes/whats-contained-in-a-boarding-pass-barcode/

https://gizmodo.com/hacker-builds-a-qr-code-generator-that-lets-him-into-fa-1784884083

Metadata

Release files for bcbp 1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bcbp 1.0
File Size Uploaded
bcbp-1.0.tar.gz 15.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bcbp 1.0
File Interpreter ABI Platform
bcbp-1.0-py3-none-any.whl Python 3 none any Details

Total release size: 30.1 kB

Release files / bcbp-1.0.tar.gz

Download URL bcbp-1.0.tar.gz
Size 15.1 kB
Tags Source
SHA-256 checksum
How to use checksums
aa2ed53e05d63764105c2947e28f4359a500bea017f40e807fc25d94486f1454
BLAKE2b-256 checksum
How to use checksums
a98b36ce653289117bbdd8c679058a67d7c51239137f567eb6206b5d2625c76f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.7

Release files / bcbp-1.0-py3-none-any.whl

Download URL bcbp-1.0-py3-none-any.whl
Size 15.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e746057b85df985d29411ab16e77aabe26784415b5270972325e3e0f734a1c35
BLAKE2b-256 checksum
How to use checksums
ec29158ee8d5900f0c24631925cbee84389083275baabb1f20cc3753e3872818
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.7

Release history Release notifications | RSS feed

This release

1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page