Metadata-Version: 2.4
Name: anywsgi
Version: 0.0.3
Summary: Quick and dirty use any available WSGI server for running from command line
Home-page: https://github.com/clach04/anywsgi-py
Author: clach04
Maintainer: clach04
License: Apache Software License
Platform: any
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Operating System :: Microsoft :: Windows :: Windows NT/2000
Classifier: Operating System :: POSIX
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: Unix
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: maintainer
Dynamic: platform
Dynamic: summary

-- coding: utf-8 --

# anywsgi-py

quick and dirty use any available WSGI server for running from command line

  * https://pypi.org/project/anywsgi/
  * https://github.com/clach04/anywsgi-py

## Getting Started

### Regular install

    pip install anywsgi

### Without a source code checkout

Picking up the latest version

    pip uninstall anywsgi; python -m pip install --upgrade git+https://github.com/clach04/anywsgi-py.git

### From a source code checkout

    # pip uninstall anywsgi
    # python -m pip install -r requirements.txt
    # TODO requirements_optional.txt
    python -m pip install -e .


### Hello World Demo

```python
import os
import sys

import anywsgi
from anywsgi import DEFAULT_LISTEN_ADDRESS, DEFAULT_SERVER_PORT


def application(environ, start_response):
    start_response('200 OK',[('Content-type','text/html')])
    return [b'<html><body>Hello World!</body></html>']  # NOTE Python 3 requires this to be bytes, i.e. an iterator of bytes


print('Python %s on %s' % (sys.version, sys.platform))
listen_address = os.environ.get('LISTEN_ADDRESS', DEFAULT_LISTEN_ADDRESS)
server_port = int(os.environ.get('LISTEN_PORT', DEFAULT_SERVER_PORT))

anywsgi.my_start_server(application, listen_address=listen_address, listen_port=server_port)
```
