Saravanan666/pypi-org huggingface dataset:
Package: django-passwordless-login
django-passwordless-loginLogin to your Django app with a link sent by email.Adding it to your django projectInstall django-passwordless-login:$ pip install django-passwordless-loginAdd"passwordless_login.apps.PasswordlessLoginConfig"toINSTALLED_APPS:INSTALLED_APPS += ["passwordless_login.apps.PasswordlessLoginConfig"]Write a login template and specify the path in settings, ie:LOGIN_TEMPLATE_PATH = "app_name/login.html"Include"passwordless_login/login.html"in the template where users will login:{% include "passwordless_login/login.html" %}Include functionality of the login view directlyfrom passwordless_login.views import login, or include the urls from this app into your app'surlpatterns:include("passwordless_login.urls")Customisable Settings include:LOGIN_MAX_AGE- Adatetime.timedeltaof the duration the login link will last (default 30 minutes)LOGIN_ONE_TIME- If the login link can be used one time only (defaultTrue)LOGIN_CREATE_NEW_USERS- Boolean for whether or not this login form should create new users or just log in existing ones.LOGIN_EMAIL_CONTENT- The content of the email, should include dynamic/format references tolink(required),minutes(equivalent toLOGIN_MAX_AGE),app_name, andcontact_email.APP_NAME- used in the default email contentLOGIN_CONTACT_EMAIL- used in the default email contentLOGIN_FROM_EMAIL- used as the from email if desired to be different from the standard DjangoDEFAULT_FROM_EMAILFor development servers, change theEMAIL_BACKENDsetting to allow emails to be printed to the console:EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
Package: django-passwordless-user
Installation$[sudo]pipinstalldjango-passwordless-userPros3rd party/social authentication without passwordExamplessettings.pyAUTH_USER_MODEL='users.User'users/modes.pyfromdjango.dbimportmodelsfromdjango_passwordless_user.modelsimportAbstractBaseUserclassToken(models.Model):token=models.TextField()classUser(AbstractBaseUser):login=models.TextField(unique=True)USERNAME_FIELD='login'classMeta:db_table='users_user'defget_salted_hmac_value(self):token=Token.objects.get(pk=self.pk)returntokenreadme42.com
Package: django-password-reset
Class-based views for password reset, the usual “forget password?” workflow:User fills his email address or usernameDjango sends him an email with a token to reset his passwordUser chooses a new passwordThe token is not stored server-side, it is generated using Django’s signing
functionality.Author: Bruno Renié andcontributorsLicence: BSDCompatibility: Django 1.11+Installationpip install-Udjango-password-resetAddpassword_resetto yourINSTALLED_APPSIncludepassword_reset.urlsin your rooturls.pyFor extensive documentation see thedocsfolder orread it on
readthedocsTo install thein-development versionof django-password-reset, runpip installdjango-password-reset==dev.BugsReally? Oh well… Please Report. Or better, fix :)
Package: django-password-reset-fc
Class-based views for password reset, the usual “forget password?” workflow:User fills his email address or usernameDjango sends him an email with a token to reset his passwordUser chooses a new passwordThe token is not stored server-side, it is generated using Django’s signing
functionality.Author: Bruno Renié andcontributorsLicence: BSDCompatibility: Django 1.4+ (cryptographic signing needed)Installationpip install-Udjango-password-resetAddpassword_resetto yourINSTALLED_APPSIncludepassword_reset.urlsin your rooturls.pyFor extensive documentation see thedocsfolder orread it on
readthedocsTo install thein-development versionof django-password-reset, runpip installdjango-password-reset==dev.Changelog0.6.xfail_noexistent_user option to make resetting password more securefail_inactive_user option to restrict inactive users from resetting password0.5.xAdded django-templated-email for sending email
Package: django-password-reset-ispm
Class-based views for password reset, the usual “forget password?” workflow:User fills his email address or usernameDjango sends him an email with a token to reset his passwordUser chooses a new passwordThe token is not stored server-side, it is generated using Django’s signing
functionality.Author: Bruno Renié andcontributorsLicence: BSDCompatibility: Django 1.4+ (cryptographic signing needed)Installationpip install-Udjango-password-resetAddpassword_resetto yourINSTALLED_APPSIncludepassword_reset.urlsin your rooturls.pyFor extensive documentation see thedocsfolder orread it on
readthedocsTo install thein-development versionof django-password-reset, runpip installdjango-password-reset==dev.BugsReally? Oh well… Please Report. Or better, fix :)
Package: django-passwords
Django Passwordsdjango-passwords is a reusable app that provides a form field and
validators that check the strength of a password.InstallationYou can install django-passwords with pip by typing:pip install django-passwordsOr with easy_install by typing:easy_install django-passwordsOr manually by downloading a tarball and typing:python setup.py installCompatibilitydjango-passwords is compatible with Django 1.3 through 1.9 RC1. Pythons 2.7
and 3.4 are both supported.Settingsdjango-passwords adds 6 optional settingsOptional:Specifies minimum length for passwords:PASSWORD_MIN_LENGTH = 6 # Defaults to 6Specifies maximum length for passwords:PASSWORD_MAX_LENGTH = 120 # Defaults to NoneSpecifies the location of a dictionary (file with one word per line):PASSWORD_DICTIONARY = "/usr/share/dict/words" # Defaults to NoneSpecifies how close a fuzzy match has to be to be considered a match:PASSWORD_MATCH_THRESHOLD = 0.9 # Defaults to 0.9, should be 0.0 - 1.0 where 1.0 means exactly the same.Specifies a list of common sequences to attempt to match a password against:PASSWORD_COMMON_SEQUENCES = [] # Should be a list of strings, see passwords/validators.py for defaultSpecifies number of characters within various sets that a password must contain:PASSWORD_COMPLEXITY = { # You can omit any or all of these for no limit for that particular set
    "UPPER": 1,        # Uppercase
    "LOWER": 1,        # Lowercase
    "LETTERS": 1,       # Either uppercase or lowercase letters
    "DIGITS": 1,       # Digits
    "SPECIAL": 1,      # Not alphanumeric, space or punctuation character
    "WORDS": 1         # Words (alphanumeric sequences separated by a whitespace or punctuation character)
}UsageTo use the formfield simply import it and use it:fromdjangoimportformsfrompasswords.fieldsimportPasswordFieldclassExampleForm(forms.Form):password=PasswordField(label="Password")You can make use of the validators on your own fields:fromdjangoimportformsfrompasswords.validatorsimportdictionary_wordsfield=forms.CharField(validators=[dictionary_words])You can also create custom validator instances to specify your own
field-specific configurations, rather than using the global
configurations:fromdjangoimportformsfrompasswords.validatorsimport(DictionaryValidator,LengthValidator,ComplexityValidator)field=forms.CharField(validators=[DictionaryValidator(words=['banned_word'],threshold=0.9),LengthValidator(min_length=8),ComplexityValidator(complexities=dict(UPPER=1,LOWER=1,DIGITS=1)),])
Package: django-password-session
A reusable Django app that will invalidate all active sessions after change password.Since Django 1.7 this feature implementedout of the box.InstallationInstall a package.$pipinstalldjango-password-sessionAdd “password_session” to your INSTALLED_APPS setting:INSTALLED_APPS=(...'password_session',)Add middleware:MIDDLEWARE_CLASSES=(...'password_session.middleware.CheckPasswordHash',),Make sure that you have the following settings:INSTALLED_APPS=(...'django.contrib.auth','django.contrib.contenttypes','django.contrib.sessions',)AUTHENTICATION_BACKENDS=(...'django.contrib.auth.backends.ModelBackend',)MIDDLEWARE_CLASSES=(...'django.contrib.sessions.middleware.SessionMiddleware','django.contrib.auth.middleware.AuthenticationMiddleware',)To avoid logging out a user from a current session you should update the session by calling the following function directly after change a password:frompassword_sessionimportupdate_session_auth_hashupdate_session_auth_hash(request,user)Example viewIt’s a very simple view for change password just for demonstrating how to update a current session.fromdjango.contrib.auth.decoratorsimportlogin_requiredfromdjango.httpimportHttpResponsefrompassword_sessionimportupdate_session_auth_hashdefchange_password_view(request):user=request.useruser.set_password(request.POST.get('password'))user.save()update_session_auth_hash(request,user)returnHttpResponse("Hello,%s! Your password has been changed!"%user.username)RequirementsPython 2.6+ or 3+Django>=1.3,<1.7
Package: django-password-strength
# Django Password StrengthAn extension of the Django password widget including a password strength meter and crack time powered by [zxcvbn](https://github.com/lowe/zxcvbn).![Empty Password](http://thegoods.aj7may.com/content/images/2013/Dec/Screen_Shot_2013_12_18_at_9_05_38_AM.png)![Weak Password](http://thegoods.aj7may.com/content/images/2013/Dec/Screen_Shot_2013_12_18_at_9_06_05_AM.png)![Strong Password](http://thegoods.aj7may.com/content/images/2013/Dec/Screen_Shot_2013_12_18_at_9_06_32_AM.png)### Install:`> pip install django-password-strength`### Usage:* Add `django_password_strength` to the installed apps of your Django Project* Instead of using the django `PasswordInput` widget use the `PasswordStrengthInput`* Be sure to include the form's required media in the template. _ie._ `{{ form.media }}`* If you bundle your js you can use `django_password_strength/js/zxcvbn.js` or `django_password_strength/js/zxcvbn-async.js` and `django_password_strength/js/password_strength.js` instead* For easiest integration also include [Twitter Bootstrap](http://getbootstrap.com/)### Translations:There are currently no translations already available, but all the text is translatable, you just have to translate it yourself.For the javascript translations be sure to add the javascript translation catalog [provided by django](https://docs.djangoproject.com/en/1.7/topics/i18n/translation/#using-the-javascript-translation-catalog) or use something like [django-statici18n](https://github.com/zyegfryed/django-statici18n) for a static version of the catalog. If you don't want translations you don't have to add the catalog to your page.### Example:_forms.py_from django import formsfrom django_password_strength.widgets import PasswordStrengthInput, PasswordConfirmationInputclass SignupForm(forms.Form):username = forms.CharField()passphrase = forms.CharField(widget=PasswordStrengthInput())confirm_passphrase = forms.CharField(widget=PasswordConfirmationInput())### Example using multiple password fields:_forms.py_from django import formsfrom django_password_strength.widgets import PasswordStrengthInput, PasswordConfirmationInputclass SignupForm(forms.Form):username = forms.CharField()passphrase = forms.CharField(widget=PasswordStrengthInput())confirm_passphrase = forms.CharField(widget=PasswordConfirmationInput(confirm_with='passphrase'))passphrase2 = forms.CharField(widget=PasswordStrengthInput())confirm_passphrase2 = forms.CharField(widget=PasswordConfirmationInput(confirm_with='passphrase2'))
Package: django-password-strength-sk
# Django Password StrengthAn extension of the Django password widget including a password strength meter and crack time powered by [zxcvbn](https://github.com/lowe/zxcvbn).![Empty Password](http://thegoods.aj7may.com/content/images/2013/Dec/Screen_Shot_2013_12_18_at_9_05_38_AM.png)![Weak Password](http://thegoods.aj7may.com/content/images/2013/Dec/Screen_Shot_2013_12_18_at_9_06_05_AM.png)![Strong Password](http://thegoods.aj7may.com/content/images/2013/Dec/Screen_Shot_2013_12_18_at_9_06_32_AM.png)### Install:`> pip install django-password-strength`### Usage:* Add `django_password_strength` to the installed apps of your Django Project* Instead of using the django `PasswordInput` widget use the `PasswordStrengthInput`* Be sure to include the form's required media in the template. _ie._ `{{ form.media }}`* If you bundle your js you can use `django_password_strength/js/zxcvbn.js` or `django_password_strength/js/zxcvbn-async.js` and `django_password_strength/js/password_strength.js` instead* For easiest integration also include [Twitter Bootstrap](http://getbootstrap.com/)### Translations:There are currently no translations already available, but all the text is translatable, you just have to translate it yourself.For the javascript translations be sure to add the javascript translation catalog [provided by django](https://docs.djangoproject.com/en/1.7/topics/i18n/translation/#using-the-javascript-translation-catalog) or use something like [django-statici18n](https://github.com/zyegfryed/django-statici18n) for a static version of the catalog. If you don't want translations you don't have to add the catalog to your page.### Example:_forms.py_from django import formsfrom django_password_strength.widgets import PasswordStrengthInput, PasswordConfirmationInputclass SignupForm(forms.Form):username = forms.CharField()passphrase = forms.CharField(widget=PasswordStrengthInput())confirm_passphrase = forms.CharField(widget=PasswordConfirmationInput())### Example using multiple password fields:_forms.py_from django import formsfrom django_password_strength.widgets import PasswordStrengthInput, PasswordConfirmationInputclass SignupForm(forms.Form):username = forms.CharField()passphrase = forms.CharField(widget=PasswordStrengthInput())confirm_passphrase = forms.CharField(widget=PasswordConfirmationInput(confirm_with='passphrase'))passphrase2 = forms.CharField(widget=PasswordStrengthInput())confirm_passphrase2 = forms.CharField(widget=PasswordConfirmationInput(confirm_with='passphrase2'))
Package: django-password-validation
A backport of thepassword validation systemfrom Django 1.9 (by Erik
Romijn), for use on earlier Django versions.Password validation isn’t hard to implement yourself, but if you use this
backport you’ll be writing your validators to the same API that will be
built-in to upcoming Django versions.django-password-validationsupportsDjango1.8.2 and later on Python
2.7, 3.3, 3.4, pypy, and pypy3.Getting HelpDocumentation for django-password-validation is available athttps://django-password-validation.readthedocs.org/This app is available onPyPIand can be installed withpip installdjango-password-validation.ContributingSee thecontributing docs.CHANGES0.1.1 (2015.06.10Add common-passwords.txt.gz to package-data.0.1 (2015.06.10)Initial release, backported from Django commit 9851e54121b3.
Package: django-password-validators
Additional libraries for validating passwords in Django 3.2 or later.The application works well under python 4.x and 3.x versions.Django version after the number 1.9, allows you to configure password validation.
Configuration validation is placed under the variableAUTH_PASSWORD_VALIDATORS.InstallationJust installdjango-password-validatorsviapip:$ pip install django-password-validatorsValidatorsUniquePasswordsValidatorValidator checks if the password was once used by a particular user.
If the password is used, then an exception is thrown, of course.For each user, all the passwords are stored in a database.
All passwords are strongly encrypted.Configuration…In the file settings.py we addINSTALLED_APPS = [
     ...
     'django_password_validators',
     'django_password_validators.password_history',
     ...
 ]

AUTH_PASSWORD_VALIDATORS = [
    ...
    {
        'NAME': 'django_password_validators.password_history.password_validation.UniquePasswordsValidator',
        'OPTIONS': {
             # How many recently entered passwords matter.
             # Passwords out of range are deleted.
             # Default: 0 - All passwords entered by the user. All password hashes are stored.
            'last_passwords': 5 # Only the last 5 passwords entered by the user
        }
    },
    ...
]

# If you want, you can change the default hasher for the password history.
# DPV_DEFAULT_HISTORY_HASHER = 'django_password_validators.password_history.hashers.HistoryHasher'And runpython manage.py migratePasswordCharacterValidatorThe validator checks for the minimum number of characters of a given type.In the file settings.py we addINSTALLED_APPS = [
     ...
     'django_password_validators',
     ...
 ]

AUTH_PASSWORD_VALIDATORS = [
    ...
    {
        'NAME': 'django_password_validators.password_character_requirements.password_validation.PasswordCharacterValidator',
        'OPTIONS': {
             'min_length_digit': 1,
             'min_length_alpha': 2,
             'min_length_special': 3,
             'min_length_lower': 4,
             'min_length_upper': 5,
             'special_characters': "~!@#$%^&*()_+{}\":;'[]"
         }
    },
    ...
]
Package: django-paste
Pluggable, configurable, pastebin HTTP REST APIdjango-pasteis a simpleDjangopluggable app of a code pasting and highlighting HTTP REST API, written usingDjango REST framework. It supports
theCRUDoperations on source code snippets and uses any existing user authentication
system. Syntax highlighting is powered byPygments.InstallationThe following Python versions are supported:CPython: 3.6, 3.7, 3.8, 3.9PyPy: 3.6Django:2.0, 2.1, 2.23.0, 3.1Install viapip:$pipinstalldjango-pasteAdd it to yourINSTALLED_APPS:INSTALLED_APPS=[# ...'paste.apps.PasteConfig',]Register the app’s URLs under a path of your choice:urlpatterns=[# ...path('some-path/',include('paste.urls')),]where'some-path/'could be any URL.Optionally, configure the appsettings.Generate and run the database migrations:$pythonmanage.pymakemigrationspaste$pythonmanage.pymigrateUsageYou can find the description of the app’sendpointsand
snippetfieldsin thedocumentation. You
can also manage snippets at the Django admin site.LicenseDistributed under theMIT License.
Package: djangopatchy
# Django Patchy[![PyPI version](https://badge.fury.io/py/djangopatchy.svg)](https://badge.fury.io/py/djangopatchy)**Useful django app and utils to develop large-scale web app**# Requirements* Python (2.7)* Django (1.8, 1.9)# InstallationInstall using `pip`...pip install djangopatchy# Middlewares## LongRequestMiddlewareLet's add a middleware to calculate the time elapse for each request1. Add a middleware at the top:```pythonMIDDLEWARE_CLASSES = ('patchy.middleware.LongRequestMiddleware',...)```2. Add logger handler with `pathcy.middleware`:Example:```python'patchy.middleware': {'handlers': ['sentry'],'level': 'WARNING','propagate': True}```3. Set the timeout threshold in settings(default to 1 second):```pythonPATCHY_LONG_REQUEST_TIMEOUT = 2  # set the timeout to 2 seconds```Results:* For each web request, it has a header variable `X-ELAPSED` in seconds to indicate the time elapse.```bashX-ELAPSED: 0.005 # it means the request costs 5 ms```* If it exceeds the `PATCHY_LONG_REQUEST_TIMEOUT` a error log message will be sent.4. Add some urls to ignore list(optional), regular expression is supported.```pythonPATCHY_LONG_REQUEST_IGNORE_URLS = [r'^/_admin/.*$',]```# Utilities## long_sql_execute_wrapperLet us rewrite the CursorWrapper.execute to calculate the sql process time1. Add the python snippets in the `djangoproject/__init__.py````python# rewrite the sql operation methodfrom django.db.backends import utilsfrom patchy.utils import long_sql_execute_wrapperutils.CursorWrapper.execute = long_sql_execute_wrapper```2. Add logger handler with `pathcy.utils`:Example:```python'patchy.utils': {'handlers': ['sentry'],'level': 'WARNING','propagate': True}```3. Set the timeout threshold in settings(default to 0.05 seond, which is 50 miliseconds):```pythonPATCHY_LONG_SQL_TIMEOUT = 0.01  # set the timeout to 10 miliseconds```Result:* If the sql operation exceeds the `PATCHY_LONG_SQL_TIMEOUT` a error log message will be sent.4. no\_sql\_monitoring`no_sql_monitoring` is a decorator for wrapping code to skip sql monitoring.```pythonfrom patchy.utils import no_sql_monitoring@no_sql_monitoringdef transaction_status(request, transaction_no):transaction = Transaction.objects.get(transaction_no=transaction_no)return ResponseBuilder.build_success_json_response(msg='查询订单成功',data={'transaction_no': transaction_no,'transaction_status': transaction.transaction_status})```
Package: django-patron
A social CRMQuick startAdd “patron” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'patron',
]Include the patron URLconf in your project urls.py like this:url(r'^crm/', include('patron.urls')),Runpython manage.py migrateto create the patron models.Start the development serverVisithttp://127.0.0.1:8000/crm/to participate.
Package: django-patternfly
django-patternflyPatternfly integration for Django. Ported fromdjango-bootstrap4DISCLAIMER: This is a port done over the weekend and is a very poorly featured
package. The only purpose for this currently is to provide a CSS to be used in
your project templatesGoalThe goal of this project is to seamlessly blend Django and PatternFly.RequirementsPython 3.6 or newer with Django >= 2.2 or newer.DocumentationThe full documentation is (will be) athttps://django-patternly.readthedocs.io/InstallationInstall using pip:pipinstalldjango-patternflyAdd toINSTALLED_APPSin yoursettings.py:INSTALLED_APPS=(# ..."patternfly",# ...)In your templates, load thepatternflylibrary and use thepatternfly_*tags:Example template{% load patternfly %}

<html>
    <head>
        {% patternfly_css %}
    </head>
    <body>
        {% block patternfly_content %}
            Main Content
        {% endblock %}
    </body>
</html>DevelopmentInstall poetry$condainstall-cconda-forgepoetryBugs and suggestionsIf you have found a bug or if you have a request for additional functionality, please use the issue tracker on GitHub.https://github.com/Rintsi/django-patternfly/issuesLicenseYou can use this under BSD-3-Clause. SeeLICENSEfile for details.AuthorDeveloped and maintained byRintsi.Please seeAUTHORS.mdfor a list of contributors.
Package: django-patternfly4
django-patternflyPatternfly integration for Django. Ported fromdjango-bootstrap4DISCLAIMER: This is a port done over the weekend and is a very poorly featured
package. The only purpose for this currently is to provide a CSS to be used in
your project templatesGoalThe goal of this project is to seamlessly blend Django and PatternFly.RequirementsPython 3.9 or newer with Django >= 4.0 or newer.DocumentationThe full documentation is (will be) athttps://django-patternly4.readthedocs.io/InstallationInstall using pip:pipinstalldjango-patternfly4Add toINSTALLED_APPSin yoursettings.py:INSTALLED_APPS=(# ..."patternfly",# ...)In your templates, load thepatternflylibrary and use thepatternfly_*tags:Example template{% load patternfly %}

<html>
    <head>
        {% patternfly_css %}
    </head>
    <body>
        {% block patternfly_content %}
            Main Content
        {% endblock %}
    </body>
</html>DevelopmentInstall poetry$pipinstallpoetryBugs and suggestionsIf you have found a bug or if you have a request for additional functionality, please use the issue tracker on GitHub.https://github.com/ayaseen/django-patternfly4/issuesLicenseYou can use this under BSD-3-Clause. SeeLICENSEfile for details.AuthorDeveloped and maintained by Amjad YaseenPlease seeAUTHORS.mdfor a list of contributors.