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
clickextra).
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 in another file after installing it
import argparse
from iss_pass_tracker import set_api_key, get_passes
parser = argparse.ArgumentParser()
parser.add_argument("--api-key", required=True)
args = parser.parse_args()
# Set the API key for iss_pass_tracker
set_api_key(args.api_key)
lat, lon = 17.385044, 78.486671
passes = get_passes(lat, lon, n=10)
if not passes:
print("No upcoming ISS passes found.")
else:
for p in passes:
# local_time() returns datetime in your system timezone
print(p.local_time().strftime("%Y-%m-%d %H:%M:%S %Z"), f"for {p.duration} seconds")
Run: python another_file.py --api-key YOUR_N2YO_KEY
output something like:
2025-08-10 20:42:14 IST for 600 seconds
2025-08-11 19:35:09 IST for 645 seconds ...
run locally wiith N2YO API key
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file iss_pass_tracker-1.0.1.tar.gz.
File metadata
- Download URL: iss_pass_tracker-1.0.1.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3fa5bb8878010deee532f8ffbb609428ac034d231ed4272958ccd1bf9c1bd28f
|
|
| MD5 |
967da13e7bd5782952b1ce037dcfb4fc
|
|
| BLAKE2b-256 |
0bf08b8c382baa87ec68f98d414552e0064a6cd4da59b237da78808a403aae0a
|
File details
Details for the file iss_pass_tracker-1.0.1-py3-none-any.whl.
File metadata
- Download URL: iss_pass_tracker-1.0.1-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a0f05d0d2079766a3bf9152d3faeca93e589074be2a6f60bc5e81d4d384c2a28
|
|
| MD5 |
391ba2778902b792bd15c42b18d0dc19
|
|
| BLAKE2b-256 |
a58dd035ddba91270aa2902ac21eeaa037e8364ea765fcf8568c8f00ebd4fc4f
|