/ISS-Tracker

Receive an email notification when the International Space Station (ISS) is passing overhead.

Primary LanguagePython

ISS (International Space Station) Tracker

ISS Image

Project Description


This project can send you a notification via email when the International Space Station (ISS) is passing over your country. This is achieved by measuring the distance between the latitude and longitude of your location and those of the ISS, and then triggering an email notification to be sent to you.

Required Packages/Modules


You can find the required packages/modules used in this project in the requirements.txt file. The file contains a list of all the necessary packages and their versions that need to be installed to run the project successfully.

Instructions


  1. Clone the repository.
  2. Setup your venv (Virtual Environment).
  3. You can use latlong to get your latitude and longitude.
  4. Specify the email you want to use as a service:
    1. Activate 2FA (Two-Factor Authentication).
    2. Generate an App Password.
    3. Save the App Password to your ".env" text file.
    4. Finally you should know your email "smtp" provider. e.g: gmail -> "smtp.gmail.com".

Bonus


1 - When creating this project, I followed a good practice of working with environment variables to hide my personal information when publishing the project to the public. To achieve this, I used a Python package called python-dotenv and set up the .env text file in a different directory from the project, and later on you can access your information using the built-in os module. This approach allows you to hide all your personal information, such as emails, passwords, API keys, etc.; that you do not want to be accessed by the public. I recommend that you also follow this practice when working on your own projects.

Example about organizing .env text file:

[MyProject]
# My top-secret settings for MyProject
MyUsername="Fred Bloggs"
MyEmail="fred@example.com"
MyPassword="fvghtyu7i890ol"
 
[MyOtherProject]
# My top-secret settings for MyOtherProject
MyAPIKey_MyOtherProject="FMu4ejyK-qQLBasTs7iHx*SFN5F"
email_port=110
DEBUG=True

2 - Make your Python code run on the cloud: Instead of leaving your code running 24/7 on your local machine, you have the option to utilize PythonAnywhere and schedule a task to run every minute on their cloud servers.

APIs Used in this project


ISS Tracker API
Sunrise-Sunset API

Finally


I appreciate you taking the time to read and view this project. Please take care and stay safe.