Skip to main content

BoxManager

Python Package PyPI version

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 service
  • stop <service>: Stop a systemd service
  • status <service>: Check if a service is active
  • restart <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

Metadata

Release files for box-manager 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for box-manager 0.1.1
File Size Uploaded Provenance Actions
box_manager-0.1.1.tar.gz 4.7 kB With provenance Details for box_manager-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for box-manager 0.1.1
File Interpreter ABI Platform Actions
box_manager-0.1.1-py3-none-any.whl Python 3 none any Details for box_manager-0.1.1-py3-none-any.whl

Total release size: 9.6 kB

Release files / box_manager-0.1.1.tar.gz

Download URL box_manager-0.1.1.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e3aa337b7018c020813b58eb241dfbb11559fe32f4c3a87565060bf309d39e82
BLAKE2b-256 checksum
How to use checksums
7330f92a489e77bda491cef2078eab1bc32dc36db28b5c9711f3bb955bf26234
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 14, 2025.

Transparency log

Release files / box_manager-0.1.1-py3-none-any.whl

Download URL box_manager-0.1.1-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ce7049d216775f90e2ccf4a50d8551527b2edb55de881f40f9d528c0f964701b
BLAKE2b-256 checksum
How to use checksums
07aa468bb4c65c83737174163cb6c10277cad7ee2048f1a002313c121eadeb26
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 14, 2025.

Transparency log

Security for box-manager 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for box_manager-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 14, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page