Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Outgoing TCP port tester for Python 3.4+

Project Description

Outgoing TCP port tester for Python 3.4+

An outgoing TCP port tester for python using http.client.

It works by sending a HTTP request to the chosen host (resolved to IP) and TCP ports, then retrieving the HTTP code from the response header(s) or timeout.

It can be used as a library or CLI-command/executable.

Feel free to pull request, request a feature or report bugs.

Install using pip

Install the package via pip:

pip install outcp

Install from source

Clone the repository from Github:

git clone https://github.com/m-jowett/outcp

Enter the repo folder:

cd outcp

Build the package:

python setup.py sdist

Enter the dist folder:

cd dist

Install the package via pip:

pip install outcp-1.0.1.zip

Features

test()

test(port=-1, hostname=“”)

  • port: (int) TCP port
  • hostname: (str) Host, can be a domain or IP.

testui()

testui(portlist=“”, namelist=“”, hostname=“”, format=1)

  • portlist: (list/int) List of ports converted into integers, can also be a single integer for one port.
  • namelist: (list/str) List of port names/labels converted into strings, can also be a single string for one name.
  • hostname: (str) Host, can be a domain or IP.
  • format: (1) (int)
  • 1 - Table with dynamic spacing, according to var sizes.
  • 0 - Table with static values (may not line up correctly).

main()

main()

Run when the script is executed.

Asks the user to input the hostname(s), port(s) and port label(s) (if any).
These are separated by a space.

License

See LICENSE file

The MIT License (MIT)

Copyright (c) 2016 Matthew Jowett

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Release History

Release History

This version
History Node

1.0.1

History Node

1.0.0

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
outcp-1.0.1-py2.py3-none-any.whl (7.9 kB) Copy SHA256 Checksum SHA256 any Wheel Oct 1, 2016
outcp-1.0.1.zip (9.9 kB) Copy SHA256 Checksum SHA256 Source Oct 1, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting