Skip to main content

A bot that helps you find an open Global Entry interview appointment

Project description

Global Entry Alerter

A bot that helps you find an open Global Entry interview appointment.

PyPI version

Problem

Booking an appointment for a Global Entry interview is hard, especially in cities with high demand like SF or NYC.

If you check for open appointments, there is typically nothing available for weeks, sometimes even months. However, appointments are actually constantly opening up, they just get booked very quickly.

This project polls the DHS Scheduler API for open Global Entry appointments, notifying you whenever a new one opens up. If the new appointment is convenient for you, book it immediately — otherwise it will be gone within a few minutes.

This project is not affiliated with U.S. Customs and Border Protection or the U.S. Department of Homeland Security.

Example Usage

example of messages sent by bot

Requirements

  1. A Twilio account with the ability to send programmable SMS. See here.
  2. Python 3 & Poetry

Usage

Configure your settings in a config.toml, set env vars, and leave the global-entry-alerter running for as long as needed.

Once the script sends an alert about a particular appointment, it will keep that appointment in memory and won't notify you of it again. If you restart the script, it may re-send previously-seen appointments.

Installation

$ pip install global-entry-alerter

Running

To run the project:

  1. Create your own config.toml (see example_config.toml)
  2. Configure your settings (see Configuration below)
  3. Set the following env variables using your Twilio account:
    • TWILIO_AUTH_TOKEN
    • TWILIO_ACCOUNT_SID
    • TWILIO_PHONE_NUMBER
  4. global-entry-alerter --config ~/path_to_your/config.toml

Configuration

The project uses a .toml configuration file for all settings.

See example_config.toml as a reference for your own config.toml

Setting Description Example Value
fetching.lookahead_weeks How many weeks from today to check for open appointments. E.g. if you want an appointment in the next month, use 4 weeks 4
fetching.wait_seconds The interval between checks for open appointments. It is best to use a value <= 60 10
fetching.locations Which Global Entry interview locations to check. Accepts many locations for use cases where multiple locations are feasible (e.g. EWR or JFK if you live in NYC). See here for the full set of codes [{ name = "JFK", code = 5140 }]
sending.to_numbers The phone numbers to send alerts to. Include +1 (or whatever country code) ["+11231231234"]

Development

Pre-commit hooks

This project uses pre-commit to enforce linting on all commits. Install it with:

$ poetry run pre-commit install

Formatting

This project uses black and flake8 to enforce a consistent style. To format the project according to the rules, run:

make format

Test Mode

Running in test mode will fetch appointments using the settings in config.toml, but will not actually send alerts. Use this when developing to avoid incurring Twilio costs:

poetry run global-entry-alerter --test 

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

global_entry_alerter-0.2.3.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

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

global_entry_alerter-0.2.3-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file global_entry_alerter-0.2.3.tar.gz.

File metadata

  • Download URL: global_entry_alerter-0.2.3.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.10.8 Darwin/22.2.0

File hashes

Hashes for global_entry_alerter-0.2.3.tar.gz
Algorithm Hash digest
SHA256 9254931350ea01dce65712c2d8446f4f4e6b32a60821dfd4d431a2ebc41b31eb
MD5 dc50a671161759267c1fa741e87363bf
BLAKE2b-256 ab72aa5f52d3c50442ed6d5d01ac01e353a8707877898b6e8e1644c5e153c3db

See more details on using hashes here.

File details

Details for the file global_entry_alerter-0.2.3-py3-none-any.whl.

File metadata

File hashes

Hashes for global_entry_alerter-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d3e5ce2294f089187064fced73e71c92e47da4be67bbe69d64cd97cd4ccdb59a
MD5 15032b6dac54ee1610993256ea1d2e44
BLAKE2b-256 d9ad874ac050df8a2be23c54f5d08e8b6fc522d6b0761c4b8b8b4f4b3c74f937

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