semvec/pypi-packages huggingface dataset:
emulaterest 0.2
WSGI middleware that does Rails style PUT and DELETE request emulation
License: MIT
Keywords: web wsgi middleware rest

===========
EmulateRest
===========

WSGI middleware that does Rails style PUT and DELETE request emulation.

The middleware intercepts the wrapped application's response and looks
for forms with ``method="PUT"`` or ``method="DELETE"``. For each such form
it replaces the value of ``method`` with "POST" and adds a hidden input
field ``_method`` that contains the original request method.
It also intercepts incoming requests and does the inverse transformation.

What this all means is that you can use PUT and DELETE forms in your
HTML code, without having to worry about browser support for these
request methods.

Install
=======

You can install EmulateRest from `PyPI <http://pypi.python.org/pypi>`_::

    easy_install emulaterest

or you can install the latest version from the
`github repository <http://github.com/abiczo/emulaterest>`_::

    git clone git://github.com/abiczo/emulaterest.git
    cd emulaterest
    python setup.py install

Notes
=====

* For ``text/html`` documents the default behavior is to inject HTML style
  ``<input>`` elements. You can tell EmulateRest to inject XHTML style
  ``<input/>`` elements either by using the ``force_xhtml`` option or by
  serving your documents as ``application/xhtml+xml``.

* If you are using a gzipping middleware or any other middleware that modifies
  the content-encoding, make sure that EmulateRest is wrapped in that
  middleware and not the other way round.

Example
=======

A complete working example using `web.py <http://webpy.org>`_::

    import web

    urls = ('/', 'index')

    class index:
        def GET(self):
            web.ctx['headers'].append(('Content-Type', 'text/html'))
            return """<html><head><title>PUT test</title></head><body><div>
                <form method="PUT" action="/">
                    <div>
                        <input type="text" name="inp" value="value">
                        <input type="submit" value="Submit">
                    </div>
                </form>
                </div></body></html>
                """

        def PUT(self):
            return 'PUT ' + str(web.input())

    if __name__ == '__main__':
        import emulaterest
        app = web.application(urls, globals())
        app.run(emulaterest.EmulateRestMiddleware)
Flask-ErrorMail 0.2.2
Flask extension for sending administrators e-mails with stacktraces when internal server errors occur.
License: MIT

Flask-ErrorMail
----------

A Flask extension to automatically send stacktrace error e-mails to site 
administrators when 500 errors occur.

Please refer to the online documentation for details.

Links
`````

* `documentation <http://packages.python.org/Flask-ErrorMail>`_
* `development version
  <https://github.com/jasonwyatt/Flask-ErrorMail/tarball/master>`_
pyIMX233 0.0.1
Control GPIOs on OLinuXino-Maxi.
License: MIT

This package provides class to control the GPIO on Olinuxino Maxi.
        Current release does no support any peripheral functions.
        
        Example
        =======
        
        Typical usage::
            
            #!/usr/bin/env python
        
            import IMX233_GPIO as GPIO
        
            #init module
            GPIO.init()
            
            #configure module
            GPIO.setcfg(GPIO.PIN#, GPIO.OUT)
            GPIO.setcfg(GPIO.PIN#, GPIO.IN)
                
            #read the current GPIO configuration
            config = GPIO.getcfg(GPIO.PIN#)
            
            #set GPIO high
            GPIO.output(GPIO.PIN#, GPIO.HIGH)
            
            #set GPIO low
            GPIO.output(GPIO.PIN#, GPIO.LOW)
            
            #read input
            state = GPIO.input(GPIO.PIN#)
            
            #cleanup 
            GPIO.cleanup()
            
        Warning
        =======