semvec/pypi-packages huggingface dataset:
django-heap 0.0.2
Simple Heap analytics integration
License: BSD

===========
django-heap
===========

Heap is a unique new service that automatically captures all user actions on
your site including UI interaction.

This library helps developers integrate `Heap analytics`_ into their Django
projects.

Installation
============

Install using pip::

    pip install django-heap

Basic usage
===========

Add ``heap`` to installed apps::

    INSTALLED_APPS = (
        ...
        'heap',
    )

There is no need to run ``manage.py syncdb`` since django-heap has no database
tables. Add the ``heap`` context processor::

    TEMPLATE_CONTEXT_PROCESSORS = (
        ...
        'heap.context_processors.heap',
    )

Finally, configure the app ID in ``settings.py``::

    HEAP_APP_ID = '12345...'

To enable Heap tracking, you must include the script tag snippet in your
template like so::

    <head>
        ....
        {% include 'heap/script.html' %}
    </head>

Now you are ready to start tracking.

Tracking superusers
===================

By default, django-heap tracks your site's superusers as well. You can disable
this by setting the ``HEAP_TRACK_SUPERUSER`` flag to ``False``. This prevents
the script tag template from rendering when user has ``is_superuser`` property
set to ``True``.

Automatic identification of users
=================================

django-heap can automatically call ``heap.identify`` with data from the
authenticated user. To do that, you need to set the ``HEAP_AUTO_ID_USER``
setting to ``True`` (disabled by default). Only authenticated users will be
identify. The User object's ``get_full_name`` method will be used to derive the
``name`` parameter for the ``identify`` call, and if User object has an
``email`` field, the ``email`` parameter will also be passed. There is
currently no handling for the cases where ``get_full_name`` returns the user's
``email`` address.

**Note** This implementation is currently experimental, so please do it
manually in the ``BODY`` tag as suggested by Heap documentation if you find it 
doesn't work for you.

Customizing django-heap
=======================

You can customize django-heap by simply overriding the default template. There
is currently no direct support for custom tracking calls, but it is planned for
the next release.

Reporting bugs
==============

Please report bugs to our BitBucket `issue tracker`_.

.. _Heap Analytics: https://heapanalytics.com/
.. _issue tracker: https://bitbucket.org/monwara/django-heap/issues
starter.templates.python-django 0.1.2
Django project template for starter (http://github.com/klen/starter).
License: BSD

starter.templates.python-django
###############################

Starter_ template.

python-django -- Django project template.

.. contents::


Requirements
=============

- python >= 2.6
- starter >=0.1.0


Installation
=============

**Python-django** should be installed using pip: ::

    pip install starter.templates.python-django


Usage
=====


Bug tracker
===========

If you have any suggestions, bug reports or
annoyances please report them to the issue tracker
at https://github.com/Kirill Klenov/python-django/issues


Contributing
============

Development of starter happens at github: https://github.com/klen/starter-python-django


Contributors
=============

* `Kirill Klenov`_ (Kirill Klenov)


License
=======

Licensed under a `BSD license`_.


.. _BSD license: http://www.linfo.org/bsdlicense.html
.. _Kirill Klenov: http://klen.github.com/
.. _Starter: http://github.com/klen/starter
ls-s3-logs 0.1.2
A library to parse S3 log files.
License: BSD

======================
S3 log parsing library
======================

A python library to parse S3 log files.


Warning
=======

Unit tests currently require actual S3 credentials (and a bucket with logs) and can therefore only be run manually.
Mocking the relevant parts of boto.s3 is on the roadmap. Contributions are welcome :)


Purpose
=======

Download S3 logs from a bucket, and parse them.

This application does not store the log objects generated and leaves that to other applications.


Install
=======

Eventually from pypi ...


Use
===

To get logs, simply use the Downloader class::

    from itertools import chain
    from pprint import pprint
    from lss3logs.download import Downloader

    MY_ACCESS_KEY_ID = 'XXX'
    MY_KEY_SECRET = 'XXX'
    MY_S3_BUCKET_NAME = 'XXX'

    downloader = Downloader(
        connection=None,
        aws_access_key_id=MY_ACCESS_KEY_ID,
        aws_key_secret=MY_KEY_SECRET,
    )

    # download 10 logs
    logs = downloader.download_files(
        MY_S3_BUCKET_NAME,
        prefix='logs/',
        max_logs=1)

    entries = [ log.entries for log in logs ]
    entries = list(chain.from_iterable(entries))
    [pprint(entry.__dict__) for entry in entries]


Running tests
=============

First you need to specify the test config, which contains the AWS credentials and details of bucket tot test with.
python-testconfig is used to manage the test configuration.

Copy test_config.ini.sample to test_config.ini (in the same directory) and set correct values::

    export NOSE_TESTCONFIG_AUTOLOAD_INI=`pwd`/test_config.ini

To test with nose::

    python setup.py nosetests

or running nosetests directly::

    nosetests -s --exe

Directly and with coverage::

    nosetests -s --exe --with-coverage --cover-package=lss3logs

(Note: the --exe includes python files whoch are executable, so it's optional if you don't have any.)


Code quality
============

Checking code with pylint::

    pylint lss3logs


TODO
====

* mock boto output (see https://github.com/eykd/duo/blob/master/test_duo.py for an example)
* fix as many errors as possbile reported by pylint
* bring test coverage to 100%
* use Sphinx for docs


Credits
=======

The regular expression for parsing the log lines is copied from a script by "kkowalczyk" located at http://code.google.com/p/kjk/source/browse/trunk/scripts/test_parse_s3_log.py
Flask-Config-Override 0.0.2
Override Flask configuration via Cookie at runtime.
License: BSD

flask-config-override
=====================

[![Build Status](https://travis-ci.org/elboby/flask-config-override.png?branch=master)](https://travis-ci.org/elboby/flask-config-override)

This extension allows to change the configuration of a Flask application at runtime. This behavior is controlled by cookie and therefore is contained to the session of an unique user; configuration changes are not affecting other users.

A common usage is to quickly change options in staging environment without having to redeploy configuration changes. For example, we use it for an external API location or a feature switch like using minified Javascript files or not.

The configuration options able to be overridden are limited and configurable as well (using CONFIG_OVERRIDE_EXTENDABLE_VARS). This option can NOT be overridden for security reason.

The idea is to replace the configuration object of a Flask application by a proxy object, whom behavior can be controlled/changed upon request while exposing the same interface as a Flask configuration. The extension also provide a blueprint (default base url to /config_override/) to control the cookie via some simple HTTP calls; this is automatically attached to the application.

Installation
============
Via Pypi:

    pip install flask-config-override

Usage
=====
Once installed, first attach the extension to your Flask application:

    from flask import Flask
    from flask.ext.config_override import ConfigOverride

    app = Flask(__name__)
    app.config['FOO'] = 'bar'

    # Enable the override for the DEBUG option (default to false)
    app.config['CONFIG_OVERRIDE_EXTENDABLE_VARS'] = ['FOO']
    config_override = ConfigOverride(app)

    # configure your routes and what not...

Launch your app, then open your browser and go to this url to setup the FOO option to another value; here "toto":

    http://localhost:5000/config_override/update/FOO/toto/

Your session will now run with the settings FOO set to the new value. You can access it normally from `app.config['FOO']` within the context of a request.

To see the current changes, you can visit this url:

    http://localhost:5000/config_override/

And to remove the changes, you just need to clear your cookie or go there:

    http://localhost:5000/config_override/reset/


Tests
=====
* First install `nose` for test discovery: `pip install nose`
* Then run the tests within a virtual environment: `nosetests`


Contact
=======
Feel free to post issues, pull requests in github or contact me directly on twitter @el_boby.


Immediate TODOs
===============
* test for cookie_utils
* test for proxy_config (based on flask one)
* documentation API (sphinx)


TODO
====
* Override by Environment variables.
* Flask Debug Toolbar integration.