semvec/pypi-packages huggingface dataset:
django-loginurl 0.2
Allowing an anonymous user to log in by only visiting a URL
License: BSD

================
Django Login URL
================

This is a simple application for Django that allows an anonymous visitor to
log in as a user by only visiting a URL. 

By default, the URL is only valid once and cannot be used multiple times.
Other schemes that involve the number of visit and/or an expiry date can
also be created. For example, it is possible to create a log in URL that
only valid for 5 visits before next week using this application.


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

1. Add django-loginurl application into your Django project. Modify your
   ``settings.py`` like the following::

        INSTALLED_APPS = (
            ...
            'loginurl',
            ...
        )

2. Add the authentication backend of this django-loginurl application to
   your project's ``settings.py``.
   ::

        AUTHENTICATION_BACKENDS = (
            'django.contrib.auth.backends.ModelBackend',
            'loginurl.backends.LoginUrlBackend',
        )
   
   The first authentication backend is the default and if your project uses
   the Django's standard authentication mechanism, you will need that.

   Consult the Django documentation for more information regarding the
   backend. See
   http://docs.djangoproject.com/en/dev/topics/auth/#other-authentication-sources


3. Include the application's ``urls.py`` to your project.
   ::

        urlpatterns = patterns('',
            ...
            (r'^loginurl/', include('loginurl.urls')),
            ...
        )
    
   This will make requests to ``loginurl/`` are handled by django-loginurl.
   If the configuration is put inside the project's ``urls.py``, the log in
   URL will look like the following::

       http://example.com/loginurl/a-secret-key


Scheduled Task
--------------

To keep your database clean from expired secret keys, a scheduled task need
to be set up. This task should do one of the following.

1. Call ``loginurl_cleanup`` command from the Django's management script, or

2. Open a special URL that will trigger the clean up, ``loginurl/cleanup/``.
   e.g. http://example.com/loginurl/cleanup/

You can use crontab or the web based one to set this up. A daily or weekly
task should be enough.


Usage
-----

If your application need to create a one time log in URL, what you need to
do is calling ``loginurl.utils.create`` with a user object as the parameter.
The resulting object is an instance of ``loginurl.models.Key`` that has a
property called ``key`` that contains a unique key for the log in URL.
::

    import loginurl.utils

    def create_login_url(user):
        key = loginurl.utils.create(user)
        url = 'http://example.com/loginurl/%s' % key.key

        return url


Acknowledgement
---------------

This code has been developed in the context of the research activities of the
FET project (Grant agreement no. 231807).

    Epiwork: developing the framework for an epidemic forecast infrastructure.

See http://www.epiwork.eu/
bugzscout-py 0.0.1
Python interface for the FogBugz BugzScout API.
License: BSD
Keywords: BugzScout,FogBugz

bugzscout-py
============
Python interface for the FogBugz BugzScout API.

.. image:: https://travis-ci.org/thomasvandoren/bugzscout-py.png?branch=master
    :target: https://travis-ci.org/thomasvandoren/bugzscout-py

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

.. code-block:: bash

    pip install bugzscout-py

Supported python versions
~~~~~~~~~~~~~~~~~~~~~~~~~

* 2.6, 2.7
* 3.1, 3.2, 3.3
* pypy

Getting Started
---------------

.. code-block:: pycon

    >>> import bugzscout
    >>> b = bugzscout.BugzScout('http://fogbugz/scoutSubmit.asp',
                                'fb-user',
                                'the-project',
                                'the-area')
    >>> b.submit_error('An eror occurred of type blah', extra='Extra info')

Command Line Interface
~~~~~~~~~~~~~~~~~~~~~~

There is a command line interface for submitting errors. To simplify submitting
multpile errors, the FogBugz configuration can be set in the environment.

.. code-block:: bash

    # (Optional) Setup the environment.
    export BUGZSCOUT_URL=http://fogbugz/scoutSubmit.asp
    export BUGZSCOUT_USER=errors
    export BUGZSCOUT_PROJECT='My Project'
    export BUGZSCOUT_AREA=Errors

    # Submit a new error.
    bugzscout --extra 'Extra data for the case...' 'The description of the error.'

Celery
~~~~~~

The `Celery <http://celeryproject.org/>`_ extension can be used to
asynchronously publish errors. This is the recommended pattern for using
bugzscout in production environments.

.. code-block:: python

    # Import celery extension.
    import bugzscout.ext.celery_app

    # Submit errors asynchronously.
    bugzscout.ext.celery_app.submit_error.delay(
      'The description here...',
      extra='The extra information here...')

The `Celery worker
<http://docs.celeryproject.org/en/latest/userguide/workers.html>`_ can use the
same celery app for consuming messages.

.. code-block:: bash

    celery worker --app=bugzscout.ext.celery_app

A ``celeryconfig.py`` file on the PYTHONPATH can be used to configure the
celery instance. For example:

.. code-block:: bash

    export CELERY_CONFIG_MODULE=celeryconfig
    celery worker --app=bugzscout.ext.celery_app

License
-------
BSD

Authors
-------
Thomas Van Doren