Replit Keep Alive is a Python script wrapper meant to, with the help of UptimeRobot, keep Replit from terminating a Python script when the browser tab is closed.
The host environment needs to have the following software packages:
- Latest Replit Keep Alive source code
-
Clone the repository via Git
git clone https://github.com/erickyeagle/replit-keep-alive.git
- Python 3.5+
-
Copy
requirements.txt
and everything in/src
to the host environment. -
Modify
.replit
by replacing<script>
with the target script file. -
Configure UptimeRobot to point to your web server.
-
Install dependencies.
pip install -r requirements.txt
-
Copy all source code files (except for
.replit
as this will interfere with Replit's normal run process) to the host environment. -
Import the Replit Keep Alive module into your software module.
from replit_keep_alive import keep_alive
-
Call the
keep_alive()
method where appropriate. -
Configure UptimeRobot to point to your web server.
If you would like to contribute to this project, you can file an issue or submit a pull request from a forked repository. If you would like to contribute, but don't have any coding experience, you can ask questions or propose changes over at our discussions page.