A collection of utilities for running services on repl.it
Project description
replutil
A collection of utilities for running services on repl.it.
Includes utilities for getting attributes of the container, as well as keeping the container alive using the UptimeRobot API.
KeepAlive Example
You can obtain a token on the the UptimeRobot dashboard.
from replutil import *
from time import sleep
import logging
logging.basicConfig(level=logging.INFO)
with ReplKeepAlive("token"):
# Do your long running operations here...
sleep(40)
Registering servers, ports, and watchers are abstracted away from the end user.
When used as a context manager, the library will automatically handle registering and deregistering watchers as well as staring and keeping open webservers.
Yes, all you need to have your repl container run forever is a single line and an indent. No hacker plan, freedom!
If this is used in a larger project, like, say, a Discord bot, you should do any asyncio
event loop logic (including Client.run
) in the context manager scoping block as it creates processes.
Install
You can install this package via pip:
pip install replutil
Project details
Release history Release notifications | RSS feed
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
File details
Details for the file replutil-0.1.1.tar.gz
.
File metadata
- Download URL: replutil-0.1.1.tar.gz
- Upload date:
- Size: 15.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.8.12 Linux/5.11.0-1026-gcp
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33de2140cdf67973e77c6942d18d3d03b779accdab839cdebf65db728ba0abd1 |
|
MD5 | c0834501910f2b59b6de8a3edd5681a2 |
|
BLAKE2b-256 | e7ebb9c685737a7eed695cce9829be631e61b3662bfba7136a246a69029c7c3e |
File details
Details for the file replutil-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: replutil-0.1.1-py3-none-any.whl
- Upload date:
- Size: 16.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.8.12 Linux/5.11.0-1026-gcp
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d95f17e17f2cc1bfc81717f2221871ece24893b417eb2f50295629fb3fb5409c |
|
MD5 | 9ee1c185775ac65dc293cb954ca34479 |
|
BLAKE2b-256 | 9e8571877894e8215396e63097192ac43fb974e0f090057f759541da24e9b9c8 |