{"id":27446937,"url":"https://github.com/rajatasusual/box-manager","last_synced_at":"2026-02-24T11:30:58.197Z","repository":{"id":287475223,"uuid":"964853182","full_name":"rajatasusual/box-manager","owner":"rajatasusual","description":"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.","archived":false,"fork":false,"pushed_at":"2025-04-14T16:44:58.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-04T02:05:29.016Z","etag":null,"topics":["debian","kernel-module","linux","orchestration","system-services"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rajatasusual.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-11T22:45:03.000Z","updated_at":"2025-04-14T16:43:53.000Z","dependencies_parsed_at":"2025-04-15T05:59:41.351Z","dependency_job_id":null,"html_url":"https://github.com/rajatasusual/box-manager","commit_stats":null,"previous_names":["rajatasusual/box-manager"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/rajatasusual/box-manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajatasusual%2Fbox-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajatasusual%2Fbox-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajatasusual%2Fbox-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajatasusual%2Fbox-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rajatasusual","download_url":"https://codeload.github.com/rajatasusual/box-manager/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajatasusual%2Fbox-manager/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29780604,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-24T10:45:18.109Z","status":"ssl_error","status_checked_at":"2026-02-24T10:45:09.911Z","response_time":75,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["debian","kernel-module","linux","orchestration","system-services"],"created_at":"2025-04-15T05:59:37.728Z","updated_at":"2026-02-24T11:30:58.180Z","avatar_url":"https://github.com/rajatasusual.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BoxManager\n[![Python Package](https://github.com/rajatasusual/box-manager/actions/workflows/python-publish.yml/badge.svg)](https://github.com/rajatasusual/box-manager/actions/workflows/python-publish.yml)\n[![PyPI version](https://badge.fury.io/py/box-manager.svg)](https://pypi.org/project/box-manager/)\n\nBoxManager 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.\n\n## Features\n- ✅ Suspend/resume systemd services\n- ✅ Deprioritize or prioritize running processes by keyword\n- ✅ Automatically restore system state after execution\n- ✅ YAML or JSON config support\n- ✅ Decorator or imperative-style usage\n- ✅ CLI for direct service and process control\n\n---\n\n## Installation\n```bash\npip install box-manager\n```\n\nOr if developing locally:\n```bash\ngit clone https://github.com/yourusername/box-manager.git\ncd box-manager\npip install -e .\n```\n\n---\n\n## Usage\n\n### Basic Example\n```python\nfrom box_manager import BoxManager\n\nmanager = BoxManager()\n\n@manager.with_orchestration(\n    stop_services=[\"nginx\"],\n    deprioritize=[\"chrome\"]\n)\ndef critical_task():\n    print(\"Doing performance-critical work...\")\n\ncritical_task()\n```\n\n### Using Config File\n```yaml\n# config.yaml\norchestration:\n  stop_services:\n    - nginx\n  start_services:\n    - my_custom_service\n  deprioritize:\n    - chrome\n  prioritize:\n    - ros_node\n```\n\n```python\nmanager.load_config_and_orchestrate(\"config.yaml\", func=my_task)\n```\n\n---\n\n## CLI\nUse the command line interface to quickly control services:\n\n```bash\nbox-manager start nginx\nbox-manager stop nginx\nbox-manager status nginx\nbox-manager restart nginx\n```\n\n### Available Commands\n- `start \u003cservice\u003e`: Start a systemd service\n- `stop \u003cservice\u003e`: Stop a systemd service\n- `status \u003cservice\u003e`: Check if a service is active\n- `restart \u003cservice\u003e`: Restart a systemd service\n\n---\n\n## License\nMIT License\n\n---\n\n## Contributing\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\n---\n\n## Author\nMade with ☕ by [Rajat](mailto:rajatasusual@github.com)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frajatasusual%2Fbox-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frajatasusual%2Fbox-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frajatasusual%2Fbox-manager/lists"}