/SouthwestCheckin

🛫 Python script to checkin to a Southwest Flight 🛬

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

SW Checkin

Build Status Maintainability Test Coverage Docker Build Status Docker Image Size

This python script checks your flight reservation with Southwest and then checks you in at exactly 24 hours before your flight. Queue up the script and it will sleep until the earliest possible check-in time.

Contributors

Requirements

This script can either be ran directly on your host or within Docker.

Host

  • Python (should work with 2.x or 3.x thanks to @ratabora)
  • pip

Docker

  • Docker (tested with 1.12.6)

Setup

Host

Install Base Package Requirements

$ pip install virtualenv
$ python -m virtualenv venv
& source venv/bin/activate
(venv)$ pip install -r requirements.txt

southwest-headers setup

  1. Clone https://github.com/WGriffing/southwest-headers in parallel with this repo, you should have 2 folders in the same parent dir: SouthwestCheckin and southwest-headers.
  2. Checkout the develop branch in the southwest-headers repo.
  3. Follow the instructions in https://github.com/WGriffing/southwest-headers/blob/develop/README.md to setup the cronjob that will populate the contents of ../southwest-headers/southwest_headers.json that this script depends on.

Usage (Single)

(venv)$ python checkin.py CONFIRMATION_NUMBER FIRST_NAME LAST_NAME

Usage (Multiple)

The reservation details are passed as a comma-separated list including the confirmation number, first name, and last name for each reservation.

(venv)$ python checkin.py RESERVATION_LIST

where RESERVATION_LIST looks like CONFIRMATION_NUMBER_1,FIRST_NAME_1,LAST_NAME_1,...,CONFIRMATION_NUMBER_N,FIRST_NAME_N,LAST_NAME_N.

Docker

Build

$ docker build -t southwestcheckin:latest .

Usage (Single)

$ docker run -it southwestcheckin:latest CONFIRMATION_NUMBER FIRST_NAME LAST_NAME

Usage (Multiple)

$ docker run -it southwestcheckin:latest RESERVATION_LIST

where RESERVATION_LIST looks like CONFIRMATION_NUMBER_1,FIRST_NAME_1,LAST_NAME_1,...,CONFIRMATION_NUMBER_N,FIRST_NAME_N,LAST_NAME_N.