Skip to main content

Fetch upcoming ISS passes for a location and helpers to notify users.

Project description

ISS Pass Tracker

A small Python library to fetch upcoming International Space Station (ISS) passes for a given latitude/longitude. Intended as a PyPI-ready example and a practical utility.

Features

  • Query Open Notify (free) for next N passes.
  • Return results as typed dataclasses.
  • Optional CLI (requires click extra).

Installation (from source / TestPyPI)

pip install --upgrade pip build twine
python -m build
# Test upload (recommended):
# twine upload --repository testpypi dist/*
# Real upload:
# twine upload dist/*

Quick usage

from iss_pass_tracker import set_api_key, get_passes

# Set your N2YO API key
set_api_key("YOUR_N2YO_API_KEY")

# Hyderabad coordinates
latitude = 17.385044
longitude = 78.486671
altitude_meters = 0  # Adjust if needed

# Get next 5 passes
passes = get_passes(latitude, longitude, altitude_meters, n=5)

# Print them
for p in passes:
    print(f"Pass at {p.local_time()} (local time), duration {p.duration} seconds")

run locally wiith N2YO API key

python file_name.py

pip install --upgrade iss-pass-tracker

python -m iss_pass_tracker --lat 17.385044 --lon 78.486671 --api-key YOUR_N2YO_KEY

python -m iss_pass_tracker --lat 17.385044 --lon 78.486671 --api-key YOUR_N2YO_KEY --n 10 --all

The -m flag tells Python: "Run a module as a script."

macOS / Linux

export N2YO_API_KEY="YOUR_KEY"

Windows (Command Prompt)

setx N2YO_API_KEY "YOUR_KEY"

python -m iss_pass_tracker --lat ... --lon ...

run:

python -m iss_pass_tracker --lat 17.385044 --lon 78.486671 --api-key YOUR_N2YO_KEY

or with environment variable

export N2YO_API_KEY=YOUR_N2YO_KEY # macOS/Linux

set N2YO_API_KEY=YOUR_N2YO_KEY # Windows

or If you like, I can also hook this CLI into pyproject.toml so users can just type:

python -m iss_pass_tracker --lat 17.385044 --lon 78.486671

iss-pass-tracker --lat 17.38 --lon 78.48

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

iss_pass_tracker-1.0.0.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

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

iss_pass_tracker-1.0.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file iss_pass_tracker-1.0.0.tar.gz.

File metadata

  • Download URL: iss_pass_tracker-1.0.0.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for iss_pass_tracker-1.0.0.tar.gz
Algorithm Hash digest
SHA256 5c20516d0b20c597d76832eb331293df2bb206ad3d35979904b9ac5dbcf60510
MD5 fb19118b43c8f3709ae6b52670db89a6
BLAKE2b-256 460696b4235b19096a26afe87f49f0e5b583aeced39e48b632ab6c4d55b1887c

See more details on using hashes here.

File details

Details for the file iss_pass_tracker-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for iss_pass_tracker-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ac572f009896aac1490aa97bdf3bca3fa62ba209254d7c866041e6ad29cb2b84
MD5 181daf6fb44a77d0e744486a6a543c4f
BLAKE2b-256 3260c52c507ac2b0c83f8af1e118420a5cb00b2e0b76dc986fd61967f0c3821a

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