Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Convert string to md5 hash, then to port number. No randomization involved.

Project description

str2port

PyPI version shields.io PyPI license

Convert string to md5 hash, then to port numbers. No randomization involved.

Every time you run the script, it will return the same port numbers.

Installation

pip install str2port

Usage

str2port is available is a CLI app,

$ str2port --help
Usage: str2port [OPTIONS] STRING

Options:
  --use-iana  Exclude used ports from IANA list (default: false)
  --help      Show this message and exit.
$ str2port imserv
29635 44619 3226 6562 52589 12473 1423 1026
$ str2port imserv
29635 44619 3226 6562 52589 12473 1423 1026

Of course, it is also accessible via a Python script

>>> from str2port import str2port
>>> str2port('imserv')
[29635, 44619, 3226, 6562, 52589, 12473, 1423, 1026]

Project details


Download files

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

Files for str2port, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size str2port-0.1.1-py2.py3-none-any.whl (1.1 MB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size str2port-0.1.1.tar.gz (264.7 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page