Saravanan666/pypi-org huggingface dataset:
Package: django-include-strip-tag
# django-include-strip-tagA new “include_strip” template tag for Django## IntroductionThis new templatetag,include_strip, works exactly the same as the defaultincludetemplate tag provided by Django.The only difference is that thestripmethod is applied to the result, to remove leading and trailing spaces.The aim is to remove the unwanted space added in text when including a template that just return some text.## Installationdjango-include-strip-tagis available on Pypi:` pip installdjango-include-strip-tag`Or you can find it on github:https://github.com/twidi/django-include-strip-tagWhen installed, just addinclude_strip_tagto yourINSTALLED_APPSin thesettings.pyfile of your django project.## UsageSimply add the tags library in your template, and useinclude_stripinstead ofincludewhen needed:`django {% load include_strip %} Hello {% include_strip "user.html %}, how are you today ? `## Why ?Considering the “user.html” template:`django SomeUserName `In the previous template (in “Usage”), without this new templatetag, the result would be:` Hello SomeUSerName , how are you today ? `Withinclude_strip, we have:` Hello SomeUSerName, how are you today ? `Notice the difference between the username and the coma… It’s because the newline at the end of the included template is kept when the result is added to the parent template.So theinclude_stripapply thestripmethod (on the result, which is a string) to remove it.It can also help if your included template starts with a line dedicated to load tags libraries :`django {% load somelibrary %}add-something-here`With the first line having no content rendered, but include a newline, we have this newline in the final template## Licensedjango-include-strip-tagis published under the MIT License (see the LICENSE file)
Package: django-inclusion-block-tag
Your project description goes hereDocumentation…The full documentation is athttps://django-inclusion-block-tag.readthedocs.io.QuickstartInstall django-inclusion-block-tag:pip install django-inclusion-block-tagAdd it to yourINSTALLED_APPS:INSTALLED_APPS=(...'inclusion_block_tag.apps.InclusionBlockTagConfig',...)See test_tags.py.FeaturesTODORunning TestsDoes the code actually work?source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ toxCreditsTools used in rendering this package:Cookiecuttercookiecutter-djangopackageHistory0.1.0 (2019-04-12)First release on PyPI.
Package: django-indices
Create JSON Indexes concurrentlyThe functionality provided by this Django App is similar to theindexes,
except that it provides an option to create indexesconcurrently.Currently, only Postgres JSON Indexes are supported.InstallationInstall the latest version using pip:pipinstalldjango_indicesAdddjango_indicestoINSTALLED_APPSin the django settings file:INSTALLED_APPS=(...,"django_indices",)Run the migrations:pythonmanage.pymigratedjango_indicesAdd the indices you want to theMetaclass of the required Model. Then run
themigrate_indicesmanagement command to add / remove the indices:pythonmanage.pymigrate_indicesExamplefromdjango.dbimportmodelsfromdjango.db.modelsimportQfromdjango.contrib.postgres.fieldsimportJSONFieldfromdjango_indicesimportJSONIndexclassInventory(models.Model):data=JSONField()classMeta:indices=[# Creates an index on data->'product_type'# Indexes are created concurrently by default, which doesn't lock# the table.JSONIndex(field=["data","product_type"],name="idx_inventory_product_type",),# Creates a unique index on data->'product'->>'id'## concurrently=False ensures that the index creation will execute# in a transaction. So the index is either created successfully,# or fails cleanly. This will lock the table though.JSONIndex(field=["data","product","id"],name="idx_inventory_product_id",unique=True,concurrently=False,),# Creates a partial compound index on# (data->'product'->>'brand', data->'product'->>'size')# WHERE data->>'product_type' = 'shoe' OR data->>'product_type' = 'crocs'JSONIndex(field=(["data","product","brand"],["data","product","size"]),name="idx_inventory_footwear_brand_size",where=(Q(data__product_type="shoe")|Q(data__product_type="crocs"),),]
Package: django-indo
Auto load field data on change of other field value in django admin with Ajax callRequirementsDjango 2.0+Installationpipinstalldjango-indoAddindotoINSTALLED_APPS:INSTALLED_APPS=[...'indo',...]Example usagefromindo.adminimportIndoResponseMixin,IndoSetFieldMixin@admin.register(Customer)classCustomerAdmin(IndoResponseMixin,admin.ModelAdmin):fields=('name','address',)@admin.register(Order)classOrderAdmin(IndoSetFieldMixin,admin.ModelAdmin):fields=('customer','delivery_address',)indo_fields={'delivery_address':'customer__address'}
Package: django-indy-community
Indy Community is a simple Django framework for building
Hyperledger Indy Agent enabled web applications.
Detailed documentation is in the “docs” directory.Please seehttps://github.com/AnonSolutions/django-indy-communityfor detailed docmentationQuick startYou can find a basic Indy Community application herehttps://github.com/AnonSolutions/indy-community-demoTo add indy_community to your own django application:Copy the requirements.txt file into your application directory and install requirementsAdd “indy_community” to your INSTALLED_APPS setting like this:INSTALLED_APPS=[# this should go first'indy_community.apps.IndyCoreConfig',...]Add the following Indy configuration settings (this is for a local install):importplatformdeffile_ext():ifplatform.system()=='Linux':return'.so'elifplatform.system()=='Darwin':return'.dylib'elifplatform.system()=='Windows':return'.dll'else:return'.so'INDY_CONFIG={'storage_dll':'libindystrgpostgres'+file_ext(),'storage_entrypoint':'postgresstorage_init','payment_dll':'libnullpay'+file_ext(),'payment_entrypoint':'nullpay_init','wallet_config':{'id':'','storage_type':'postgres_storage'},'wallet_credentials':{'key':''},'storage_config':{'url':'localhost:5432'},'storage_credentials':{'account':'postgres','password':'mysecretpassword','admin_account':'postgres','admin_password':'mysecretpassword'},'vcx_agency_url':'http://localhost:8080','vcx_agency_did':'VsKV7grR1BUE29mG2Fm2kX','vcx_agency_verkey':'Hezce2UWMZ3wUhVkh2LfKSs8nDzWwzs2Win7EzNN3YaR','vcx_payment_method':'null','vcx_enterprise_seed':'000000000000000000000000Trustee1','vcx_institution_seed':'00000000000000000000000000000000','vcx_genesis_path':'/tmp/atria-genesis.txt','register_dids':True,'ledger_url':'http://localhost:9000',}Configure background tasks:INSTALLED_APPS=[...'background_task',...]BACKGROUND_TASK_RUN_ASYNC=FalseBACKGROUND_TASK_ASYNC_THREADS=1MAX_ATTEMPTS=1Ensure your local templates are loaded first:TEMPLATES=[{...'DIRS':[os.path.join(BASE_DIR,'<your app>/templates'),],...},]Override User, Organization and Relationship models, if you have your own subclass of these models:AUTH_USER_MODEL='indy_community.IndyUser'INDY_ORGANIZATION_MODEL='indy_community.IndyOrganization'INDY_ORG_RELATION_MODEL='indy_community.IndyOrgRelationship'Include the indy URLconf in your project urls.py like this:path('indy/',include('indy_community.urls')),Ensure you have all pre-requisites running, as per django-indy-community docsRunpython manage.py migrateto create the indy models.Runpython manage.py runserverand connect tohttp://localhost:8000/indy`You can customize the UI and add event handling for VCX Connection and Messaging events.  See the demos inhttps://github.com/AnonSolutions/indy-community-demofor examples of how to do this.View detailed documentation in the Docs directory (https://github.com/AnonSolutions/django-indy-community)
Package: django-inertia
django-inertiaDjango server-side new adapter forInertia.js.Getting StartedInstall the packagepip install django-inertiaConfigure your projectAdd the packagedjango_inertiato your project (if you want to use the template tag else
it's not necessary).AddInertiaMiddlewareto your project middlewares:MIDDLEWARES=[#...,"django_inertia.middleware.InertiaMiddleware",]Creating responsesTo create and inertia response you need to useInertia.render()method:fromdjango_inertiaimportInertiadefevent_detail(request,id):event=Event.objects.get(pk=id)props={'event':{'id':event.id,'title':event.title,'start_date':event.start_date,'description':event.description}}returnInertia.render(request,"Event/Show",props)Loading data into your template{%loadinertia_tags%}{%loadstatic%}<!DOCTYPE html><htmlclass="h-full bg-gray-200"><head><metacharset="utf-8"/><metaname="viewport"content="width=device-width, initial-scale=1.0, maximum-scale=1.0"/><scriptsrc="{%static'dist/app.js'%}"defer></script><linkhref="{%static'dist/app.css'%}"rel="stylesheet"/></head><body>{%inertia%}</body></html>Full documentationTODOInertia.share()Inertia.render()Inertia.version()Inertia.get_version()Inertia.flush_shared()Inertia.lazy()Inertia.static()CreditsThanks toAndres Vargasfor the inspiration on this package. Here is
the link to its legacy package which seems not be actively maintained anymore:inertia-djangoContributingTODOMaintainersSamuel GirardinLicensedjango-inertia is open-sourced software licensed under theMIT license.
Package: django-inet
django-inetdjango internet utilitiesProvidesASNField()IPAddressField(version=None)IPNetworkField(version=None)MacAddressField()IPPrefixFieldhas been renamed toIPNetworkFieldto conform with other python package names (likeipaddress).Addresses and Prefixes are stored and strings and converted to ipaddress.IPv{4,6}{Address,Prefix} classes.Version can be set to 4 or 6 to force a version, or left as None to use
either.QuickstartInstall django-inetpipinstalldjango-inetThen use it in a projectimportdjango_inetLicenseCopyright 2014-2021 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-infinite-icons
Django-infinite-icons will help you to render SVG icons in your template
& you can alter its width ,height and viewport without hassle.This project is inspired byFeatherIconsand the authorcolebmis.Installationyou can get django-infinite-icons by using pip.$pipinstalldjango-infinite-iconsTo enable widget_tweaks in your project you need to add it to
INSTALLED_APPS in your projects settings.py file:INSTALLED_APPS=[...'django_infinite_icons',...]Example Usage for SVG render{% load infinite %}

{% icon_render 'activity.svg' width='45' %}
{% icon_render 'activity.svg' height='45' width='45' %}
{% icon_render 'activity.svg' height='45' width='45' viewbox='0 0 20 20' %}Example Usage load as static file{% load infinite %}

{% icon_render 'activity.svg' %}LicenseMIT
Package: django-infinite-memcached
A Django memcached backend to handle “infinite” timeouts (i.e., never
expire an item).Installation$ pip installdjango-infinite-memcachedSetinfinite_memcached.cache.MemcachedCacheas your cache backend:CACHES = {
    "default": {
        "BACKEND": "infinite_memcached.cache.MemcachedCache",
        "LOCATION": "127.0.0.1:11211",
    },
}How to useEither set theTIMEOUToption to 0:CACHES = {
    "default": {
        "BACKEND": "infinite_memcached.cache.MemcachedCache",
        "LOCATION": "127.0.0.1:11211",
        "TIMEOUT": 0,
    },
}Or passtimeout=0to thelow-level cache commands(e.g., set, add, etc.) to keep things from expiring.Why?Django’s default memcached backend doesn’t accept timeout values of
zero, instead using the default timeout (five minutes) when zero is passed.This cache backend overrides how timeouts are calculated so any
timeout of zero is passed directly to memcached, telling memcached to
never expire an item.This has been anknown issuefor awhile, but
concerns over backwards compatibility have prevented any fixes from
taking place.LicenseBSD. See LICENSE.txt.
Package: django-infinite-pagination
This is a very simple helper for Django 1.4 that does one thing: efficiently
paginates large object collections on systems where using standard Django
Paginator is impractical because of significantcount(*)query
overhead (i.e. PostgreSQL).Under the hood it uses a single query to retrieve objects for the current page
and check for availability of a successive page.TheInfinitePaginatoris a replacement for Djangodjango.core.paginator.Paginator.Quick StartIncludedjango-infinite-paginationin your requirements file
(orpip installdjango-infinite-pagination) and addinfinite_paginationtoINSTALLED APPS.Then set thepaginator_classattribute of yourListView-based view toInfinitePaginatorand specifypaginate_byattribute:class ArticleListView(ListView):
    model = Article
    paginate_by = 10
    paginator_class = InfinitePaginatorTo display pagination links in a template load theinfinite_paginationtemplate tags and put{% paginate %}in the place you would like the
pagination links to show up:{% load infinite_pagination %}

{% for object in object_list %}
    {{ object }}
{% endfor %}

{% paginate %}A genericpagination/infinite_pagination.htmltemplate that works well with
Twitter Bootstrap stylesheet is provided by this application. Adjust it to your
requirements.Paginating in TemplatesSometimes application views cannot be modified and the pagination can only be
done at the template level. Theautopaginatetemplate tag is provided
as a last resort of applying pagination to object lists inside templates:{% load infinite_pagination %}

{% autopaginate object_list per_page=10 as paginated_list %}

{% for object in paginated_list %}
    {{ object }}
{% endfor %}

{% paginate %}Theautopaginatetag takes a queryset and a number of items per page
as input and returns a page slice for displaying in a template. Current page
number is retrieved from template context orpagerequest GET params.
It can also be specified as an optional tag param:{% autopaginate object_list per_page=10 page=2 as paginated_list %}The tag also setspaginatorandpage_objtemplate context variables for
thepaginatetag that uses them to render navigation links.Licensedjango-infinite-paginationis released under the BSD license.Other ResourcesGitHub repositoryPyPi Package site
Package: django-infinite-pagination-mega
This is a very simple helper for Django 1.4 that does one thing: efficiently
paginates large object collections on systems where using standard Django
Paginator is impractical because of significantcount(*)query
overhead (i.e. PostgreSQL).Under the hood it uses a single query to retrieve objects for the current page
and check for availability of a successive page.TheInfinitePaginatoris a replacement for Djangodjango.core.paginator.Paginator.Quick StartIncludedjango-infinite-paginationin your requirements file
(orpip installdjango-infinite-pagination) and addinfinite_paginationtoINSTALLED APPS.Then set thepaginator_classattribute of yourListView-based view toInfinitePaginatorand specifypaginate_byattribute:class ArticleListView(ListView):
    model = Article
    paginate_by = 10
    paginator_class = InfinitePaginatorTo display pagination links in a template load theinfinite_paginationtemplate tags and put{% paginate %}in the place you would like the
pagination links to show up:{% load infinite_pagination %}

{% for object in object_list %}
    {{ object }}
{% endfor %}

{% paginate %}A genericpagination/infinite_pagination.htmltemplate that works well with
Twitter Bootstrap stylesheet is provided by this application. Adjust it to your
requirements.Paginating in TemplatesSometimes application views cannot be modified and the pagination can only be
done at the template level. Theautopaginatetemplate tag is provided
as a last resort of applying pagination to object lists inside templates:{% load infinite_pagination %}

{% autopaginate object_list per_page=10 as paginated_list %}

{% for object in paginated_list %}
    {{ object }}
{% endfor %}

{% paginate %}Theautopaginatetag takes a queryset and a number of items per page
as input and returns a page slice for displaying in a template. Current page
number is retrieved from template context orpagerequest GET params.
It can also be specified as an optional tag param:{% autopaginate object_list per_page=10 page=2 as paginated_list %}The tag also setspaginatorandpage_objtemplate context variables for
thepaginatetag that uses them to render navigation links.Licensedjango-infinite-paginationis released under the BSD license.Other ResourcesGitHub repositoryPyPi Package site
Package: django-infinite-scroll
django-infinite-scrollAdd infinite scroll to any django app.Features- Allows to add infinite scroll to any page.
- Easy pagination.
- Works with Django's Queryset or any kind of lists.
- Requires no aditional javascript framework.
- Easy to install and set up.QuicksetupWith docker compose:gitclonehttps://github.com/gsteixeira/django-infinite-scroll.gitcddjango-infinite-scroll/example/docker-composeupGo tohttp://localhost:8000and try it out. 8)installationInstall module.pipinstalldjango-infinite-scrollAdd to settings.pyINSTALLED_APPS=[# ...'infscroll',]First, let's make a view that will load the dynamic content:frominfscroll.viewsimportmore_itemsdefmore(request):# This is the list that will be paginated.list_items=MyModel.objects.all()returnmore_items(request,list_items,# (optional) your custom templatetemplate='more.html')Add it to urls.pypath('more/',myapp.views.more,name='more'),Finally, Add to the view you want to show the infinite scroll:frominfscroll.utilsimportget_paginationdefmy_view(request):# The list of items to be paginated. It can be any list of queryset.list_items=MyModel.objects.all()paginated=get_pagination(request,list_items)# we must declare the url where it will load more stuffdata={'more_posts_url':reverse('more'),}# update with paginated infodata.update(paginated)returnrender(request,'my_view.html',data)Now add to your template:{% load infinite_scroll %}<html><body><p>Hello</p><!-- The dynamically loaded items will show here -->{% infinite_scroll_box %}<!-- This can go in the end of the template. Will load css and js -->{% set_infinite_scroll %}</body></html>Now go to the page of "my_view", and you should have infinite scroll!(optional) If you want to use a custom "load_more" templateHere is an example:{% load infinite_scroll %}
    {% for item in feed %}
        {{ item }}
    {% endfor %}
    {% infinite_scroll_tags %}Just add thisfor loopto iterate the list and include the scroll tagsSettingsPAGINATION_STEPS - the amount of items each step will load. Default to 10.Requirements- python3
- django
Package: django-influx-logs
Django Influx LogsPut your application logs into InfluxDBInstallpip install django-influx-logsSettingsINFLUX_LOGS_ENABLE = True
INFLUX_LOGS_HOST = "localhost"
INFLUX_LOGS_PORT = 8086
INFLUX_LOGS_USERNAME = "my_user"
INFLUX_LOGS_PASSWORD = "mu_psw"
INFLUX_LOGS_DATABASE = "my_db"Usage exampleclass SomeDownloadView(View):

    def log_download_action(self, filename):
        tags = {"env_name": "staging"}
        log_action(
            actor=self.request.user.email,
            verb="downloaded",
            action_object=filename,
            tags=tags,
        )

    def get(self):
        # At some point here, we want to log the user's action
        self.log_download_action(filename="my-file.txt")
Package: django-info
django_info===========Django application to display useful information about a Django project. Something like php_info()Requirements=========* Python >= 2.5* Django >= 1.0How to install========Via pip install:> pip install django_infoor, manually:* Add  'django_info' to INSTALLED_APPS* Add  url(r'^django/', include('django_info.urls')) to the global urls.py* Visit the url /django/info/
Package: django-infoNavigator
===infoNavigator===infoNavigator takes your models and makes denormalized tables for all of them so that internal users can explore themQuick start-----------1. Add "infoNavigator" to your INSTALLED_APPS setting like this::INSTALLED_APPS = (...'infoNavigator',)2. Get a url to all those models within your django project like this:from infoNavigator.views import RecordsViewurl(r'^navigate/', RecordsView(models.Keyword, models.SICCode, models.NAICSCode,models.OSHA170Form, models.ReportingJurisdiction,models.Accident, models.AccidentAbstract,models.AccidentInjury, models.Inspection,models.OptionalInspectionInfo, models.RelatedActivity,models.StrategicCode, models.Violation,models.ViolationEvent,models.ViolationGeneralDuty).as_view()),3. Visit the url you set up
Package: django-informer
Django Informer==============.. image:: https://img.shields.io/travis/rodrigobraga/informer.svg:alt: Travis CI Status:target: https://travis-ci.org/rodrigobraga/informer.. image:: https://coveralls.io/repos/rodrigobraga/informer/badge.svg?branch=master&service=github:alt: Coverage status:target: https://coveralls.io/github/rodrigobraga/informer?branch=master.. image:: https://img.shields.io/pypi/v/django-informer.svg:alt: PyPi page:target: https://pypi.python.org/pypi/django-informer.. image:: https://img.shields.io/pypi/l/django-informer.svg:alt: License MIT:target: https://github.com/rodrigobraga/informer/blob/master/LICENSEA pluggable app to monitoring your own infrastructure and third party services.Quick Start-----------------Below a quick guide to install and run, more detailed documentation is in the `docs <docs>`_ directory.Install Django Informer-----------------::pip install django_informerAdd to your INSTALLED_APPS-----------------::INSTALLED_APPS = (...'informer',)Set informers on settings-----------------::DJANGO_INFORMERS = (('informer.checker.database', 'DatabaseInformer'),('informer.checker.database', 'PostgresInformer'),('informer.checker.storage', 'StorageInformer'),('informer.checker.celery', 'CeleryInformer'),('informer.checker.cache', 'CacheInformer'),)Set interval (in minutes) between the saved results-----------------::DJANGO_INFORMER_PREVENT_SAVE_UNTIL = 5 # default is NoneInclude the URLconf in your project urls.py-----------------::url(r'^informer/', include('informer.urls')),Run migrate to create the informer models-----------------::python manage.py makemigrationspython manage.py migrateCopy static presentation files-----------------::python manage.py collectstaticTests-----------------::py.test testsRun-----------------Start the development server and visit http://server:port/informer/ to view monitoring results... _doc: https://github.com/rodrigobraga/informer/tree/master/docs
Package: django-informixdb-vault
Extends the database driver for Djangodjango_informixdbto retrieve credentials from a Hashicorp Vault service.AssumptionsThis driver expects the credentials to be stored in a KV v2 secret in Vault, as keysusernameandpassword.Supported AuthenticationTwo methods, with highest priority first:
- K8s JWT
- Basic TokenSettings RequiredDo not provideUSERandPASSWORD.  Instead provide these settings:SettingRequiredDescriptionVAULT_ADDRYesThe HTTPS endpoint for VaultVAULT_PATHYesThe path in Vault to the KV v2 secret storing the Informix credentialsVAULT_K8S_AUTH_MOUNT_POINTNoThe Vault mount point to use for Kubernetes authentication, default value:kubernetesVAULT_K8S_JWTNoThe path to the JWT in a K8s container, default vault:/var/run/secrets/kubernetes.io/serviceaccount/tokenVAULT_K8S_ROLEConditionalProvide the K8s roleifusing K8s JWT authentication to VaultVAULT_KVV2_MOUNT_POINTNoThe Vault mount point to use for KVv2 secrets, default value:secretVAULT_TOKENConditionalProvide the tokenifusing basic token authentication to Vault
Package: django-infosessions
Forked fromhttps://github.com/martinrusev/django-redis-sessionsQuick startAdd “infosessions” to your INSTALLED_APPS setting like this:INSTALLED_APPS = (
    ...
    'infosessions',
)Configure django to use infosessions as session engineSESSION_ENGINE = 'infosessions.session'Add middleware to capture session informationMIDDLEWARE_CLASSES = (
    ...
    'infosessions.middlewares.SessionSyncMiddleware',
)Runpython manage.py migrate infosessionsto create the models.