Skip to content

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

Pre-release
Pre-release

Choose a tag to compare

@oddshellnick oddshellnick released this 25 Jan 02:52
· 1 commit to dev since this release

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.