Skip to main content

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]

Metadata

Release files for str2port 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for str2port 0.1.1
File Size Uploaded
str2port-0.1.1.tar.gz 264.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for str2port 0.1.1
File Interpreter ABI Platform
str2port-0.1.1-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 1.4 MB

Release files / str2port-0.1.1.tar.gz

Download URL str2port-0.1.1.tar.gz
Size 264.7 kB
Tags Source
SHA-256 checksum
How to use checksums
9c4b6c157178ac6a936395c670481729a3824af08631587f6e55ad5e8b94505a
BLAKE2b-256 checksum
How to use checksums
2c0ef07d4ff75db0c4232352b2ff0bc319a79aa667d2f2347783fca7ebc4eb8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/0.11.5 CPython/3.7.0 Darwin/17.7.0

Release files / str2port-0.1.1-py2.py3-none-any.whl

Download URL str2port-0.1.1-py2.py3-none-any.whl
Size 1.1 MB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
233b7f9a5cf1d0281539456c9b6eca81fd4500129aab577ec3b4844527123127
BLAKE2b-256 checksum
How to use checksums
52183197071f7696666fb9fec536015cd3af5d33b85f1d8aba064a95484aacd0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/0.11.5 CPython/3.7.0 Darwin/17.7.0

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page