Skip to main content

Get free dynamic / registered ports

Project description

Get free dynamic / registered ports

Tested against Windows 10 / Python 3.10 / Anaconda

pip install get-free-port

from https://www.techtarget.com/searchnetworking/definition/dynamic-port-numbers

The registries for these protocols are divided into three categories, based on the available range of numbers (0 to 65535):

System ports, also known as well-known ports, include ports 0 to 1023 and support commonly used services. User ports, also known as registered ports, include ports 1024 to 49151 and are assigned to specific services, based on service applications submitted to IANA. Dynamic ports, also known as private or ephemeral ports, include ports 49152 to 65535 and are never assigned.

from get_free_port import get_dynamic_ports, get_registered_ports
print(get_dynamic_ports(3))
print(get_registered_ports(3))
[49152, 49153, 49154]
[1025, 1026, 1027]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

get_free_port-0.10.tar.gz (3.2 kB view hashes)

Uploaded Source

Built Distribution

get_free_port-0.10-py3-none-any.whl (4.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page