Repository navigation
osn-system-utils v0.0.1
osn-system-utils v0.0.1 - Initial Release of Comprehensive System Management API
Welcome to the first official release of osn-system-utils. This library provides a unified, cross-platform interface for managing system processes, network sockets, and power states on both Linux and Windows environments. By wrapping complex CLI tools and leveraging psutil, we provide a developer-friendly way to interact with the underlying operating system.
Key Improvements in v0.0.1:
- Advanced Process Management Table: Introduced a powerful
get_process_tablefunction that generates a Pandas DataFrame of system processes. It supports deep-nested attribute fetching and a sophisticated filtering system, including regex, range checks (above/under/between), and equality filters. - Flexible Port Allocation: The network API has been overhauled to support a wider port range (up to 65535). The new
get_localhost_free_port_ofutility allows for smart port hunting using "min", "max", or "random" strategies, making it easier to find available ports for local services. - Cross-Platform Power & Process Control: We’ve implemented standardized wrappers for essential system commands. This includes
shutdownandtaskkillfor Windows, andpkill,kill, andss(Socket Statistics) for Linux, ensuring consistent behavior across different environments. - Internal Validation Engine: Added a robust set of internal utility functions to handle nested dictionary/object traversal and parameter validation. This ensures that invalid inputs are caught early with descriptive error messages.
- Standardized Command Execution: Improved the core
run_commandutility to handle subprocess execution with better encoding support and custom exception handling through the newCommandExecutionErrorclass.
Putting It All Together:
This release transforms raw system commands into a structured Python API. Whether you need to monitor localhost PIDs with their associated ports, generate a filtered list of running applications, or safely restart a remote Windows machine, osn-system-utils v0.0.1 provides the necessary tools with type-safe implementations and clear documentation.