semvec/pypi-packages huggingface dataset:
django-static-lor 0.1.0
LoR as 'Local or Remote' is a useful tool for manage static
    files between testing and production.
License: BSD

=================
Django Static LoR
=================

LoR as "Local or Remote" is a useful tool for manage static files between
testing and production.

Install
=======

Install the package on your system: ::

    pip install django-static-lor

Make the following things in your ``settings.py``:

* Add ``lor`` app at the beginning of your ``INSTALLED_APPS``
* Add ``LOR_USE_LOCAL_URLS`` for define if you want local or remote URLs
  (Better is simply ``LOR_USE_LOCAL_URLS = DEBUG``
* Add ``LOR_STATIC_DIR`` for define where is the app's static directory
* Add ``LOR_STATIC_DIR`` in ``STATICFILES_DIRS`` if you want to serve it when ``DEBUG == False``
* Add you matches in ``LOR_FILES_URLS``

Your settings will look like something like this: ::

    INSTALLED_APPS = (
          'lor',
          ...
    )
    LOR_USE_LOCAL_URLS = False
    LOR_STATIC_DIR = '/my/lor/static/dir/'
    STATICFILES_DIRS = (
        ...
        LOR_STATIC_DIR,
    )

    LOR_FILES_URLS = {
        'jquery': ('js/jquery.js',
            'https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js')
    }

Done!

Usage
=====

In templates
------------

::

    {% load lor %}
    My jQuery URL: {% lor_url 'jquery' %}
    
    
Collect remote files
--------------------

::

  ./manage.py wget

This will download all files in ``LOR_FILES_URLS`` and put them in ``LOR_USE_LOCAL_URLS``.
vumi-wikipedia 0.2.1
Vumi Wikipedia App
License: BSD

Vumi Wikipedia App
==================

This is a vumi[1] app that provides access to Wikipedia over a combination of
SMS and USSD.

To install:

    virtualenv --no-site-packages ve
    source ./ve/bin/activate
    pip install -r requirements.pip
    pip install -e .


NOTE: vumi 0.3.1 (the current stable release) is too old for this app, and the
      dev branch in github has a problem with one of its deps. There are some
      workarounds for this in the requirements.pip file.

[1] http://vumi.org
device-proxy 0.4.3
Device Proxy. A reverse HTTP Proxy that can inspect and manipulate HTTP Headers before sending upstream.
License: BSD

device-proxy
============

Inspects incoming HTTP requests adds some HTTP headers and proxies upstream.
Has ability to add extra cookies for HTTP responses being sent back to the
client.

|travis|_ |coveralls|_

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

    $ pip install device-proxy

Running
-------

Run with `twistd`::

    $ twistd -n devproxy --config config.yaml


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

This is what the processing chain looks like::

           +------------------+
           |                  |
           |           Header & Cookie set
           v                  |
    (1) HAProxy -> (2) *n* DeviceProxies
           |
          (3)
           | (if Cookie or Header set)
           +--------------------------------> (4) *n* Backend Apps

1. Haproxy receives incoming traffic from Nginx
2. Request is passed to *n* number of Device Proxies running.
   HTTP headers are inserted (possibly from cached WURFL or OpenDDR lookups).
   Device Proxy has the option of inserting Cookies into the HTTP response
   which can cache the Device Lookup (for subsequent requests HAProxy (1)
   could use these cookie values to skip DeviceProxy completely for the
   lifetime of the Cookie.)
   DeviceProxy reverse proxies back to HAProxy with HTTP headers inserted.
3. HAProxy inspects the HTTP headers & cookies received and selects appropriate
   backend application for the request. HAProxy can have a default fallback
   backend. If the Cookie is already set then the DeviceProxies are skipped.
4. The Backend application renders the request with a template set suitable for
   the given HTTP request.

.. note:: By default DeviceProxy only caches the lookup in Memcache, not in the Cookie.


.. |travis| image:: https://travis-ci.org/praekelt/device-proxy.png?branch=develop
.. _travis: https://travis-ci.org/praekelt/device-proxy

.. |coveralls| image:: https://coveralls.io/repos/praekelt/device-proxy/badge.png?branch=develop
.. _coveralls: https://coveralls.io/r/praekelt/device-proxy