{"categories":[{"label":"Networking","url":"https://skillfed.io/packages/category/system-networking/2"}],"enrichment":{"capability":"Reserves an ephemeral port reliably and race-free by binding, forcing it into TIME_WAIT state, and unbinding, so subprocesses can bind to it explicitly without conflict.","skillfed_tags":["port-allocation","testing-utilities","docker-support"],"use_cases":["Running multiple Docker containers in parallel without port conflicts by reserving ports before container startup.","Allocating ports for parallel test services in CI/CD pipelines where port 0 is unreliable.","Starting multiple instances of mysqld or similar daemons that don't honor port 0 as a kernel-allocation signal.","Ensuring port availability in containerized test environments where standard ephemeral allocation races.","Scripting port reservation for subprocess startup when you need to pass the port number to child processes."],"what_it_does":"ephemeral-port-reserve solves the problem of allocating unused network ports when the standard \"port 0 trick\" fails or is unreliable. Some applications like mysqld or Docker interpret port 0 specially rather than letting the kernel choose a free port, and Docker's port allocation can race under parallelism. This package provides a race-free alternative by binding to an ephemeral port, forcing it into TIME_WAIT state, and unbinding it\u2014reserving that port so the kernel won't reuse it for a grace period (typically 60 seconds on Linux), while still allowing subprocesses to bind to it explicitly if they use SO_REUSEADDR.\n\nIt's typically used in test suites, containerized deployments, and parallel service startup scenarios where you need to guarantee port availability without hard-coding. The package has no runtime dependencies, supports Python 2.7 and 3.5 through 3.8, and is maintained as a small, focused utility.","worth_installing":"Yes, if you need race-free ephemeral port allocation in parallel or containerized scenarios where port 0 doesn't work. The package is lightweight, has no dependencies, carries a permissive license, and is actively maintained. Install it only if you hit the specific problem it solves; it's not a general-purpose utility."},"id":"ephemeral-port-reserve","links":{"html":"https://skillfed.io/packages/ephemeral-port-reserve","md":"https://skillfed.io/packages/ephemeral-port-reserve.md","pypi":"https://pypi.org/project/ephemeral-port-reserve/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2021-02-11","license_spdx":null,"license_treatment":"permissive","name":"ephemeral-port-reserve","python_support":"supports_current","summary":"Bind to an ephemeral port, force it into the TIME_WAIT state, and unbind it."},"popularity":{"monthly_downloads":90223,"position":13610,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"1.1.4"}
