Metadata-Version: 2.1
Name: pwho
Version: 0.1.0
Summary: PROXY protcol: http://www.haproxy.org/download/1.5/doc/proxy-protocol.txt.
Home-page: https://github.com/bninja/pwho
Author: Etal
Author-email: et@al.org
License: BSD
Platform: any
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Software Development :: Libraries :: Python Modules
License-File: LICENSE
Provides-Extra: tests
Requires-Dist: netaddr (<0.8,>=0.8) ; extra == 'tests'
Requires-Dist: pytest (<3,>=2.5.2) ; extra == 'tests'
Requires-Dist: pytest-cov (<2,>=1.7) ; extra == 'tests'

====
pwho
====

.. image:: https://travis-ci.org/bninja/pwho.png
   :target: https://travis-ci.org/bninja/pwho

.. image:: https://coveralls.io/repos/bninja/pwho/badge.png
   :target: https://coveralls.io/r/bninja/pwho

PROXY protocol v1:

- http://www.haproxy.org/download/1.5/doc/proxy-protocol.txt

parsing **taken** from:

- https://github.com/benoitc/gunicorn/

Get it:

.. code:: bash

   $ pip install pwho
    
Use it e.g.  with ``SocketServer`` like:

.. code:: python

    import SocketServer
    
    import pwho

    class SFTPRequestHandler(
              SocketServer.StreamRequestHandler,
              pwho.StreamRequestMixin
          ):
    
        def handle(self)
            self.proxy_info = self.proxy_protocol(error='unread', authenticate=True)
            ...


