Skip to content

osn_system_utils v0.0.2

Choose a tag to compare

@oddshellnick oddshellnick released this 25 Jan 03:12
· 2 commits to main since this release

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.