Skip to content

PythonAnywhere Auto-Run automates Flask web apps by logging in, clicking ‘Run until 3 months from today,’ retrieving the expiry date, and sending detailed email reports of each step, helping you monitor and manage your apps effortlessly.

Notifications You must be signed in to change notification settings

rohit2701singh/PythonAnywhere-Auto-Run

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

PythonAnywhere Auto-Run

Overview

PythonAnywhere Auto-Run is a Python automation script that manages Flask web apps hosted on PythonAnywhere. It automatically logs into your PythonAnywhere account, navigates to your web app dashboard, clicks the “Run until 3 months from today” button, and retrieves the expiry date of your web app.

The script also generates a step-by-step report and sends it via email, allowing you to monitor the process without manually checking the site.

Features

  • Automatic login to PythonAnywhere.
  • Clicks "Run until 3 months from today" to keep the web app active.
  • Extracts and reports the web app expiry date.
  • Sends email notifications summarizing each step and any errors.
  • Uses Selenium WebDriver for browser automation.
  • Handles errors gracefully with detailed logs.

Setup Instructions

  1. Clone the repository to your local machine.

  2. Install the required Python packages using pip install -r requirements.txt.

  3. Create a .env file in the project root and add your credentials:

    USER_NAME = your_pythonanywhere_username
    USER_PASS = your_pythonanywhere_password
    EMAIL_SENDER = [email protected]
    EMAIL_PASS = your_email_password
    EMAIL_RECEIVER = [email protected]
    
  4. Ensure you have Chrome installed and either use a local ChromeDriver path or let the script download it automatically.

Usage

  1. Open a terminal or Git Bash.

  2. Navigate to the project folder.

  3. Run the script using:

    python your_script_name.py
  4. Check your email for a detailed report of the automation process.

Notes

  • Recommended to run the script periodically to prevent your web app from expiring.
  • Uses WebDriverWait to handle slow internet connections instead of fixed sleep intervals.
  • All steps are logged and included in the email report.

About

PythonAnywhere Auto-Run automates Flask web apps by logging in, clicking ‘Run until 3 months from today,’ retrieving the expiry date, and sending detailed email reports of each step, helping you monitor and manage your apps effortlessly.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages