<commit_before>Pip, a web server for gentlemen 
===============================

Pip (or <NAME>) is the main character from the Charles Dickens novel
_Great Expectations_, who leaves his life as a blacksmith's apprentice and
goes to London to become a gentleman.

Pip is also the name of a pure PHP web server.

Getting Started With Pip
------------------------

"Hello World" in Pip.

hello.php

    <?php

    use pip;
    require 'pip/webapp.php';

    class HelloWorld extends webapp\RequestHandler {
      function get() {
        $this->response->content_type = 'text/plain';
        fwrite($this->response, 'Hello, world!');
      }
    }

    $app = new webapp\PipApp(array(
      ('/', 'HelloWorld'),
    ));

    if (!debug_backtrace()) {
      $server = new servers\Http($app);
      $server->start();
    }

Run in a shell.

    $ php hello.php
    [INFO:pip] pip is serving HTTP from localhost on port 5000

See examples/ for more.

Requirements and Installation
-----------------------------

Pip requires PHP 5.3. It uses namespaces, closures and some new
array functions.

See INSTALL for instructions on installing.

Bugs
----

A lot.

To Do
-----

- Change HTTP parser (looking at antlr3 and PECL's HTTP parser)
- Populate PHP superglobals (e.g. $_POST, $_SERVER) when rendering PHP

Contact
-------

<NAME> 
<commit_msg>update readme to reflect api changes<commit_after>Pip, a web server for gentlemen 
===============================

Pip (or <NAME>) is the main character from the Charles Dickens novel
_Great Expectations_, who leaves his life as a blacksmith's apprentice and
goes to London to become a gentleman.

Pip is also the name of a pure PHP web server.

Getting Started With Pip
------------------------

"Hello World" in Pip.

hello.php

    <?php

    require 'pip/http.php';
    require 'pip/webapp.php';

    class HelloWorld extends pip\webapp\RequestHandler {
      function get() {
        $this->response->content_type = 'text/plain';
        fwrite($this->response, 'Hello, world!');
      }
    }

    $app = new pip\webapp\PipApplication(array(
      array('/', 'HelloWorld'),
    ));

    if (!debug_backtrace()) {
      $server = new pip\servers\Http();
      $server->start($app);
    }

Run in a shell.

    $ php hello.php
    [INFO:pip] pip is serving HTTP from localhost on port 5000

See examples/ for more.

Requirements and Installation
-----------------------------

Pip requires PHP 5.3. It uses namespaces, closures and some new
array functions.

See INSTALL for instructions on installing.

Bugs
----

A lot.

To Do
-----

- Change HTTP parser (looking at antlr3 and PECL's HTTP parser)
- Populate PHP superglobals (e.g. $_POST, $_SERVER) when rendering PHP

Contact
-------

<NAME> 

{'fraction_non_alphanumeric': 0.1608901860634805, 'fraction_numerical': 0.005107624954396206, 'mean_word_length': 2.5472186287192757, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7068329', 'n_tokens_mistral': 851, 'n_tokens_neox': 800, 'n_words': 306}