This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Introduction

This package provides “evasion.common”. This is a collection of useful functions and other utilities.

evasion.common.net

get_free_port

Find a TCP port locally that is not in use and return it. This finds a random port in the range 2000 - 10000. It tests if it is available by binding to it. It the closed the socket and return the port.

This is quite handy for getting a free port to run a service on while acceptance testing.

Example usage:

from evasion.common import net

# Get a free port:
port1 = net.get_free_port()

# Get another free port excluding the first port from the list
port1 = net.get_free_port(exclude_ports=[port1])

wait_for_ready

Called to wait for a web application to respond to normal requests. This is useful when you want to know a web app is not just bound to a socket, but is actually responding 200 OK to root page downloads.

Example usage from unit tests:

from evasion.common import net
from evasion.common import webhelpers

port1 = net.get_free_port()

# Run the web app and wait for ready should connect:
web = webhelpers.BasicWeb(port=port1)
web.start()

result = net.wait_for_ready(web.uri)
assert result

web.stop()

wait_for_service

Called to wait until a socket connection can be made to a remote service.

Example usage from unit tests:

from evasion.common import net
from evasion.common import webhelpers

port1 = net.get_free_port()

# Run the web app and wait for ready should connect:
web = webhelpers.BasicWeb(port=port1)
web.start()

result = net.wait_for_service('localhost', port1)
assert result

web.stop()
Release History

Release History

1.0.3

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
evasion-common-1.0.3.tar.gz (7.1 kB) Copy SHA256 Checksum SHA256 Source Sep 11, 2013

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development 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