{ "info": { "author": "Ryan Garber", "author_email": "ryanmichaelgarber@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Internet :: WWW/HTTP :: HTTP Servers" ], "description": "#######\nMiniPyP\n#######\nA more traditional web server in Python\n\n.. image:: https://badge.fury.io/py/minipyp.svg\n :target: https://badge.fury.io/py/minipyp\n :alt: Release Status\n.. image:: https://readthedocs.org/projects/minipyp/badge/?version=latest\n :target: http://minipyp.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n.. image:: https://travis-ci.org/RyanGarber/minipyp.svg?branch=master\n :target: https://travis-ci.org/RyanGarber/minipyp\n :alt: Build Status\n\nAbout the project\n=================\nMiniPyP (pronounced ``mini\u00c2\u00b7pipe``) is an event-driven web server written in pure Python. **However, MiniPyP is not an application framework**. It's a full web server, with virtual hosts, reverse proxies, and everything else you need. MiniPyP is intended to replace Apache and nginx, so you can use Python without the performance hit of CGI.\n\nMiniPyP has some more advanced features right out of the box, too. For example, when a user goes to ``/some/url`` on your server, and the directory's ``static`` option is set to False (default), the server will look for the file ``/some/url``. If it doesn't exist, but the file ``/some`` does, that file will be served. Extensions do not need to be specified with the ``static`` option set to False. In addition, if a file does not exist but a file named ``catchall`` exists, it will be served instead of a 404. This makes creating a single-page application that much more elegant.\n\nSetup\n=====\nFirst, install MiniPyP via pip.\n\n.. code-block:: bash\n\n pip install minipyp\n\nTo start a server within a Python program, specify a config like so (you may alternatively give a file location as the ``config``):\n\n.. code-block:: python\n\n from minipyp import MiniPyP\n\n config = {\n 'host': '0.0.0.0',\n 'port': 80,\n 'root': '/var/www/html',\n 'timeout': 15,\n 'error_pages': {\n 404: {\n 'html': '
The file {uri} could not be found.
You requested the page ' + request.uri + '.