A package providing a Flask-based server to keep Telegram bots and other scripts running indefinitely.
Project description
LimitlessLumos
LimitlessLumos is a powerful Python package designed to ensure that your Telegram bots or other long-running scripts stay alive indefinitely. By integrating a lightweight Flask web server, LimitlessLumos guarantees that your scripts remain active and free from timeouts.
Features
- Persistent Uptime: Keeps your script or bot running indefinitely by utilizing a Flask-based server to prevent timeouts.
- Flexible Configuration: Easily customize the server's host and port settings according to your needs.
- Concurrent Execution: The Flask server runs in a separate thread, allowing your main script to execute without interruptions.
- Effortless Integration: Seamlessly integrates into existing Python scripts or Telegram bots with minimal code changes.
Installation
To install LimitlessLumos, ensure you have Python 3.6 or higher, then install it via pip:
pip install LimitlessLumos
Usage
Here’s how to use LimitlessLumos to ensure your script or bot runs indefinitely, with different configurations available for your convenience:
Basic Example: Default Flask Server
-
Create Your Script (e.g.,
my_bot.py
):from LimitlessLumos import lumosServer from my_telegram_bot import start_bot # Replace with your bot’s start function # Start your bot or main script start_bot() # Run the default Flask server to keep the script alive lumosServer()
This will run the Flask server with the default settings (
localhost
on port5000
). -
Run Your Script:
python my_bot.py
Advanced Usage: Customizing the Flask Server
-
Run on All Interfaces with an Auto-Assigned Port:
lumosServer("All")
This command configures the Flask server to listen on
0.0.0.0
(all available interfaces) with an auto-assigned port, allowing access from any IP address. -
Specify Host and Port Manually:
lumosServer(host="0.0.0.0", port="8080")
This configuration allows you to define both the host and port manually. For example, setting
host="0.0.0.0"
andport="8080"
makes the server accessible on all network interfaces at port8080
.
Example Script with Custom Configuration:
from LimitlessLumos import lumosServer
from my_telegram_bot import start_bot
# Start your bot or main script
start_bot()
# Example: Custom host and port configuration
lumosServer(host="0.0.0.0", port="8080")
Configuration
LimitlessLumos provides flexible configuration options for the underlying Flask server. By adjusting the lumosServer
parameters, you can control how and where your server runs:
- Default Settings:
lumosServer()
starts a Flask server onlocalhost
at port5000
. - All Interfaces:
lumosServer("All")
makes the server accessible from any IP address, with an automatically assigned port. - Custom Host and Port:
lumosServer(host="", port="")
allows you to specify the host and port according to your needs.
Contributing
Contributions to LimitlessLumos are highly encouraged! Whether you have suggestions, bug fixes, or new features, your input is valuable. To contribute:
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature
). - Commit your changes (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature/your-feature
). - Submit a Pull Request for review.
License
LimitlessLumos is distributed under the CC-BY-SA 4.0 license. You are free to share and adapt the software as long as appropriate credit is given and any derivatives are licensed under the same terms.
Support
For questions, issues, or support, feel free to reach out to TraxDinosaur. We are here to assist with any challenges you may encounter while using LimitlessLumos.
By using LimitlessLumos, you can confidently keep your scripts and bots running indefinitely, ensuring maximum uptime and reliability.
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 limitlesslumos-1.0.6.tar.gz
.
File metadata
- Download URL: limitlesslumos-1.0.6.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
3dc6bc6508a9b90d325d7f995e5f59327fd8a46368da96291d52032f3d6f96df
|
|
MD5 |
62f734c1c948f94001bbece701ebb2bd
|
|
BLAKE2b-256 |
d0d36c70a624837d2e0d38d28b6ca674133aec5fbd0f10c1182dd0f90fc3adcb
|
File details
Details for the file LimitlessLumos-1.0.6-py3-none-any.whl
.
File metadata
- Download URL: LimitlessLumos-1.0.6-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
34140de5d467fcdd109229c44dd5957ab1343c3561ca6b5bccc47248cdce8263
|
|
MD5 |
7fffaed578671dad7165fa1cc74bf482
|
|
BLAKE2b-256 |
b06ed217f67db4331a196bf91694b48fa3538a66ae20d2904b7aaed547c832c0
|