semvec/pypi-packages huggingface dataset:
tornadose 0.4.1
Tornado-sent events
License: MIT
Keywords: tornado web eventsource websockets pubsub

Tornado-sent events
===================

An implementation of the publish/subscribe pattern for the Tornado_ web
server.

Installation
------------

Tornadose is on PyPI:

.. code-block:: bash

    $ pip install tornadose

This will grab the latest official release. Alternatively, or for development,
you can clone the repository and install it manually:

.. code-block:: bash

    $ git clone https://github.com/mivade/tornadose.git
    $ cd tornadose
    $ pip install -e .

Usage
-----

A simple example of using server-sent events (a.k.a. EventSource):

.. code-block:: python

   import random
   from tornado.ioloop import IOLoop, PeriodicCallback
   from tornado.web import Application
   from tornadose.handlers import EventSource
   from tornadose.stores import DataStore

   store = DataStore()

   app = Application(
       [(r'/', EventSource, {'store': store})],
       debug=True)
   app.listen(9000)

   loop = IOLoop.instance()
   PeriodicCallback(lambda: store.submit(random.random()), 1000).start()
   loop.start()

To monitor the stream with curl_:

.. code-block:: bash

   $ curl http://localhost:9000

or with HTTPie_:

.. code-block:: bash

   $ http -S get localhost:9000

Additional demos can be found in the ``demos`` directory.

Contributing
------------

Contributions, complaints, criticisms, and whatever else are welcome. The source
code and issue tracker can be found on GitHub_.

See also
--------

Some other implementations of server-sent events with Tornado include:

* tornado-sse_
* tornado-eventsource_

License
-------

Tornadose is freely available under the terms of the MIT license. See
``LICENSE`` for details.

.. _Tornado: http://www.tornadoweb.org/en/stable/
.. _EventSource: https://developer.mozilla.org/en-US/docs/Web/API/EventSource
.. _curl: http://curl.haxx.se/
.. _HTTPie: https://github.com/jkbrzt/httpie
.. _tornado-sse: https://github.com/truetug/tornado-sse
.. _tornado-eventsource: https://github.com/guilhermef/tornado-eventsource
.. _GitHub: https://github.com/mivade/tornadose
tomako 0.1.0.post1
Tomako is the easiest way to use Mako as a template engine for Tornado
License: MIT
Keywords: tomako,mako,tornado

Tornado + Mako = tomako
=======================

Tomako is a tiny library designed to provide an easy way to use Mako
as a template engine for Tornado.

This lib was tested with Tornado 2.3/2.4 and Mako 0.7.2, but should
work in other versions - although it wasn't tested in other versions.

Usage
-----

The recommended approach is to pass ``template_loader`` configuration
to ``Application`` class.

.. code-block:: python

    from tomako import MakoTemplateLoader

    conf = {
        'template_loader': MakoTemplateLoader('/full/template/path')
    }
    app = Application(urls, **conf)

If you can't for any reason modify the ``template_loader``
configuration or you want to use Mako as a template engine only on
some handlers, you can overwrite ``RequestHandler.create_template_loader``.

.. code-block:: python

    from tornado.web import RequestHandler
    from tomako import MakoTemplateLoader

    class MyHandler(RequestHandler):
        def create_template_loader(self, template_path):
            return MakoTemplateLoader(template_path)

Tornado UIModules
-----------------

Tomako has basic support for Tornado's UIModules_. You must include a
special namespace called ``tomako.template`` in your templates:

.. code-block:: python

    # Your python file
    from tornado.web import UIModule

    class MyModule(UIModule):
        def render(self, arg1, arg2):
            # do something with args here...
            return 'some string'

.. code-block:: html

    <!-- Your template -->
    <%namespace name="tomako" module="tomako.template" />

    <%tomako:ui uiclass="your.project.module.MyModule" arg1="value1" arg2="value2" />

Install
-------

.. code-block:: shell

    pip install tomako

To-Do
-----

 * Improve support on UIModules

License
-------

This work is licensed under MIT license (see LICENSE file).

.. _UIModules: http://www.tornadoweb.org/en/stable/overview.html#ui-modules
django-google-tools 1.1.0
Django app for managing Google Analytics and Site Verification codes.
License: MIT
Keywords: django,analytics,google analytics,verification code,site verification

Django Google Tools
===================

.. image:: https://secure.travis-ci.org/camilonova/django-google-tools.png?branch=master
    :alt: Build Status
    :target: http://travis-ci.org/camilonova/django-google-tools

Django app for managing Google Analytics and Site Verification codes.


Installation
------------

In your virtualenv just type::

    $ pip install django-google-tools


Configuration
-------------

In Django 1.6 the sites framework is disabled by default, for enable the sites
framework in Django 1.6 follow the steps 1, 2 and 3:

1. Add 'django.contrib.sites' to your INSTALLED_APPS setting.

2. Define a SITE_ID setting::

    SITE_ID = 1

3. Run in your shell::

    $ ./manage.py syncdb

4. Add ``googletools`` to your ``INSTALLED_APPS``::

    INSTALLED_APPS = (
        'django.contrib.admin',
        'django.contrib.auth',
        'django.contrib.contenttypes',
        'django.contrib.sessions',
        'django.contrib.sites',
        ...
        'googletools',
        ...
    )

5. Run in your shell::

    $ ./manage.py syncdb

Or if you are using ``South``::

    $ ./manage.py migrate

If you have in your settings ``DEBUG=True`` googletools will not render anything
because this library is inteded mostly to use on production sites, if you want to
change this behavior you can set ``GOOGLETOOLS_ENABLED=True`` in your settings
file. Just for clarification it is defined like this::

    GOOGLETOOLS_ENABLED = not DEBUG

This means, by default googletools will be enabled when ``DEBUG=False``.


Management
----------

Go to the admin interface. When correctly installed, you will find the
*Googletools* app. There you can manage your Google Analytics and Site Verification
codes.


Templatetags
------------

In order to use the googletools in your templates you'll have to load the templatetags.

``{% load googletools %}``

Use ``{% analytics_code %}`` for inserting your Analytics code.

Use ``{% site_verification_code %}`` for inserting your site verification code.

Templatetags will return an empty string if they are not configured for the current site.

The template should look like::

    {% load googletools %}
    <html>
        <head>
            <meta charset="utf-8">
            ...
            <meta name="description" content="..." />
            {% site_verification_code %}

            <link rel="stylesheet" href="/static/css/style.min.css">

            {% analytics_code %}
        </head>
        <body>
            <h1>My awesome project</h1>
            ...
        </body>
    </html>
Flask-Mandrill 0.3
Adds Mandrill support to Flask applications
License: MIT

Flask-Mandrill
==============

A Flask Extension to remove some of the boiler plate encountered when
sending emails with `Mandrill <http://www.mandrill.com/>`_

Installation
````````````

.. code:: bash

    $ pip install flask-mandrill


Usage
`````

.. code:: python

        from flask import Flask
        from flask.ext.mandrill import Mandrill

        app = Flask(__name__)
        app.config['MANDRILL_API_KEY'] = 'your api key'
        mandrill = Mandrill(app)
        mandrill.send_email(
            from_email='someone@yourdomain.com',
            to=[{'email': 'someoneelse@someotherdomain.com'}],
            text='Hello World'
        )


.. :changelog:

Release History
---------------


0.2 (2015-01-15)
++++++++++++++++

- Adds support for sending template emails.

0.1.1 (2013-10-25)
++++++++++++++++++

- Added config option MANDRILL_DEFAULT_FROM.

0.1.0 (2012-10-25)
++++++++++++++++++

- First release.