Metadata-Version: 1.1
Name: proxyenv
Version: 0.5.0
Summary: Create HTTP proxy environment using docker
Home-page: http://pypi.python.org/pypi/proxyenv/
Author: Martin Wilck
Author-email: mwilck@arcor.de
License: LICENSE.txt
Description: proxyenv: set up a Squid proxy and related process environment
        ==============================================================
        
        This is a python module that starts a
        `Squid <http://www.squid-cache.org/>`__ proxy running in a docker
        container, and sets up an environment for using this proxy to handle
        HTTP(S) requests both from python code and external programs. The
        purpose is mainly for testing proxy support in code that needs to make
        HTTP(S) requests. The proxy supports both HTTP and HTTPS, and Basic
        proxy authorization.
        
        Usage
        -----
        
        ::
        
            from proxyenv.proxyenv import ProxyFactory
            proxyfact=ProxyFactory()
        
            # Example for using urllib
            from six.moves.urllib import request
            with proxyfact() as proxy:
                opener  = request.build_opener(proxy.get_handler)
                opener.open(url)
        
            # Example for starting external program with proxy-related environment
            # variables
            from subprocess import check_output
            with proxyfact(user="johndoe:secret", port=3077) as proxy:
                check_output(["/usr/bin/wget", url])
        
        Please use the ``main`` program in ``proxyenv/proxyenv.py`` as
        additional source of documentation.
        
        The proxyenv script
        -------------------
        
        The package also contains a console script ``proxyenv``.
        
        ::
        
            usage: proxyenv [-h] [-p PORT] [-u USER] [-i IMPL] [-s] [-w] [-v]
                            [URL [URL ...]]
        
            positional arguments:
              URL                   an URL to retrieve
        
            optional arguments:
              -h, --help            show this help message and exit
              -p PORT, --port PORT  proxy port to use (default: 3128)
              -u USER, --user USER  proxy user in user:password format
              -i IMPL, --impl IMPL  set implementaton (cmdline or api, default: api)
              -s, --shell           open a shell in new environment
              -w, --wait            wait for input
              -v, --verbose         verbose output
        
        
Keywords: squid,testing,http,proxy,docker
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Environment :: Console
Classifier: Natural Language :: English
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Testing
Classifier: Topic :: Internet :: Proxy Servers
