A process supervisor with execution control based on system resource state.
Project description
FortScript
A process supervisor with execution control based on system resource state.
FortScript is a Python Process Manager, based on RAM monitoring and OS process detection, that automatically starts, pauses, and terminates applications using reactive resource consumption policies.
1. The Library
FortScript can be integrated into any Python project as a library to manage child processes and monitor system health.
Quick Start
from fortscript import FortScript
# Initialize with a configuration file
app = FortScript(config_path="my_config.yaml")
# Run the management loop
app.run()
Why use the library?
- Clean Lifecycle: Safely start and stop child processes (including full process trees).
- Resource Monitoring: Built-in hooks for RAM usage and process activity.
- Multi-Runtime: Supports Python, Node.js (pnpm), and native Executables.
Usage Examples
1. Managing Independent Modules
You can use FortScript as a central controller for various scripts scattered across your system.
config.yaml:
projects:
- name: "Trading Bot"
path: "C:/Users/Dev/Finance/bot.py"
- name: "Server Monitor"
path: "C:/Users/Dev/Server/monitor.js"
2. Integration in Larger Projects
Import FortScript in your main application entry point to automatically handle background tasks.
# main_controller.py
from fortscript import FortScript
def start_services():
# Detects games/heavy apps and pauses these services automatically
manager = FortScript(config_path="./services_config.yaml")
manager.run()
2. CLI
The CLI is an interface designed for a broad audience, allowing for easy process management.
Note: The CLI is currently in development. It will soon be available directly via
pip.
- Configuration: The initialization file paths for your scripts are located in
cli/config.yaml. - Future: Soon, it will be possible to add the main initialization script to the CLI by running a single command inside the project folder.
Usage
uv run cli/cli.py
Roadmap & Features
The following list tracks the progress of our features and future implementations:
- Monitor Heavy Processes: Detection of resource-intensive applications.
- RAM Usage Monitoring: Automatic triggers based on memory percentage.
- Unified Script Runner:
- Native Executables (
.exe) - Python Scripts (
.py) - JavaScript/TypeScript Projects (
package.json)
- Native Executables (
- System Integration:
- Auto-start with Windows/Linux.
- System Tray (Icon) support for background operation.
- Smart Interruption:
- Auto-stop when heavy processes are detected.
- Auto-resume when processes are closed.
- RAM-based stop/resume cycling.
Contributing
Contributions are welcome! Please read our Contribution Guide for details on our code of conduct and the process for submitting pull requests.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Developed with ❤️ by WesleyyDev
v02
Project details
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fortscript-0.2.0.tar.gz.
File metadata
- Download URL: fortscript-0.2.0.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24b6cbce4f2859bd92dc0a88ccd2695d047e9deeb42aba624e0b90e41b2f5653
|
|
| MD5 |
e673eb2a061d4fef309a3df320ff03d6
|
|
| BLAKE2b-256 |
729677ed9e7a521b6a9c1d4765935faab214b50fedadc3d9e21f5cde6ee6da43
|
File details
Details for the file fortscript-0.2.0-py3-none-any.whl.
File metadata
- Download URL: fortscript-0.2.0-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4dd9f37bbe72a709187c3275e13c76922e6f366038bde6968f792ec8abe518c4
|
|
| MD5 |
1b8e01f41629c622301f8eb28bea3087
|
|
| BLAKE2b-256 |
7ae54531a7a64cf56a657f3ad3bb296732d89385514c1702f87ec1250f3b5cc5
|