Saravanan666/pypi-org huggingface dataset:
Package: django-keybase-verification
Keybase Verification=====[![Build Status](https://travis-ci.org/bsquidwrd/django-keybase-verification.svg?branch=master)](https://travis-ci.org/bsquidwrd/django-keybase-verification)[![Coverage Status](https://coveralls.io/repos/github/bsquidwrd/django-keybase-verification/badge.svg?branch=master)](https://coveralls.io/github/bsquidwrd/django-keybase-verification?branch=master)[![PyPI](https://img.shields.io/pypi/v/django-keybase-verification.svg)](https://pypi.python.org/pypi/django-keybase-verification/)[![PyPI](https://img.shields.io/pypi/pyversions/django-keybase-verification.svg)](https://pypi.python.org/pypi/django-keybase-verification/)[![Requirements Status](https://requires.io/github/bsquidwrd/django-keybase-verification/requirements.svg?branch=master)](https://requires.io/github/bsquidwrd/django-keybase-verification/requirements/?branch=master)Keybase Verification is a simple Django app to allow easy verification of your domain for [keybase.io](http://keybase.io).For each site, you will be able to create a record containing the verification information required by Keybase.Quick start-----------* Install the package with `pip install django-keybase-verification`* Add "keybase_verification" and "django.contrib.sites" to your INSTALLED_APPS setting like this:```pythonINSTALLED_APPS = [...'django.contrib.sites','keybase_verification',]```* Include the Keybase URLs in your project urls.py and make sure to import the `django.conf.urls.include` method like this:```pythonfrom django.conf.urls import url, includeurlpatterns = [...url(r'^', include('keybase_verification.urls')),]```* Run `python manage.py migrate` to create the keybase_verification models.* Start the development server and visit http://127.0.0.1:8000/admin/ to create a site with the URL you are wanting to verify (in this case 127.0.0.1), then create a Keybase Verification for a particular site (you'll need the Admin app enabled).* Visit http://127.0.0.1:8000/keybase.txt or http://127.0.0.1:8000/.well-known/keybase.txt to view your proof.
Package: django-keycloak
Django app to add Keycloak  support to your project.Read documentationhttp://www.keycloak.org/An showcase/demo project is added in theexample folder.DevelopmentInstall development environment:$makeinstall-pythonWriting docsDocumentation is written using Sphinx and maintained in the docs folder.To make it easy to write docs Docker support is available.First build the Docker container:$dockerbuild.-fDockerfileDocs-tdjango-keycloak-docsRun the container$dockerrun-v`pwd`:/src--rm-t-i-p8050:8050django-keycloak-docsGo in the browser tohttp://localhost:8050and view the documentation which get
refreshed and updated on every update in the documentation source.Create release$gitcheckoutmaster$gitpull$bumpversionrelease$makedeploy-pypi$bumpversion--no-tagpatch$gitpushoriginmaster--tagsRelease Notesunreleasedv0.1.1Added support for remote user. Handling identities without registering a User
model. (thanks tobossan)Addes support for permissions using resources and scopes.
(thanks tobossan)Updated documentation.v0.1.0Correctly extract email field name on UserModel (thanks toswist)Add support for Oauth2 Token Exchange to exchange tokens with remote clients.
Handy when using multiple applications with different clients which have to
communicate with each other.Support for session iframe
Package: django-keycloak-pkg
===============
Django Keycloak.. image::https://www.travis-ci.org/Peter-Slump/django-keycloak.svg?branch=master:target:https://www.travis-ci.org/Peter-Slump/django-keycloak:alt: Build Status
.. image::https://readthedocs.org/projects/django-keycloak/badge/?version=latest:target:http://django-keycloak.readthedocs.io/en/latest/?badge=latest:alt: Documentation Status
.. image::https://codecov.io/gh/Peter-Slump/django-keycloak/branch/master/graph/badge.svg:target:https://codecov.io/gh/Peter-Slump/django-keycloak:alt: codecov
.. image::https://api.codeclimate.com/v1/badges/eb19f47dc03dec40cea7/maintainability:target:https://codeclimate.com/github/Peter-Slump/django-keycloak/maintainability:alt: MaintainabilityDjango app to add Keycloak  support to your project.Read documentation <http://django-keycloak.readthedocs.io/en/latest/>_http://www.keycloak.org/An showcase/demo project is added in theexample folder <example/README.md>_.DevelopmentInstall development environment:.. code:: bash$ make install-pythonWriting docsDocumentation is written using Sphinx and maintained in the docs folder.To make it easy to write docs Docker support is available.First build the Docker container:.. code:: bash$ docker build . -f DockerfileDocs -t django-keycloak-docsRun the container.. code:: bash$ docker run -v `pwd`:/src --rm -t -i -p 8050:8050 django-keycloak-docsGo in the browser tohttp://localhost:8050and view the documentation which get
refreshed and updated on every update in the documentation source.Create release.. code:: bash$ git checkout master
$ git pull
$ bumpversion release
$ make deploy-pypi
$ bumpversion --no-tag patch
$ git push origin master --tagsRelease Notesunreleasedv0.2.5Add registeration redirect viewv0.2.4Fixed refresh token expiration date existsv0.2.3Fixed ENTTITLMENT issue by commenting the code temporarily, till fully fixedhttps://issues.redhat.com/browse/KEYCLOAK-8353v0.2.2Fixed issue by adding migration file to repov0.2.1Added a feature to use redirect url after successful login using settings.LOGIN_REDIRECT_URLv0.2.0Added support for Python 3.9 & Django 4.1Fixed integration issues with keycloak > v4https://github.com/Peter-Slump/django-keycloak/issues/57https://github.com/Peter-Slump/django-keycloak/issues/18https://github.com/oauth2-proxy/oauth2-proxy/issues/1448Updated documentation.v0.1.2-devv0.1.1Added support for remote user. Handling identities without registering a User
model. (thanks tobossan <https://github.com/bossan>_)Addes support for permissions using resources and scopes.
(thanks tobossan <https://github.com/bossan>_)Added example project.Updated documentation.v0.1.0Correctly extract email field name on UserModel (thanks toswist <https://github.com/swist>_)Add support for Oauth2 Token Exchange to exchange tokens with remote clients.
Handy when using multiple applications with different clients which have to
communicate with each other.Support for session iframe
Package: django-keyed-urls
An app for those cases when you need language-specific URLs in the database
for use in templates or as redirects.InstallationInstalldjango-keyed-urlswith pip:pip install django-keyed-urlsAddkeyed_urlsandmodeltranslationtoINSTALLED_APPS.Specify a custom location for South migrations forkeyed_urls– you really
want to use South to handle schema changes when adding or removing languages
fromLANGUAGES:SOUTH_MIGRATION_MODULES = {
    'keyed_urls': 'yourapp.migrate.keyed_urls',
}Create and run database migrations:python manage.py schemamigration keyed_urls --initial
python manage.py migrate keyed_urlsIf you want to use the forwarding URLs, add an entry to your URLconf file. It
is recommended to usei18n_patternsbecause that means that
language-specific redirection URLs are automatically handled correctly:from django.conf.urls import include, url
from django.conf.urls.i18n import i18n_patterns

urlpatterns += i18n_patterns(
    '',
    url(r'', include('keyed_urls.urls'),
)UsageTemplate tagsUsage is simple:{% load keyed_urls %}

{% keyed_url 'some_key' as url %}

<a href="{{ url }}">bla</a>

<a href="{% keyed_url 'some_other_key' %}">bla</a>Or:{% load keyed_urls %}

{% keyed_url 'some_key' language='en' as url %}

<a href="{{ url }}">bla</a>If a key does not exist and the tag is used as an assignment tag, the variable
is set toNone. Otherwise, aKeyDoesNotExistexception is raised which
also aborts template rendering. The behavior is equal to the behavior of
Django’s own{% url %}template tag in this regard.HelpersTwo additional helpers are available. If you need URLs in python code,
use the following snippet:from keyed_urls import get_url

some_url = get_url('some_key')
some_other_url = get_url('some_key', language='en')The advantage of usingget_urlcompared to fetching aKeyedURLmodel
from the database and accessing itsurlattribute is thatget_urlis
caching all results. Sinceget_urlis also used internally by the template
tag described above this means that you do not have to worry about performance
as much as when using models directly.get_urlraises aKeyDoesNotExistexception if a particular URL cannot be found. This can be prevented by passingfail_silently=True.The following snippet can be used to fetch the forwarding URL:from keyed_urls import get_forwarding_url

url = get_forwarding_url('some_key')
url = get_forwarding_url('some_key', language='de')get_forwarding_urlis nothing more but a thin wrapper around Django’s ownreversemethod. This method raises aNoReverseMatchexception if the
key is invalid, but does not check whether the given key exists at all in the
database. When visiting the link, users will get a 404 response. Forget_forwarding_urlto work you have to includekeyed_urls.urlssomewhere in your URLconf as described above, preferrably inside ani18n_patternsblock.
Package: django-keyrock
# django-keyrockKeyRock Identity Manager client for DjangoMade by [https://glampinghub.com](https://glampinghub.com)## How to Install1. Install it:```shpip install django-keyrock```2. Add 'keyrock' to your INSTALLED_APPS:```pythonINSTALLED_APPS += ('keyrock',)```3. Add the context processor to your Django settings:```pythonTEMPLATE_CONTEXT_PROCESSORS += ('keyrock.context_processors.keyrock_url',)```4. Add KEYROCK_URL to your Django settings:```pythonKEYROCK_URL = 'your_domain'  # Example: KEYROCK_URL = 'https://yoursite.com'```5. Add the urls to urls.py:```pythonurlpatterns += patterns('',url(r'keyrock/', include('keyrock.urls')),)```6. The url to sign up:```html<a href="{{ KEYROCK_URL }}/sign_up/">Sign Up</a>```7. You can add a link to reset password:```html<a href="{{ KEYROCK_URL }}/password/request/">Forgot your password/email?</a>```## Settings**KEYROCK_APP_CLIENT_ID** Application ID in Keyrock. When you create yourapplication in Keyrock it will generate a pair of keys for it, this is thegenerated id.**KEYROCK_APP_CLIENT_SECRET** Application Secret in Keyrock. When you createyour application in Keyrock it will generate a pair of keys for it, this is thegenerated secret.**KEYROCK_REDIRECT_URL** URL to redirect to when the login/signupprocess is completed. It must be a URL without parameters. Typically yourhomepage URL.**KEYROCK_URL** KeyRock instance URL, including protocol. Example:*https://keyrock.example.com*## Legal NoticeThis software is licensed under a BSD 3-clause. You can find a copy of thelicense in this repository.Copyright (c) 2016, Glamping Hub <it@glampinghub.com>
Package: django-keyset-pagination-plus
Keyset Pagination for Django.Django pagination uses the LIMIT/OFFSET method. This is fine for smaller offsets, but once you start getting beyond a few pages, it can perform really badly. This is because the database needs to fetch all of the previous rows, even though it discards them.Using Keyset Pagination allows for better performing "next page" fetches, at the cost of not being able to randomly fetch a page. That is, if you know the last element from page N-1, then you may fetch page N, but otherwise you really can't.Keyset Pagination, sometimes called the Seek Method, has been documented byMarkus WinandandJoe Nelson. If you are not familiar with the concept, I strongly suggest you read the articles above.In order to use the paginator within this package, you will probably also need to use the provided View mixin: this changes the way a queryset is paginated to enable non-integer "page numbers".class List(PaginationMixin, ListView):
    paginator_class = KeysetPaginator
    paginate_by = 10
    queryset = MyModel.objects.order_by('-timestamp', 'group')You won't be able to iterate through page numbers in a template in the same way: you are limited to next and previous pages. Otherwise, you construct them in largely the same way:<a href="{% url 'mymodel:list' %}?page={{ page_obj.previous_page_number }}">
  Prev Page
</a>

<a href="{% url 'mymodel:list' %}?page={{ page_obj.next_page_number }}">
  Next Page
</a>Note that you do not get access to the length of the queryset, nor the number of pages, because these could be expensive queries. You really don't need to know that ;)However, I like to use GET forms toenable pagination of filtered results:<button form="target-form"
        name="page"
        value="{{ page_obj.previous_page_number }}"
        type="submit">
  &larr; Prev Page
</button>

<button form="target-form"
        name="page"
        value="{{ page_obj.next_page_number }}"
        type="submit">
  Next Page &rarr;
<button>Seehttps://schinckel.net/2018/11/23/keyset-pagination-in-django/for more details about how this package works.
Package: django-khalti
django-khalti is a Django app based on djangorestframework to conduct
server based payment verification of khalti payment gateway. For each
payment,it can verify and return status of payment through transaction
token and paid amount.Detailed documentation is in the “docs” directory.Quick startIntall the django-khalti and django rest framework like this:pip install djangorestframework
pip install django-khaltiAdd “django-khalti” and “djangorestframework “to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'rest_framework',
    'khalti',
]Include the django-khalti URLconf in your project urls.py like this:path('khalti/', include('khalti.urls')),Add Khalti Merchant API key and Verify URL in your settings.pyKHALTI_SECRET_KEY = "<your api key>"
KHALTI_VERIFY_URL = "https://khalti.com/api/v2/payment/verify/"5.Test your endpoints like this:POST: /khalti/verifypayment/
body:{
    'token':<transaction token>,
    'amount':<transaction amount>
}6.You will get responses like this:On Success:
    {
        'status':True,
        'details':{
                      "idx": "8xmeJnNXfoVjCvGcZiiGe7",
                      "type": {
                        "idx": "e476BL6jt9kgagEmsakyTL",
                        "name": "Wallet payment"
                      },
                      "state": {
                        "idx": "DhvMj9hdRufLqkP8ZY4d8g",
                        "name": "Completed",
                        "template": "is complete"
                      },
                      "amount": 1000,
                      "fee_amount": 30,
                      "refunded": false,
                      "created_on": "2018-06-20T14:48:08.867125+05:45",
                      "ebanker": null,
                      "user": {
                        "idx": "cCaPkRPQGn5D8StkiqqMJg",
                        "name": "Test User",
                        "mobile": "98XXXXXXX9"
                      },
                      "merchant": {
                        "idx": "UM75Gm2gWmZvA4TPwkwZye",
                        "name": "Test Merchant",
                        "mobile": "testmerchant@khalti.com"
                      }
                }
    }

On Error:
    {
        'status':False,
        'details':{'token': ['Invalid token.']}
    }
Package: django-khronos
KhronosAre your org hotfixes truly considered "hotfixes" if they take longer than 15 minutes to go live because of slow tests workflows running on GitHub Actions? To speed up this imagine benchmarking test   durations to identify the slow tests when the total number of tests > 500, it seems impractical to run each test individually and manually record their duration   times.Khronos is a Python library that benchmarks the duration of Django tests. It helps identify slow-running tests in your test suite, allowing you to optimize their performance.Feautres:1)Benchmark Report:Create benchmark report in the terminal whenever you run your django tests and shows top 10(this no. can be configured) slowest tests.2)Parallel Test Execution:Works with--parallelout of the box.3)Google Sheets Integration:Whole tests benchmark can be automatically  uploaded to Google Sheets.4)CSV Export:Whole tests benchmark can be saved in a CSV.How to configure:python -m buildand install in your virtual env.AddTEST_RUNNER = "khronos.custom_test_runner.KhronosTestRunner"in yoursettings.pyIf you want to increase the number of slowest tests displayed on terminal then setKHRONOS_REPORT_MAX_ROW=in yoursettings.py.If you want to add Google Sheets integration, add:KHRONOS_SPRAEDSHEET_REPORT_GSHEET_ID = "your-google-sheet-id"and yourKHRONOS_GSHEET_CREDS_FILE_PATH = "your-gsheet-cred-path" in yoursettings.py` .For saving the khronos benchmark report.Tested on Django3.2.14. Open an issue if it's not supported in your's django version
Package: django_kibrit
django_kibrit=============A git version parser for django templates.Usage:------The intent of django_kibrit is to burn the css cache of the client upon a change in the project.# Somewhere in your templates<link href="{{ STATIC_URL }}css/screen.css{{ KIBRIT_REVISION }}" media="screen, projection" rel="stylesheet" type="text/css" />Installation:------------pip install django_kibritKibrit makes use of the `memcached` library in django. To enable this placeCACHES = {'default': {'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache','LOCATION': '127.0.0.1:11211',},}To use kibrit on your templates append the following 2 lines at the end of your projects `settings.py`.TEMPLATE_CONTEXT_PROCESSORS += ('django_kibrit.context_processors.revision',)INSTALLED_APPS += 'django_kibrit',The package can try to detect .git in your project automatically but it is best if you explicitly set KIBRIT_PATH in your settings to where the .git file is in your project.KIBRIT_PATH = '/path/to/your/.git' # You've found it when 'ls -al | grep .git' prints the .git file
Package: django-kick-off
Kick-Off-DjangoThe idea of this package is to avoid the repetitive task of configuring a Django project and virtual environment.Installationpipinstalldjango-kick-offUsagepython3-mkick_off<project_name><venv_name>OUTPUT:requirements.txtvirtual environmentDjango project with an app.Example #1 (Generic Naming)python3-mkick_offOUTPUT:|--requirements.txt|--venvMySite/|--bin/|--include/|--lib/|--pyvenv.cfg|--mysite/|--home/|--mysite/|--manage.py|--db.sqlite3Example #2 (Only Project Naming)python3-mkick_offtest_webOUTPUT:|--requirements.txt|--venvTestWeb/|--bin/|--include/|--lib/|--pyvenv.cfg|--test_web/|--home/|--test_web/|--manage.py|--db.sqlite3Example #3 (Project and Venv Naming)python3-mkick_offtest_webExampleOUTPUT:|--requirements.txt|--venvExample/|--bin/|--include/|--lib/|--pyvenv.cfg|--test_web/|--home/|--test_web/|--manage.py|--db.sqlite3
Package: django-kidocare
GoalProvide tool which help finding performance issues in django projects.InstallationInstall Kido Care:pip install django-kidocareor current development version:pip install hg+https:://bitbucket.org/kidosoft/django-kidocareConfigurationINSTALLED_APPS=(...'kidocare',...)UsageChecking for queries run at startup:$ python manage.py check_startup_queries -o queries.txtSupported Django versionsTested with:Django 1.2.7 on python2.7Django 1.3.7 on python2.7Django 1.4.16 on python2.7Django 1.5.11 on python2.7, python3.4Django 1.6.8 on python2.7, python3.4Django 1.7.1 on python2.7, python3.4
Package: django-kidoredis
WarningThis module is not maintained anymore. Please usehttp://pypi.python.org/pypi/django-redisdbGoalProvide Redis backends for Django that faciliates using multiple Redis servers
in the same time like if they were in master/master or sharded configuration.InstallationInstall requirements:pip install redis hash_ringInstall Kido Redis:pip install django-kidoredisor current development version:pip install hg+https:://bitbucket.org/kidosoft/django-kidoredisConfigurationCACHES={'redis_ring':{'BACKEND':'kidoredis.backends.RedisRing',# sharding backend'DB':0,'LOCATION':['localhost:6379','localhost:6380',]},'redis_copy':{'BACKEND':'kidoredis.backends.RedisCopy',# copying backend'DB':0,'LOCATION':['localhost:6379','localhost:6380',]}}Redis is configured as cache backend although it should be treat as specialized
database. There are two backends:UsageAfter configuration access to Redis is done like to any other Django cache:fromdjango.core.cacheimportcachescaches['redis_ring'].set('key1',1)# set key1 only on on servercaches['redis_copy'].set('key2',2)# set key2 on all serversresult_list=caches['redis_copy'].zrange('key3',1,10)# redis only commandCaveatsRedisCopy can save data to many nodes. Each of this nodes can return different
result on save. For that reason commands that save data to nodes returns list
of results from each node. E.g. with two nodes set for redis_copy:>>>printcaches['redis_copy'].set('key1',2)[True,True]Supported Django versionsTested with:Django 1.2.7 on python2.7Django 1.3.7 on python2.7Django 1.4.16 on python2.7Django 1.5.11 on python2.7, python3.4Django 1.6.8 on python2.7, python3.4Django 1.7.1 on python2.7, python3.4
Package: django-kidotest
GoalProvide code snippets which help running tests in Django.InstallationInstall requirements:pip install mockInstall Kido Test:pip install django-kidotestor current development version:pip install hg+https:://bitbucket.org/kidosoft/django-kidotestConfigurationINSTALLED_APPS=[...'kidotest',...]UsageSupported Django versionsTested with:Django 1.2.7 on python2.7Django 1.3.7 on python2.7Django 1.4.16 on python2.7Django 1.5.11 on python2.7, python3.4Django 1.6.8 on python2.7, python3.4Django 1.7.1 on python2.7, python3.4
Package: django-kindeditor
django-kindeditorThis repo is to make it easy to use KindEditor as a RichTextEditor when using django.You can visit this site to see the editor result:http://kindeditor.org/Chinese[中文版]RequiresDjango 2.0+Python 3.6+UsageInstallpipinstalldjango-kindeditorAddkindeditorto INSTALL_APPS in settings, and define static, mediaINSTALLED_APPS=[...'kindeditor',]...STATIC_URL='/static/'STATIC_ROOT=os.path.join(BASE_DIR,'static')# your static files pathMEDIA_URL='/media/'MEDIA_ROOT=os.path.join(BASE_DIR,'media')# your media files pathInsert "kindeditor/" path and static, media paths to urlpatterns in urls.pyfromdjango.confimportsettingsifsettings.DEBUG:# static and mediafromdjango.conf.urls.staticimportstaticfromdjango.contrib.staticfiles.urlsimportstaticfiles_urlpatternsurlpatterns.extend(staticfiles_urlpatterns()+static(settings.MEDIA_URL,document_root=settings.MEDIA_ROOT))urlpatterns=[...path("kindeditor/",include("kindeditor.urls")),]ifsettings.DEBUG:# static and mediafromdjango.conf.urls.staticimportstaticfromdjango.contrib.staticfiles.urlsimportstaticfiles_urlpatternsurlpatterns.extend(staticfiles_urlpatterns()+static(settings.MEDIA_URL,document_root=settings.MEDIA_ROOT))Example# models.pyfromkindeditorimportRichTextFieldclassArticle(models.Model):title=models.CharField(max_length=80)content=RichTextField()# settings.pyKINDEDITOR_UPLOAD_PERMISSION='admin'# admin.pyfromdjango.contribimportadminfromkindeditorimportEditorAdminfrom.modelsimportArticleadmin.site.register(Article,EditorAdmin)DemoClone the repo to localgitclonehttps://github.com/waketzheng/django-kindeditorCreate a virtual environment and install required packagespipenvinstall--devActivate itpipenvshellMigrate and compile translation file./manage.pymigrate
./manage.pycompilemessagesRunserver./manage.pyrunserverView the url and you will see the demo at webbrowser.http://127.0.0.1:8000DevelopmentTest Coveragecoveragerun./manage.pytestTest multiple django versionstoxShow code qualitycoveragexml
python-codacy-coverage-rcoverage.xml
Package: django-kindling
To assist set-up of nice Django projects. May later be replaced by a project template.QuickstartTo get started:% mkvirtualenv yourproject
(yourproject) % pip install git+https://github.com/radiosilence/django-kindling.git
(yourproject) % kindling yourproject
(yourproject) % workon yourproject
(yourproject) % pip install -r yourproject/requirements.txtNext, I would recommend you updatefabfile.pyto choose a debug port, live domain name, and enable celery (if needed).TodosCreate boilerplate HTMLCreate boilerplate CSS