Orchestration tool for managing systemd services and process priorities in Debian systems.
Project description
BoxManager
BoxManager is a lightweight Python library for orchestrating systemd services and adjusting process priorities on Debian-based systems. Perfect for embedded systems, robotics, or any scenario where performance context switching is essential.
Features
- ✅ Suspend/resume systemd services
- ✅ Deprioritize or prioritize running processes by keyword
- ✅ Automatically restore system state after execution
- ✅ YAML or JSON config support
- ✅ Decorator or imperative-style usage
- ✅ CLI for direct service and process control
Installation
pip install box-manager
Or if developing locally:
git clone https://github.com/yourusername/box-manager.git
cd box-manager
pip install -e .
Usage
Basic Example
from box_manager import BoxManager
manager = BoxManager()
@manager.with_orchestration(
stop_services=["nginx"],
deprioritize=["chrome"]
)
def critical_task():
print("Doing performance-critical work...")
critical_task()
Using Config File
# config.yaml
orchestration:
stop_services:
- nginx
start_services:
- my_custom_service
deprioritize:
- chrome
prioritize:
- ros_node
manager.load_config_and_orchestrate("config.yaml", func=my_task)
CLI
Use the command line interface to quickly control services:
box-manager start nginx
box-manager stop nginx
box-manager status nginx
box-manager restart nginx
Available Commands
start <service>: Start a systemd servicestop <service>: Stop a systemd servicestatus <service>: Check if a service is activerestart <service>: Restart a systemd service
License
MIT License
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Author
Made with ☕ by Rajat
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
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 box_manager-0.1.1.tar.gz.
File metadata
- Download URL: box_manager-0.1.1.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e3aa337b7018c020813b58eb241dfbb11559fe32f4c3a87565060bf309d39e82
|
|
| MD5 |
ad78900469524f4468699059ee8d831b
|
|
| BLAKE2b-256 |
7330f92a489e77bda491cef2078eab1bc32dc36db28b5c9711f3bb955bf26234
|
Provenance
The following attestation bundles were made for box_manager-0.1.1.tar.gz:
Publisher:
python-publish.yml on rajatasusual/box-manager
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
box_manager-0.1.1.tar.gz -
Subject digest:
e3aa337b7018c020813b58eb241dfbb11559fe32f4c3a87565060bf309d39e82 - Sigstore transparency entry: 196894570
- Sigstore integration time:
-
Permalink:
rajatasusual/box-manager@51706f0570959d5a851319b79132c933149cf99f -
Branch / Tag:
refs/tags/0.1.1 - Owner: https://github.com/rajatasusual
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@51706f0570959d5a851319b79132c933149cf99f -
Trigger Event:
release
-
Statement type:
File details
Details for the file box_manager-0.1.1-py3-none-any.whl.
File metadata
- Download URL: box_manager-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce7049d216775f90e2ccf4a50d8551527b2edb55de881f40f9d528c0f964701b
|
|
| MD5 |
c7a1f25e099058003983b89a67f04d3b
|
|
| BLAKE2b-256 |
07aa468bb4c65c83737174163cb6c10277cad7ee2048f1a002313c121eadeb26
|
Provenance
The following attestation bundles were made for box_manager-0.1.1-py3-none-any.whl:
Publisher:
python-publish.yml on rajatasusual/box-manager
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
box_manager-0.1.1-py3-none-any.whl -
Subject digest:
ce7049d216775f90e2ccf4a50d8551527b2edb55de881f40f9d528c0f964701b - Sigstore transparency entry: 196894575
- Sigstore integration time:
-
Permalink:
rajatasusual/box-manager@51706f0570959d5a851319b79132c933149cf99f -
Branch / Tag:
refs/tags/0.1.1 - Owner: https://github.com/rajatasusual
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@51706f0570959d5a851319b79132c933149cf99f -
Trigger Event:
release
-
Statement type: