Saravanan666/pypi-org huggingface dataset:
Package: django-auth-tacacs
django-auth-tacacsA django authentication backend that uses Tacacs+ for authentication. This can also be used with Nautobot or Netbox.DescriptionThis backend authenticates users via Tacacs+. Only authentication is implemented, authorization is expected to be managed within the application itself, depending on the user groups.Users that don't exist yet may be added automatically by enabling the optionTACACSPLUS_AUTOCREATE_USERS. Newly created users will be added with the standard django parametersis_admin=Falseandis_staff=False.If you have customized User tables then this package may not work as expected.InstallationInstall the package with pip:pip3installdjango-auth-tacacsThis package requirestacacs-plusto be installed.Depending on the usage, it also requires one of the following packages:djangonautobotnetboxUsageTo use this package, you'll need to add theTACACSPlusAuthenticationBackendlibrary to theAUTHENTICATION_BACKENDSconfiguration parameter. The order is important, if you have multiple authentication backends then you must configure them in the correct order.You also need to add theTACACS_PLUSconfiguration parameters:TACACSPLUS_HOST='localhost'TACACSPLUS_PORT=49TACACSPLUS_SECRET='super-secret'TACACSPLUS_SESSION_TIMEOUT=5TACACSPLUS_AUTH_PROTOCOL='ascii'TACACSPLUS_AUTOCREATE_USERS=TrueDjango exampleThis example will use the Tacacs+ authentication backend and fallback to the internal django DB user authentication:
Add the following tosettings.pyAUTHENTICATION_BACKENDS=['django_auth_tacacs.django.TACACSPlusAuthenticationBackend','django.contrib.auth.backends.ModelBackend',]TACACSPLUS_HOST='localhost'TACACSPLUS_PORT=49TACACSPLUS_SECRET='super-secret'TACACSPLUS_SESSION_TIMEOUT=5TACACSPLUS_AUTH_PROTOCOL='ascii'TACACSPLUS_AUTOCREATE_USERS=TrueNautobot exampleThis example will use the Tacacs+ authentication backend and fallback to the internal nautobot DB user authentication.Add the following tonautobot_config.pyAUTHENTICATION_BACKENDS=['django_auth_tacacs.nautobot.TACACSPlusAuthenticationBackend','nautobot.core.authentication.ObjectPermissionBackend',]TACACSPLUS_HOST='localhost'TACACSPLUS_PORT=49TACACSPLUS_SECRET='super-secret'TACACSPLUS_SESSION_TIMEOUT=5TACACSPLUS_AUTH_PROTOCOL='ascii'TACACSPLUS_AUTOCREATE_USERS=TrueNetbox exampleThis example will use the Tacacs+ authentication backend and fallback to the internal netbox DB user authentication.Add the following toconfiguration.pyREMOTE_AUTH_BACKEND='django_auth_tacacs.nautobot.TACACSPlusAuthenticationBackend'TACACSPLUS_HOST='localhost'TACACSPLUS_PORT=49TACACSPLUS_SECRET='super-secret'TACACSPLUS_SESSION_TIMEOUT=5TACACSPLUS_AUTH_PROTOCOL='ascii'TACACSPLUS_AUTOCREATE_USERS=True
Package: django-authtkt
UsageAdd the middlware class before theAuthenticationMiddleware:MIDDLEWARE_CLASSES = (
    ...
    'authtkt.middleware.AuthTktMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    ...
)CallbackYou can use a callback to use something to fill the newly created user in the third party app.Settings:AUTHTKT_CALLBACK = 'yourmodule:update_user'Callback:from sqlalchemy import engine_from_config, Table, MetaData
from django.conf import settings


def update_user(user):
    engine = engine_from_config({'sqlalchemy.url': settings.USER_DB})
    metadata = MetaData(engine)
    users = Table('auth_user', metadata, autoload=True)
    record = users.select(users.c.id==user.id).execute().fetchone()
    for k, v in record.items():
        setattr(user, str(k), v)Manual identify/forget userManualy identify user (eg: set a cookie). You need to set a correctrequest.user:request.environ['authtkt.identify'](request, response)Manualy forget user (eg: reset a cookie):request.environ['authtkt.forget'](request, response)
Package: django-auth-tkt
django-auth-tkt, a Django SSO authentication providerIntroductionThis tiny module addsmod_auth_tktlogin support to aDjangosite. Whenever a user logs in to Django, an additional SSO ticket is created that can be used to also access other authenticated URLs outside of Django.As a convenience, the names of all groups to which the logged in user belongs to are added to thetokenlist of the SSO ticket. This can be used forTKTAuthTokenaccess control.It does not add any authentication backend, you can use either the includedModelBackendor any other that works with Django'sAuthenticationMiddleware.The lifetime of tickets can be configured in the Djangosettings.py. When the user logs out of Django, the ticket is also invalidated.UsageAddgit+https://github.com/dnknth/django-auth-tkt.gittorequirements.txt.Insettings.py:Optionally (but recommended), adddjango_auth_tkt.SsoMiddlewareto theMIDDLEWARElist. It logs out the current user from Django when teh SSO ticket expires and relies ondjango.contrib.auth.middleware.AuthenticationMiddleware, so it should be placed below it.Also optionally, define the lifetime of tickets, e.g.SSO_TICKET_LIFETIME = timedelta(days=1). The default value is one hour.The default cookie name of the ticket isauth_tkt, it can be changed with theSSO_TICKET_NAMEsetting.The default hash algorithm isMD5. It can be adjusted withSSO_HASH_ALGORITHM,
allowed values are'md5','sha256'and'sha512'.Decorate the authentication views in theurlpatternsof the mainurls.py, for example:from django.contrib import admin
from django.contrib.auth import views as auth_views
from django.urls import include, path
import django_auth_tkt as sso

urlpatterns = [
    path('accounts/login/', sso.auth(auth_views.LoginView.as_view(
        redirect_authenticated_user=True))),
    path('accounts/logout/', sso.unauth(auth_views.LogoutView.as_view())),
    path('accounts/', include('django.contrib.auth.urls')),

    path('admin/login/', sso.auth(admin.site.login)),
    path('admin/logout/', sso.unauth(admin.site.logout)),
    path('admin/', admin.site.urls),
]For Apache configuration examples, seemod_auth_tkt(3).CaveatsThe underlyingauth_tktmodule only supports insecureMD5 hashing.
Package: django-auth-wall
A very basic Basic Auth middleware that uses a username/password defined in
your environment variable or settings.py to protect whole of your site.
Does not use Django auth.Handy for quickly securing an entire site during development, for example.Note:  Environment variables is preferred oversettings.py.Usage# In settings.py:

MIDDLEWARE = [
    'django_auth_wall.middleware.BasicAuthMiddleware',

    # all other middleware here
]

# Optionally, set it here if not setting as environment variable
# Requires both variable to be set, else site won't be protected.
AUTH_WALL_USERNAME = 'user'
AUTH_WALL_PASSWORD = 'pass'Installationpip install django-auth-wallWarningPlease make sure that you use SSL/TLS (HTTPS) to encrypt the connection between
the client and the server, when using basic access authentication. In basic
access authentication username and password are sent in cleartext, and if
SSL/TLS is not used, the credentials could be easily intercepted.CompatibilityDjango 1.5+LicenceMITAuthorsdjango-auth-wallwas written bySaurabh Kumar.
Package: django-authy-tfa
=====Django Two Factor Authentication=====Django TFA is a simple Django app to add two factor authentication to your Django projects super quickly! It's as simple as adding a decorator your views!Detailed documentation is in the "docs" directory.Quick start-----------1. Add "django_twilio_tfa" to your INSTALLED_APPS setting like this::INSTALLED_APPS = [...'django_twilio_tfa',]2. Include the polls URLconf in your project urls.py like this::url(r'^tfa/', include('django_twilio_tfa.urls')),3. Add "AUTHY_API_KEY" to settings.py4. Add "USER_PROFILE_MODEL" to your settings.py. The "USER_PROFILE_MODEL" should have a one-to-one field with the User model.5. The following fields should be available on the USER_PROFILE_MODEL defined above. To edit the field names add the following to settings.py:a. USER_UID_FIELD: Defaults to "uid" - This field should be writable.b. USER_EMAIL_FIELD: Defaults to "email"c. USER_PHONE_FIELD: Defaults to "phone"d. USER_CC_FIELD: Defaults to "country_code"
Package: django-autoadmin
DescriptionAutomatic admin users for Django projects.LicenseThis project is open sourced under theMIT License.Installation$pipinstalldjango-autoadminAdd'autoadmin',to your project’sINSTALLED_APPSlist.Load theautoadmin_tagsin your login template.Call theautoadmin_partialto display the information of the autogenerated admin user.Use the management commandcreateautoadminto create an admin user with an automatic password.by default, django-autoadmin creates a django superuser with theusername="admin",email="autoadmin@example.com"andpasswordrandomly generated.you could modify this by creating the following variables in your settings fileAUTOADMIN_USERNAME="your_custom_username"AUTOADMIN_EMAIL="your_custom_email"AUTOADMIN_PASSWORD="your_custom_password"NOTE: ifAUTOADMIN_PASSWORDisNone, the password will be randomly generated.ContributeCheck for open issues or open a fresh issue to start a discussion around a feature idea or a bug.Forkthe repositoryon GitHub to start making your changes to themasterbranch (or branch off of it).Write a test which shows that the bug was fixed or that the feature works as expected.Make sure to add yourself to theAUTHORS file.Send a pull request1.1.1 (2016-05-05)Include missing migrations into package.1.1.0 (2015-10-16)Corrected a situation where project migrating database from old version not using django-autoadmin would have problem logging in.Added a test projectCode coverage is now 100%Added tox test supportSetting overrides now work all the timedjango-autoadmin is now tested against Python 2.7, 3.2, 3.3, 3.4, Django 1.7 and 1.8Removed all PEP8 warningsAll autoadmin code was moved from the management command to the AutoAdminSingleton manager1.0.1 (2015-06-14)No changes, just a version bump as required by PyPI1.0.0 (2015-06-14)Update included partial templateDjango admin interface enabledDrop support for Django < 1.6Adds support Django >= 1.7Autoadmin user is no longer created after database migrationAdd new createautoadmin management commandUses Django’s own createsuperuser management commandAdds Django native database migrationsUses AppConfig to about running code during importAdds supports for custom User modelsENABLE setting removedDefault email changed toautoadmin@example.com0.5.0 (2014-08-25)Initial release
Package: django-autocert
Django Autocert is a Django app to automatically obtain and renew X.509
(i.e. TLS or SSL) certificates from Let’s Encrypt or other certificate
authorities that support theACME
protocol.RequirementsDjango >=1.8django.contrib.sitesin your INSTALLED_APPSInstallationpip installdjango-autocertAddautocerttoINSTALLED_APPSAddautocert.middleware.AcmeChallengeMiddlewaretoMIDDLEWARE_CLASSES, ahead ofdjango.middleware.security.SecurityMiddlewareif it’s present../manage.py migrateFurther Installation Notesdjango-autocert requirescryptographywhich hasplatform-specific installation
requirementsfor
Linux and macOS:Debian and Ubuntusudoapt-getinstallbuild-essentiallibssl-devlibffi-devpython-devRHEL/Fedorasudo yum install gcclibffi-develpython-developenssl-develmacOSbrew install openssl envLDFLAGS="-L$(brew--prefixopenssl)/lib"CFLAGS="-I$(brew--prefixopenssl)/include"pip install cryptographyLicensedjango-autocert is MIT licensedAuthorsPatrick Farrell @farrepa on Github andTwitter
Package: django-autocompletefilter
A django application that lets you use the built in autocomplete function of the
django admin to filter in admin list views by foreign key relations.UsageInstall the package, for example from PyPi:pip install django-autocompletefilterAddautocompletefilterto yourINSTALLED_APPSsetting.Create and register a model admin for the model you want to filter by.
Ensure it hassearch_fieldsspecified for autocomplete to work.In your second model admin, use theAutocompleteFilterMixinon your class and
add the desired foreign key attribute to filter by to thelist_filteritems by using the AutocompleteListFilter class:from autocompletefilter.admin import AutocompleteFilterMixin
from autocompletefilter.filters import AutocompleteListFilter

class FooAdmin(AutocompleteFilterMixin, admin.ModelAdmin):
    list_filter = (
        ('bar', AutocompleteListFilter),
    )Status of this projectThis project is currently using a rather hacky way to implement this.
Caution is advised when using it.Using multiple autocomplete filters on the same page does work.Currently only tested on Python 3.6ContributingAll suggestions are welcome. Especially about ways to make this cleaner.Common issuesReverse for ‘<app_name>_<model_name>_autocomplete’ not found.You must register a model admin withsearch_fieldsfor the model you want to look up.The results could not be loaded.You likely forgot to specifysearch_fieldson your model admin for the model you want to look up.
Package: django_autocomplete_foreignkey
# AutoComplete for ForeignKey and ManyToManyFielduses same syntax as the search for django-adminrequirements* query.js (http://jquery.com/)* query.autocomplete.js## Exampleuse a fairly simple*models.py*class Type (models.Model):title = models.CharField()class Celebrity(models.Model):name = models.CharField()class Film(models.Model):type    = models.ForeignKey( Type )director= models.ManyToManyField( Celebrity, related_name="director")actor   = models.ManyToManyField( Celebrity, related_name="actor")in m2m field need to specify related_name*admin.py*from apps.autocomplete.widgets import *class FilmAdmin(AutocompleteModelAdmin):related_search_fields = {'type': ('title',),'actor': ('^name',),'director': ('^name',),}admin.site.register( Film, FilmAdmin )"related_search_fields" parameter is used to specify on what fields you want to search 'actor' and 'director' ties are the names given in "related_name" query syntax is similar to [searching in admin panel](http://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.search_fields)I use the " 'actor': ('^name',) " operator ^ means the beginning of the field. and eventually will be formed about the substitution request form For example, if related_search_fieldsis set to ('^name',') and a user searches for john lennon, Django will do the equivalent of this SQL WHERE clause:WHERE name ILIKE 'john%' AND name ILIKE 'lennon%'
Package: django-autocomplete-light
FeaturesDjango 4.2 support starting DAL 3.10, support for earlier Django versions
in DAL < 3.10Django (multiple) choice support,Django (multiple) model choice support,Django generic foreign key support (through django-querysetsequence),Django generic many to many relation support (through django-generic-m2m and
django-gm2m)Multiple widget support: select2.js, easy to add more.Creating choices that don’t exist in the autocomplete,Offering choices that depend on other fields in the form, in an elegant and
innovative way,Dynamic widget creation (ie. inlines), supports YOUR custom scripts too,Provides a test API for your awesome autocompletes, to support YOUR custom
use cases too,A documented automatically tested example for each use case in test_project.Resources**Documentation** graciously hostedbyRTFDMailing list graciously hostedbyGoogleForSecurityissues, please contactyourlabs-security@googlegroups.comGit graciously hostedbyGitHub,Package graciously hostedbyPyPi,
Package: django-autocomplete-light-bsc
django-autocomplete-light’s purpose is to enable autocompletes quickly and
properly in a django project: it is the fruit ofyears of R&D. It was
designed for Django so that every part overridable or reusable independently.
It is stable, tested, documented and fully supported: it tries to be a good
neighbour in Django ecosystem.WARNINGyou are currently on the v2 branch where new development happens.master (v1) is still supported for BC.FeaturesFeatures include:charfield, foreign key, many to many autocomplete widgets,generic foreign key, generic many to many autocomplete widgets,remote API backed-autocompletes,django template engine support for autocompletes, enabling you to include
images etc …100% overridable HTML, CSS, Python and Javascript: there is no variable
hidden far down in the scope anywhere.add-another popup supported outside the admin too.keyboard is supported with enter, tab and
arrows by default.Each feature has a live example and is fully documented. It is also designed
and documented so that you create your own awesome features too.v2v2 branchis
under active development. You might want to use that instead, since it’s much
easier to work with and supports python3.In this case, please refer to thev2 documentation.To upgrade to v2, please enjoy thev1 to v2 upgrade instructions(documented with love !).the Autocomplete class design hasn’t changed at all.yourlabsWidget()doesn’t parsesdata-*options the same,the django/form python code has been re-organised ie.get_widgets_dict()is gone andautocomplete_light.ModelFormwraps around all features.ResourcesResources include:**Documentation** graciously hostedbyRTFDLive demo graciously hostedbyPythonAnywhere,Video demo graciously hostedbyYoutube,Mailing list graciously hostedbyGoogleGit graciously hostedbyGitHub,Package graciously hostedbyPyPi,Continuous integration graciously hostedbyTravis-ci
Package: django-autocompleter
Django Autocompletesubstring occurrence search module.Allows the use of celery, if it is in the mood. The following settings are required in settings.pyAUTOCOMPLETER = {
   'SERILEZER_CLASSES': 'your_module_name.autocompleter',
   'LIMIT': 5,
   'CELERY': True
   }Where:SERILEZER_CLASSES- indicates django_autompleter where to look for serialization ticket offices. The serialization class inherits from the base classSearcherSerializer. In the example below, we indicate which fields from thePublicationmodel we want to return when requested.from autocompleter import SearcherSerializer

class PublicationsSerializer(SearcherSerializer):
      class Meta:
          model = Publication
          fields = (
              'id',
              'title',
              )LIMIT- indicates the number of records received that must be returned.CELERY- indicates the start of the autompleter as a celery task. It is important, in this case, your project must have celery.py settings.example:from autocompleter import Autocompleter

autocomplete_coonection =  Autocompleter()

result = autocomplete_coonection.get(
               model=Publication,# search data model
               column=["title"],# list of columns of the model to search for
               value=value # value
           )
Package: djangoautoconf
Create a package for ease setting django project settings.Free software: BSD licenseDocumentation:http://djangoautoconf.rtfd.org.Installationpython setup.py installCreate ProjectCreate manage.py
Added the following:

#!/usr/bin/env python
import logging
import os
import sys

from ufs_tools import get_sibling_folder
from ufs_tools.folder_tool import get_file_folder
from ufs_tools.libtool import include_all_direct_sub_folders_in_sibling


# include_all_direct_sub_folders_in_sibling(__file__, "server_base_packages")


if __name__ == "__main__":
    # logging.basicConfig(level=logging.DEBUG)
    logging.getLogger('chronograph.models').setLevel(level=logging.DEBUG)
    from djangoautoconf import DjangoAutoConf

    # Additional settings can be made
    # os.environ["EXTRA_SETTING_FOLDER"] = get_sibling_folder(__file__, "local/local_postgresql_settings")
    # os.environ["MANAGE_PY"] = "manage_with.py"
    DjangoAutoConf.set_settings_env()

    from django.core.management import execute_from_command_line
    execute_from_command_line(sys.argv)Featuresr = AdminRegister()
r.register(UserDefinedModel)Default behaviorWhen “/”  is not defined, redirect to all_login app if it is added to INSTALLED_APPSTODO### 向我捐助
如果你觉得本项目对你有用，欢迎请作者一杯茶。Work around for module installation.‘django-ajax-selects<=1.9.1’
‘python-social-auth<=0.2.21’History0.11.4 (2019-08-02)
* Remove unnecessary requirements0.1.0 (2013-08-11)First release on PyPI.
Package: django-autodisco
django-autodiscoMicro django lib that helps auto-loading app modules.Why this lib?I am used to grouping signal connectors and receivers in a module calledreceivers.py. I didn't want add the module import in thereadymethod of all the apps anymore.Installationpip install django-autodiscoOr, for the latest git versionpython-mpipinstall'django-autodisco @ git+https://github.com/etchegom/django-autodisco.git'UsageAdd theautodiscodjango app:INSTALLED_APPS=[..."autodisco",]Define the modules to auto-load in settings:AUTODISCO_MODULES=["receivers",...]Run examplemakeexampleRun testsmaketests
Package: django-autodrp
django-autodrpAutomatically set-up filters and permissions for Django's DRY Rest PermissionsQuick StartRunpip install django-autodrpAdd 'autodrp' to your INSTALLED_APPS in your settings below all the apps you wish to use AutoDRP for (failing to add django-autodrp after the apps that will use it will result in the autoconfiguration of AutoDRP not running).INSTALLED_APPS=[# Django apps / packages'all-django-apps',# Your apps'yourapp']INSTALLED_APPS=[# Django apps / packages'all-django-apps',# Your apps'yourapp','autodrp',# <- Here]Add the following (or replace your already existing has_blank_permission functions) to any models you with to use AutoDRP for (either is optional):DRY_GLOBAL_PERMISSIONS={('read','write'):True}DRY_OBJECT_PERMISSIONS={('read','write'):True}Indicatingreadwith a value of true is the same as:@staticmethoddefhas_read_permission(request):returnTrueImportAutoDRPFilterviafrom autodrp.filters import AutoDRPFilter, and add it to yourfilter_backendson your viewset like so:fromautodrp.filtersimportAutoDRPFilterclassProjectViewSet(viewsets.ModelViewset):queryset=Project.objects.all()permission_classes=(DRYPermissions,)filter_backends=[AutoDRPFilter]You now are using AutoDRP permissions and filters.Consult the wiki for a definitive tutorial and explanation of AutoDRP.Motivation for this projectI've found DRY Rest Permissions to be a great asset but rather verbose. I hope to make working with DRY Rest Permissions easier by consolidating filter and permission functionality into a simple and terse feature.
Package: django-auto-gitlab
django-auto-gitlabThe django-auto-gitlab package is the integration of django and Gitlab that facilitates work with GitLab by automatic labels management. When a merge request is created, it addsin reviewlabel to appropriate tasks. When a merge request is merged, it addsmergedlabel. Also, the package can add some labels to the created issue based on some defined identifiers. More features might appear in the future.DependenciesPython >= 3.7Django >= 3Django REST Framework >= 3.11python-gitlabpyyamlretryingcerberusInstallationInstall django-auto-gitlab usingpip:pipinstalldjango-auto-gitlabAddauto_gitlabapp to theINSTALLED_APPSin Djangosettings.py:INSTALLED_APPS=["...","auto_gitlab","...",]That's it! Now you can include appropriate urls in theurls.pyfile and configure your GitLab connection. Thedocumentationwill help you do it.