Skip to content

Releases: OSN-Development/osn-system-utils

osn-system-utils v0.0.4

Choose a tag to compare

@oddshellnick oddshellnick released this 25 Jan 04:49

Requirement update

osn-system-utils v0.0.3

Choose a tag to compare

@oddshellnick oddshellnick released this 25 Jan 03:16

Requirement update

osn_system_utils v0.0.2

Choose a tag to compare

@oddshellnick oddshellnick released this 25 Jan 03:12

osn_system_utils v0.0.2 - Refined API, Advanced Process Management, and Enhanced Network Discovery

Version 0.0.2 marks a significant step forward for the library, evolving from a collection of system wrappers into a structured, high-level API for system and network management. This release introduces a powerful process filtering engine, renames the package for better consistency, and refines network port discovery strategies.

Key Improvements in v0.0.2:

  1. New Process Management API: A comprehensive suite of tools has been added in osn_system_utils.api.process. You can now check for process existence by PID or name, terminate process trees cross-platform, and retrieve detailed process information using a structured table format.
  2. Advanced Filtering & Nested Lookups: The new get_process_table function supports sophisticated filtering. You can filter processes using regex, equality, or numerical ranges (above, under, between) even for nested attributes (e.g., memory_info.rss) using dot-notation paths.
  3. Enhanced Network Port Discovery: The networking API has been refactored for flexibility. The new get_localhost_free_port_of function replaces older methods, allowing you to find available ports using different strategies: min, max, or random. New helpers like get_localhost_busy_ports also provide better visibility into system state.
  4. Strict API Exposure: Every module now implements __all__ exports. This ensures a cleaner developer experience by exposing only intended public functions and constants, preventing internal helper functions from cluttering your IDE's autocomplete.
  5. Refined Package Naming & Documentation: The library has transitioned toward the osn_system_utils naming convention across documentation and installation guides. The README has been completely overhauled with clear examples for process filtering and socket statistics.
  6. Improved Type Safety: Enhanced type hinting, including the use of Literal for parameter validation and TYPE_CHECKING blocks, provides better static analysis and reduced runtime errors.

Putting It All Together:
This update transforms osn_system_utils into a more professional and reliable tool for systems programming. By combining low-level OS wrappers with a high-level, pythonic API for processes and networking, v0.0.2 provides developers with a consistent interface for complex system tasks regardless of whether they are running on Linux or Windows.

osn-system-utils v0.0.2-beta.1

Pre-release

Choose a tag to compare

@oddshellnick oddshellnick released this 25 Jan 02:52

osn-system-utils v0.0.2-beta.1 - Dependency Optimization and API Refactoring

This release marks a significant step in making the library more lightweight and efficient. We have focused on removing heavy external dependencies, refining our internal API structure, and improving the developer experience through better type safety and explicit export controls.

Key Improvements in v0.0.2-beta.1:

  1. Removal of Pandas Dependency: To ensure a smaller footprint and faster installation, we have completely removed the dependency on pandas. The library now operates using native Python structures, making it much more suitable for lightweight environments and microservices.
  2. Migration to Iterator-based Process Tables: The get_process_table function has been refactored. Instead of returning a static DataFrame, it now functions as an Iterator[Dict[str, Any]]. This "lazy" approach significantly reduces memory consumption when scanning large numbers of system processes, as data is yielded one process at a time.
  3. Explicit Public API Definition: We have implemented __all__ across all major modules. This clearly defines the public-facing interface of the library, preventing internal helper functions from polluting your IDE’s autocomplete and ensuring a cleaner development workflow.
  4. Enhanced Process Robustness: The process management API now includes handling for psutil.ZombieProcess. This prevents unexpected crashes when querying system information about processes that are in a defunct state.
  5. Flexible Network Utilities: The get_localhost_free_port_of function has been updated to accept any Iterable for port candidates instead of just a Sequence, offering more flexibility when working with generators or sets of port numbers.
  6. Improved Documentation and Examples: The README has been thoroughly updated with corrected installation paths and modernized usage examples that reflect the transition to iterator-based process handling.

Putting It All Together:
Version 0.0.2-beta.1 transforms osn-system-utils into a more specialized, high-performance tool. By stripping away pandas and moving to iterators, we've made the library faster and more memory-efficient while maintaining the same powerful filtering capabilities for system administration and network management.

osn-system-utils v0.0.1

Choose a tag to compare

@oddshellnick oddshellnick released this 12 Jan 15:28

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:

  1. Advanced Process Management Table: Introduced a powerful get_process_table function 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.
  2. Flexible Port Allocation: The network API has been overhauled to support a wider port range (up to 65535). The new get_localhost_free_port_of utility allows for smart port hunting using "min", "max", or "random" strategies, making it easier to find available ports for local services.
  3. Cross-Platform Power & Process Control: We’ve implemented standardized wrappers for essential system commands. This includes shutdown and taskkill for Windows, and pkill, kill, and ss (Socket Statistics) for Linux, ensuring consistent behavior across different environments.
  4. 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.
  5. Standardized Command Execution: Improved the core run_command utility to handle subprocess execution with better encoding support and custom exception handling through the new CommandExecutionError class.

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.

osn-system-utils v0.0.0

Choose a tag to compare

@oddshellnick oddshellnick released this 10 Jan 19:21

This is the first release of osn-system-utils