Skip to main content

a simple port allocator

Project description

Portela

a simple port allocator

Portela is a Python 2 & 3 compatible port allocator with zero dependencies.

Portela can be used to test basic port connectivity on your host and lets you open up ports on various network interfaces.

You can do the same functions with netcat, SimpleHTTPServer, socat and various other tools, but Portela is more user-friendly and offers a simple way to bind to various network interfaces.

Python compatibility: 2.7.x - 3.8.x

Platform compatibility: Linux

usage:

# portela 1234                      // spin up a listener on port 1234
# portela 1234 -i eth1              // spins up on port 1234 on interface 'eth1'
# portela 1234 -i eth1 -d           // spins up on port 1234 on interface 'eth1' and run as daemon
# portela 1234 -m "samba magic"     // spins up on port 1234 and return a message on HTTP call
# portela stop                 // stops all instances of portela listerner
# portela status                 // check if portela is running as daemon
# portela help / -h / --help   // prints this message

Install

pip install portela

Testing

Local testing

sudo pip install -e /path/to/portela

Daemon

When Portela puts the listener in background as daemon, it creates a PID file (.portela.pid) in /home/user directory

Daemon functions are taken from this article: https://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/

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

portela-0.0.5.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

portela-0.0.5-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file portela-0.0.5.tar.gz.

File metadata

  • Download URL: portela-0.0.5.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.9

File hashes

Hashes for portela-0.0.5.tar.gz
Algorithm Hash digest
SHA256 85b63c4a647bb19602c5b88286bf7dd660e132064d4b6d6b6d0e8c9d6ff1cc17
MD5 4faaaa3e7e2aca187e28f57696e8982e
BLAKE2b-256 7a6e935ce10dda49ddd321ddbf1a4b4ce70f6f6413ae648fcbca160ecdbd4619

See more details on using hashes here.

File details

Details for the file portela-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: portela-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.9

File hashes

Hashes for portela-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 f176248455075e8388d38e067fd4c69fe14fb122e36583e6eefafbe9d49bcd81
MD5 fd1a58d35a81f6d08762b3d9352ab8e2
BLAKE2b-256 b410e916b3dc32e183e62ef8f86b4871d59cbc92d3e07c58bb2faaf174ceb681

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