Saravanan666/pypi-org huggingface dataset:
Package: django-gulp-rev
===============django-gulp-rev===============Django gulp-rev is a simple Django app that integrates `gulp-rev<https://www.npmjs.com/package/gulp-rev>`_ with your Django website.django-gulp-rev looks for your rev-manifest.json file generated by gulp-rev andparses it to provide dynamic versioned paths to your static assets. In default,the rev-manifest.json file should be in your STATIC_ROOT directory.When DEBUG == True, django-gulp-rev doesn't use the rev-manifest.json file, insteadit appends random characters at the end of the file, like this:/devstatic/css/main.css?39daksdWhen DEBUG is set to False, everything works as expected, and django-gulp-rev usesyour rev-manifest.json file to return a versioned static url:/static/css/main-39daksd.cssQuick start-----------1. Add "gulp_rev" to your INSTALLED_APPS setting like this:INSTALLED_APPS = [...'gulp_rev',]2. Load "rev" in your templates:{% load 'rev' %}3. Use in your templates like this:{% static_rev 'css/main.css' %}Configuration-------------``DJANGO_GULP_REV_PATH``~~~~~~~~~~~~~~~~~~~~~~~~Override default STATIC_ROOT/rev-manifest.json filepath
Package: django-gum
Gum is a Django app for integrate Elasticsearch 1.x with Django. You can find documentation athttps://django-gum.readthedocs.org.Quick start1Install using pip:pip install django-gum2Add “gum” to your INSTALLED_APPS settings like this:INSTALLED_APPS += ('gum',)3Add Elasticsearch configuration to your settings like this:GUM_ELASTICSEARCH_URLS = ["http://127.0.0.1:9200/"]
GUM_ELASTICSEARCH_INDEX = ".gum-tests"List of available configuration variables:GUM_DEBUG(boolean)GUM_USE_CELERY(boolean)GUM_ELASTICSEARCH_URLS(list)GUM_ELASTICSEARCH_INDEX(string)4Create an index.py in your app, with a content like this:from gum.indexer import MappingType, indexer

class PostMappingType(MappingType):

    def document(self, instance):
        tags_text = " ".join(map(lambda x: x.label, instance.tags.all()))
        return {
            "title": instance.title,
            "content": instance.content,
            "text": "{} {} {}".format(instance.title, instance.content, tags_text)
        }

    def mapping(self):
        return {
            "properties": {
                "title": {
                    "type": "string",
                    "store": True,
                },
                "content": {
                    "type": "string",
                    "store": True,
                },
                "text": {
                    "type": "string",
                    "store": True,
                }
            }
        }

indexer.register(Post, PostMappingType)5Update Elasticsearch index:./manage.py gum --update-indexYou can specify the models you want to index:./manage.py gum --update-index blog.PostSearchingYou can perform Elasticsearch searches (accessingsearchmethod) usingelasticsearchmodel
attribute:response = Post.elasticsearch.search(body={
    "query": {
        "match_all": {}
    }
})
Package: django-gumby
Gumby Brain Specialist!, Django health checksThis project is heavily inspired by djangp-health-checks and the django
contrib adminDocumentationThe full documentation is athttps://django-gumby.readthedocs.org.QuickstartInstall django-gumby:pip install django-gumbyThen use it in a project:TODOFeaturesTODOHistory0.1.0 (2015-05-31)First release on PyPI.
Package: django-gunicorn
django-gunicorn is a very simple Django app to provide Gunicorn integration
withrunserver.StatusThe current state of this project is considered extremely experimental. It was
tested with Gunicorn 19.0.0 only. It depends on it actually. This app makes use
of the new–reloadoption which allows for code reloading while Gunicorn is
running.Issues and pull requests welcomed!
Package: django-gusregon
GUS (Główny Urząd Statystyczny) REGONInternet Database client which allows to get detailed information about company based on NIP, Regon or KRS number.QuickstartInstall the package viapip:pipinstalldjango-gusregonUsagefromdjangoimportformsfromgusregon.gusimportGUSclassMyForm(forms.Form):nip=forms.CharField()...form=MyForm(data=request.POSTorNone)ifform.is_valid():gus=GUS()company_details=gus.search(form.cleaned_data.get('nip'))APIfromgusregon.gusimportGUSgus=GUS()gus.search(nip='..')gus.search(krs='..')gus.search(regon='..')For more information, seeGUSapi class.
Package: django-gvar
django-gvarDescriptiondjango-gvaris a Python module which allows to storemulti-dimensional Gaussian random variables implemented by G. Peter Lepage'sgvarmoduleintoDjango's ORM Framework.
It adds aGVarField, which can be used to store individual GVars, arrays of GVars, and Dictionaries of GVars.Usage in scriptsAfter pip-installing the module, import theGVarFieldfield into your project and use it out-of-the-box (changing settings is not required)# myproject.models.pyfromdjango.dbimportmodelsfromdjango_gvarimportGVarFieldclassExampleTable(models.Model):a=GVarField()After migrating new table definitions, theGVarFieldcan be used as any other field in external scriptsfromgvarimportgvarfrommyproject.modelsimportExampleTablea=gvar([1,2,3],[4,5,6])entry=ExampleTable(a=a)entry.save()Usage in formsFor web-forms, the default widget forGVarFields are text areas.
Currently, the form supports single numbers and arrays as input.
These forms utilize custom syntax to convert the input toGVars:GVars without correlations are can specified by lists of numbers where parenthesis define standard deviations1(2), 3(4), ...GVars with correlations are specified as arrays of mean values and the covariance matrix separated by a|[1, 2] | [[1, 2], [2, 3]]Installdjango-gvarcan be installed from the repository root usingpippipinstall[-e][--user].Because it utilizes Django'sJSONField, which is available for all database backends in Django version 3.1 (previously it was a Postgres only field), it currently depends on the development version of Django (Django==3.1a1).
Once established, the dependencies will be updated accordingly.DetailsThe underlying database type fordjango-gvars areJSONFields.
It usesgvarsgdumpsandgloadsto generate correspondingJSON.
Theproject documentationspecifies more details.ExamplesThetestsdirectory implements a simple Django app using theGVarFields.
To start it, install the repo as specified above and runcdtests
pythonmanage.pymigrate# init that test database / only needs to be run oncepythonmanage.pyrunserver# start a local server
Package: django-gzipping-cache
Django Gzipping CacheThe Django Gzipping Cache is a transparent wrapper of django caches that
gzips values before they are sent to the underlying cache.Django Gzipping Cache is released under the BSD license, like Django.
If you like it, please consider contributing!UseThe gzipping cache is declared like so:CACHES = {
    ...
    'my_cache': {
        'BACKEND': 'django_gzipping_cache.cache.GzippingCache',
        'LOCATION': '_my_cache'
    },
    '_my_cache': {
        'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
        'LOCATION': 'snowflake'
    },
    ...
})This will create 2 caches, one is a standard LocMemCache (though GzippingCache
will wrap any django cache) and the other is a gzip cache. Here’s a sample
iPython run with the above:In [1]: from django.core.cache import get_cache

In [2]: my_cache = get_cache('my_cache')

In [3]: _my_cache = get_cache('_my_cache')

In [4]: my_cache.set('foo', 'bar')

In [5]: my_cache.get('foo')
Out[5]: 'bar'

In [6]: _my_cache.get('foo')
Out[6]: 'x\x9cKJ,\x02\x00\x02]\x016'Obviously, you should not use the GzippingCache for small strings as gzip output
can be longer.ConfigurationGzippingCache takes 2 additional parameters, the default configuration is:CACHES = {
    ...
    'my_cache': {
        'BACKEND': 'django_gzipping_cache.cache.GzippingCache',
        'LOCATION': '_my_cache'
        'COMPRESS_LEVEL': 6,
        'PASS_UNCOMPRESSED': False,
    },
    ...
})COMPRESS_LEVEL is the number from 1-9 that tells zlib how aggressively to compress,
higher numbers take more CPU in order to achieve smaller output.PASS_UNCOMPRESSED is for storing compressed and uncompressed data in the same
underlying cache. This is not recommended. If PASS_UNCOMPRESSED is set to True and
a piece of data fails a CRC check, the data will be returned. If the data was corrupted
this will most likely result in your application misbehaving.
Package: django-h5bp
django-h5bp===========A simple HTML5 Boilerplate Django app that has some predefined template Blocks,useful to be extended in any application template.Instalation-----------------------------------pip install django-h5bpUsage-----------------------------------Add this app to the 'installed_apps' settings:INSTALLED_APPS = (...'django_h5bp',)Extend the H5BP template in your base template, here is an example:{% extends "responsive/responsive_h5bp.html" %}{% block page-title %}My Great Project{% endblock %}{% block header %}<h1 class="title">Here is my page header</h1>{% endblock %}{% block main-container %}<div><p>Hello World!</p></div>{% endblock %}{% block footer %}<p>Footer</p>{% endblock %}That should be enought to have your base.html using the Responsive HTML5 Boilerplate Django template.Static Files-----------------------------------The H5BP template comes with some JS in it, as well as the default css style, all of them are correctly configured in the template to use the {{ STATIC_URL }} tag.The only one missing is the favicon.ico, that you should set your own (else it would the default one, depending on the position you put the app in the installed app list).H5BP Template Blocks-----------------------------------Here are all the blocks that exist in the responsive_h5bp.html:### \<head\>* page-title* meta-description* meta-keywords* meta-author* meta-generator* meta-extras* css-extras### \<body\>\<header\>* header### \<body\>\<div class="main"\>* main-container### \<body\>* js-imports### \<body\>\<script type="text/javascript"\>* jquery-docready* jquery-winload### \<body\>\<script type="text/javascript"\>* js-onpage### \<body\>* analytics404 Page-----------------------------------This app also contains the HTML5 Boilerplate default 404 page, with no template tags.LICENSE=============This software is distributed using MIT license, see LICENSE file for more details.
Package: django-hackref
=====Welcome to django-hackref!=====.. image:: https://badge.fury.io/py/django-hackref.svg:target: https://badge.fury.io/py/django-hackref.. image:: https://travis-ci.org/jmitchel3/django-hackref.png:target: http://travis-ci.org/jmitchel3/django-hackref.. image:: https://img.shields.io/pypi/v/django-hackref.svg:target: https://pypi.python.org/pypi/django-hackref.. image:: https://coveralls.io/repos/github/jmitchel3/django-hackref/badge.svg?branch=master:target: https://coveralls.io/github/jmitchel3/django-hackref?branch=masterHack Referrals is a Django app to create, monitor and track user referral links.Quick start-----------1. Install via "pip"::pip install django-hackref2. Add "hackref" to your INSTALLED_APPS setting like this::INSTALLED_APPS = [...'hackref',]3. Include the polls URLconf in your project urls.py like this::url(r'^r/', include('hackref.urls')),4. Run `python manage.py migrate`.
Package: django-hadoop-storage
Django hadoop storage provide python classes/functions to usehadoop
file system(hdfs) with django storage.Based onlibhdfsofficial hadoop python connector andpyarrowlibrary.RequirementsInstall java-1.8.0-openjdk-devel, In centos 7sudoyuminstall-yjava-1.8.0-openjdk-develIn Ubuntusudoapt-getinstallopenjdk-8-jdkInstall
hadoopSettingsFor use hdfs as django storage set:HADOOP_HOST='localhost'# set your own hostHADOOP_PORT=8020# set your own portHADOOP_USER='hadoop'# set your own userHADOOP_HOME='/usr/lib/hadoop/'# set your own pathMEDIA_ROOT='/media/'DEFAULT_FILE_STORAGE='hadoop_storage.HadoopStorage'StorageUse hadoop file storage with same methods and properties thatdjango
File
Storage
Package: django-hallo-markdown
Ahallojs markdown editor wrapper for Django. Made for use in FeinCMS,
supports multiple editors on the same page.InstallationYou can install django-hallo-markdown either via the Python Package Index (PyPI)
or from source.To install usingpip,:$ pip install -U django-hallo-markdownTo install usingeasy_install,:$ easy_install -U django-hallo-markdownExample Usage with FeinCMSfrom django import forms
from django.utils.translation import ugettext_lazy as _
from django.contrib.markup.templatetags.markup import markdown
from django.db import models

from feincms.module.page.models import Page
from feincms.admin.item_editor import ItemEditorForm

from djhallo.widgets import HalloInput


class MarkdownContentAdminForm(ItemEditorForm):
    content = forms.CharField(widget=HalloInput(),
        required=False, label=_('text'))


class MarkdownPageContent(models.Model):

    form = MarkdownContentAdminForm
    feincms_item_editor_form = MarkdownContentAdminForm

    content = models.TextField()

    class Meta:
        abstract = True

    def render(self, **kwargs):
        return markdown(self.content)

Page.create_content_type(MarkdownPageContent)
Package: django-handleref
django-handlerefTrack when an object was created or changed and allow querying based on time and versioning (w/django-reversionsupport)LicenseCopyright 2015-2023 20C, LLCLicensed under the Apache License, Version 2.0 (the "License");
you may not use this software except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Package: django-handwriting-widget
Django Handwriting WidgetA handwriting widget for djangoInstallationInstall withpippip install django-handwriting-widgetAdd this app toINSTALLED_APPSinsettings.pyINSTALLED_APPS=[...'handwriting',]UsageExample modelFormfromdjangoimportformsfromhandwriting.formsimportHandwritingPadfrom.modelsimportSignatureclassSignatureForm(forms.ModelForm):classMeta:model=Signaturefields='__all__'widgets={'image':HandwritingPad(),}Adminfromdjango.contribimportadminfromhandwriting.adminimportHandwritingPadModelAdminfrom.modelsimportSignature@admin.register(Signature)classSignatureAdmin(HandwritingPadModelAdmin):list_display=('name','create_at')orfromdjango.contribimportadminfromhandwriting.adminimportHandwritingPadAdminMixinfrom.modelsimportSignature@admin.register(Signature)classSignatureAdmin(HandwritingPadAdminMixin,admin.ModelAdmin):list_display=('name','create_at')orfromdjango.contribimportadminfrom.formsimportSignatureFormfrom.modelsimportSignature@admin.register(Signature)classSignatureAdmin(admin.ModelAdmin):form=SignatureFormlist_display=('name','create_at')
Package: django-handyhelpers
django-handy-helpersAuthorDavid SlusserDescriptionA collection of handy utilities to support django projectsRequirementsPython 3.xDjango 2.2.xDocumentationFull documentation can be found onhttp://django-handyhelpers.readthedocs.org.
Documentation source files are available in the docs folder.How to InstallThe django-userextensions package is available on Python Package Index (PyPI) and can be installed via pip:pip install django-handyhelpersadd 'handyhelpers' to your INSTALLED_APPS (for management commands and templates)INSTALLED_APPS = [
    ...
    'handyhelpers',
]Management CommandsDRF GeneratorDjango-handyhelpers includes manage.py commands to generate DRF files (api views, serializers, urls) for a given app in your project.
This is done using jinja templates that define the structure of each file. Default templates are provided, and custom templates
can be provided in the command. By default, all models and models fields are included.Example command:manage.py generate_drf <my_app> --serializer
manage.py generate_drf <my_app> --serializer --serializer_template <my_custom_template>** use the --help parameter for a full list of optionsmanage.py generate_drf --helpAdmin GeneratorIncluded with django-handyhelpers are manage.py commands to auto-generate an admin.py file for a given application in
your project. This is done using a jinja template that defines the structure of the admin.py file. A default template is
provided.Example command:manage.py generate_admin <my_app>
manage.py generate_admin <my_app> --template <my_custom_template>** use the --help parameter for a full list of optionsmanage.py generate-admin --helpMixinsFilterByQueryParamsMixinAllows your list views to be filtered by query parameters.InvalidLookupMixinReturns an applicable error, instead of results based on an unfiltered queryset, if a provided  lookup expression,
filter, or model field is invalid.
Package: django-handytools
Handy Toolsdon't waste your time in common problemsHandy Tools For Your Django Projectprovided tools: models, utils, context processors, templates, template tagsOverviewApps: TextPhrases, TextImagePhraseContext Processors: text_phrase_simple_cp, text_phrase_language_cpTemplate Tags: google_analytic, single_text_phrase, multi_text_phraseTemplates: google analytic templateSupported Languages: en, fr, fa, ja, de, ch, zh-CN, zh-TWinstallpip install django-handytoolsconsider --user option
Package: django-happystamp
Created byHicham El MansouriLicenseThis software is open sourced underBSD licensed.OverviewHappystamp is aDjangoapplication for building loyalty card systems. It’s built on the top ofMezzanineCMS platform. This application provides, OOTB, the key features for a loyalty system like program setup, redeem/reward transaction and much more.FeaturesPoint of sale setupLoyalty program setupQR codes generation forHappystamp appCustomer enrollmentCard history with executed transactionsRedeem/reward transactionsMarketing notificationsREST api forHappystamp app…DependenciesHappystamp is designed as a plugin for theMezzaninecontent management platform, and therefore requiresMezzanineto be installed.Django Rest Frameworkis required to provide REST apiQR Codefor QR codes generationDjango storagesis required to support S3 storage for static/media filesInstallationThe easiest way is to install directly from PyPI usingpip:$ pip install django-happystampAdd ‘happystamp’ to the INSTALLED_APPS in your project’s settings.py:INSTALLED_APPS = (
    ...
    "happystamp",
)Add ‘happystamp’ urls by updating your project’s urls.py:urlpatterns = patterns('',
    url(r"^", include('happystamp.urls')),
)Runpython manage.py migrateto create happystamp modelsStart the development server and visithttp://127.0.0.1:8000/admin/to see happystamp objectsTo uninstall Happystmp, simply comment out or remove the ‘happystamp’ line in your INSTALLED_APPS.ContributingHappystmp is an open source project managed using Git. The repository is hosted onGitHub.SupportTo report a security issue, please send an email privately toadmin+security@happystamp.fr.For all other Happystamp support, please send an email toadmin@happystamp.fr.If you’re certain you’ve come across a bug, then please use theGitHub issue tracker.
Package: django-hashcash
django-hashcash===============This project implements http://hashcash.io into the normal Django login form.This is useful in that it may thwart brute force attacks on the login form.Installation------------### 1. Grab the app: `pip install django-hashcash`### 2. Update settings.py````# settings.py...## Install django_hashcash into INSTALLED_APPS#INSTALLED_APPS += ('django_hashcash',)...## Add details you got from https://hashcash.io/#HASHCASHIO_PUBLIC_KEY = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'HASHCASHIO_PRIVATE_KEY = 'PRIVATE-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'...````### 3. Update urls.py````# urls.py...from django_hashcash.forms import HashCashAuthenticationForm...admin.autodiscover()admin.site.login_template = 'django_hashcash/login.html'admin.site.login_form = HashCashAuthenticationForm...````### Done!
Package: django-hashedfilenamestorage
django-hashedfilenamestorageA Django storage backend that names files by hash value.By default,django.core.files.storage.FileSystemStoragedeals with
conflicting filenames by appending an underscore and a random 7
character alphanumeric string to the file. For
instance, if you try to createhello.txtwhen it already exists,
it will rename it as e.g.hello_a12mkj3.txt.django-hashedfilenamestoragecreates hashed filenames, so if you
try to createhello.txtwith the contentHello world!, it will
save it asd3486ae9136e7856bc42212385ea797094475802.txt. Directory
names and extensions are preserved, only the root filename is
changed. This reduces the number of duplicates stored in the
underlying backend, and implies that these files can be served from a
static cache that never expires.InstallingThe easiest way to installdjango-hashedfilenamestorageis to usepip:pip install django-hashedfilenamestorageQuick StartIn your Djangosettingsfile:SetDEFAULT_FILE_STORAGEto'django_hashedfilenamestorage.storage.HashedFilenameFileSystemStorage'This gives you hashed filenames, backed on Django’sFileSystemStoragestorage class.HashedFilenameMetaStorageYou can define a new underlying storage class by usingHashedFilenameMetaStorageto wrap it:from django.core.files.storage import get_storage_class

from django_hashedfilenamestorage.storage import HashedFilenameMetaStorage

HashedFilenameMyStorage = HashedFilenameMetaStorage(
    storage_class=get_storage_class('myapp.storage.MyStorage'),
)Hashing algorithmHashedFilenameMetaStorage is meant to generate duplicate filenames for
files with identical contents. To do this, it reads the contents of
the file and generates a SHA-1 hash of them.Filenames have their extensions preserved, so it is possible to have
duplicate contents on the filesystem, but it is important to help
serve files with their proper content types.
Package: django-hashedpass
django-hashedpassDjango management commands for changing users' hashed passwords.InstallationRequirements: Django >= 2.2, Python >= 3.5.Install:$pipinstalldjango-hashedpassThen, edit your Django project'ssettings.pyfile:INSTALLED_APPS=[# ...'django_hashedpass',# NOTE: underscore (_), not dash (-).# ...]Usagechangehashedpass- Change a user's hashed password.$python3manage.pychangehashedpass'admin''pbkdf2_sha256$150000$yAhqE5ZDGEii$lD5JUoCuz6qRA+BVlvetFPGyGMwLmYl0rCc3awcNYLo='Successfullychangedthehashedpasswordfor"admin".genhashedpass- Generate a hashed password from a plaintext password.$python3manage.pygenhashedpass
Password:
Password(again):
pbkdf2_sha256$150000$ZOTZr0AKGQyW$y6+Bdqwn9UsP/riDoEaMQ9Q17Sw8zZoH1jxmlgy94oA=$python3manage.pygenhashedpass--password'123456'pbkdf2_sha256$150000$AnoGZfdqz6pW$GUGUJR5CggZA4e4JUMdtN8GU1CejLYTKs3PIdOnbF4k=DevelopmentTo run unit tests:python3 ./run_tests.py.Tested on Django 2.22, Python 3.6.8, Ubuntu 18.04.Project started on: 2019-07-21LicenseThis project is distributed under the BSD 3-Clause License (see LICENSE).