Skip to main content

A simple command line tool for generating a random non-affiliated port.

Project description

random-open-port

The random open port provides some helpful functionality for getting a random port that isn't tracked identified as a known port in https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers#Registered_ports.

Installation

pip3 install random-open-port

Requirements

Python 3+

Using from the command line.

Simply run

foo@bar:~$ random-port
Random Port: 36952

Examples

Getting a random port.

from random_open_port import random_port
port = random_port()

Getting the affiliated ports.

from random_open_port import get_taken_ports
taken_ports = get_taken_ports() 

Getting the ports directly from Wikipedia.

from random_open_port import get_wiki_ports
wiki_ports = get_wiki_ports()

Getting the ports from the cached file.

from random_open_port import read_ports_file
cached_ports = read_ports_file()

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

random-open-port-0.0.3.tar.gz (4.9 kB view details)

Uploaded Source

File details

Details for the file random-open-port-0.0.3.tar.gz.

File metadata

  • Download URL: random-open-port-0.0.3.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3

File hashes

Hashes for random-open-port-0.0.3.tar.gz
Algorithm Hash digest
SHA256 c9bf9e94285ddc6714bad665ee67d0f191c0c239ce81b3b530f153692df8c16d
MD5 1c7fd4e4a3ce5c61487cac98f1f80c5a
BLAKE2b-256 954b122140e3fe45316ebd69bb91c9a2a327ed56b4dd5ca51a2e174feeb8e2ae

See more details on using hashes here.

Supported by

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