semvec/pypi-packages huggingface dataset:
envauth 1.0.1
Authentication based on the ENVAUTH environment variable
License: MIT

Super simple authentication middleware for when you quickly need to password
protect something and don't have the time to implement rigorous authentication.
Supports ``Flask``, ``bottle``, ``Django`` and generic ``WSGI`` servers out of the box.

$ENVAUTH
========

``envauth`` looks for a ``JSON`` object in the ``ENVAUTH`` environment variable.
The keys are the usernames and the value contains the password for the user.

.. code:: javascript

    {"username": "password", "anotheruser": "pass1234"}

Heroku Example
--------------

``envauth`` is especially useful if you happen to be running your application on a PAAS!

::

    $ heroku config:set ENVAUTH='{"username": "password", "anotheruser": "pass1234"}'
    Setting config vars and restarting application... done, v2

Examples
========

.. image:: http://www.authenticationtutorial.com/tutorial/basiclogin.gif
    :alt: pypi
    :align: left
    :target: https://pypi.python.org/pypi/envauth

----

Flask
-----

.. code:: python

    import envauth

    @app.route('/secret-page')
    @envauth.flask.requires_auth(realm='You shall not pass!')
    def secret_page():
        return render_template('secret_page.html')

Bottle
------

.. code:: python

    import envauth

    @app.route('/secret-page')
    @envauth.bottle.requires_auth(realm='You shall not pass!')
    def secret_page():
        return template('secret_page.html')

Django
------

.. code:: python

    MIDDLEWARE_CLASSES += ('envauth.django',)

WSGI
----

.. code:: python

    import envauth

    application = envauth.wsgi(application, realm='You shall not pass!')

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

Install *envauth* with pip:

::

    $ pip install envauth
django-ptree-extra-views 0.6.3
Extra class-based views for Django
License: MIT

django-extra-views - Refactored to Vanilla style
================================================

Django's class-based generic views are great, they let you accomplish a large number of web application design patterns in relatively few lines of code.  They do have their limits though, and that's what this library of views aims to overcome.

.. image:: https://api.travis-ci.org/AndrewIngram/django-extra-views.png?branch=master
        :target: https://travis-ci.org/AndrewIngram/django-extra-views

.. image:: https://pypip.in/d/django-extra-views/badge.png
        :target: https://crate.io/packages/django-extra-views/

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

Installing from github. ::

    pip install -e git://github.com/tomchristie/django-extra-views.git#egg=django-extra-views

.. _`Documentation`: https://django-extra-views.readthedocs.org/en/latest/

Features so far
------------------

- FormSet and ModelFormSet views - The formset equivalents of FormView and ModelFormView.
- InlineFormSetView - Lets you edit formsets related to a model (uses inlineformset_factory)
- GenericInlineFormSetView, the equivalent of InlineFormSetView but for GenericForeignKeys
- CreateWithInlinesView and UpdateWithInlinesView - Lets you edit a model and its relations
- Support for generic inlines in CreateWithInlinesView and UpdateWithInlinesView

Notes
-----

- NamedFormsetMixin removed - context behavior baked directly into views, with ``inline_context_names`` and ``formset_context_name``.
- Removed ``MultiFormView``, ``SearchableMixin``, ``SortableListMixin``, ``CalendarMonthView``.
- The ``InlineFormSet`` and ``GenericFormSet`` classes are now just regular classes, not views.

Still to do
-----------

Adding support for pagination in ModelFormSetView and its derivatives should now be simpler.

Examples
--------

Defining a FormSetView. ::

    from extra_views import FormSetView


    class AddressFormSet(FormSetView):
        form_class = AddressForm
        template_name = 'address_formset.html'

Defining a ModelFormSetView. ::

    from extra_views import ModelFormSetView


    class ItemFormSetView(ModelFormSetView):
        model = Item
        template_name = 'item_formset.html'

Defining a CreateWithInlinesView and an UpdateWithInlinesView. ::

    from extra_views import CreateWithInlinesView, UpdateWithInlinesView, InlineFormSet
    from extra_views.generic import GenericInlineFormSet


    class ItemInline(InlineFormSet):
        model = Item


    class TagInline(GenericInlineFormSet):
        model = Tag


    class CreateOrderView(CreateWithInlinesView):
        model = Order
        inlines = [ItemInline, TagInline]


    class UpdateOrderView(UpdateWithInlinesView):
        model = Order
        inlines = [ItemInline, TagInline]


    # Example URLs.
    urlpatterns = patterns('',
        url(r'^orders/new/$', CreateOrderView.as_view()),
        url(r'^orders/(?P<pk>\d+)/$', UpdateOrderView.as_view()),
    )