{"categories":[{"label":"Testing","url":"https://skillfed.io/packages/category/software-development-testing"}],"enrichment":{"capability":"Finds and returns an unused network port on the local host, available as a Python function or command-line tool for use in test automation and shell scripts.","skillfed_tags":["port-allocation","test-automation"],"use_cases":["Allocate a unique port dynamically in unit tests that start temporary servers.","Obtain an available port from shell scripts without hardcoding port numbers.","Run a port server daemon on test infrastructure to coordinate port allocation across concurrent test processes.","Avoid port conflicts when spinning up multiple service instances in integration tests."],"what_it_does":"Portpicker is a utility for finding an unused network port on the local host. It exposes a simple `pick_unused_port()` function that returns an available port number, and can also be invoked from the command line or as a Python module. The package is designed primarily for test automation, where you need to dynamically allocate ports without conflicts.\n\nThe library depends on psutil to check port availability. The documentation acknowledges a fundamental race condition: a port may be selected as free but claimed by another process before your code binds to it. For single-threaded test runs this is usually acceptable, but for loaded test hosts running many tests concurrently, the package includes an optional port server daemon that coordinates port allocation across all processes on the host, eliminating the race condition.","worth_installing":"Yes, for test automation and development. The package is stable and has no known vulnerabilities, with low install friction. However, the repository is archived and unmaintained\u2014if you encounter a bug or need a feature, you will need to fork or find an alternative. For production port coordination at scale, evaluate the included port server carefully or consider running it in a controlled test environment first."},"id":"portpicker","links":{"html":"https://skillfed.io/packages/portpicker","md":"https://skillfed.io/packages/portpicker.md","pypi":"https://pypi.org/project/portpicker/"},"maintenance":{"status":"abandoned"},"meta":{"latest_release":"2023-08-15","license_spdx":null,"license_treatment":"permissive","name":"portpicker","python_support":"supports_current","summary":"A library to choose unique available network ports."},"popularity":{"monthly_downloads":3396179,"position":2636,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"1.6.0"}
