Saravanan666/pypi-org huggingface dataset:
Package: django-debug-toolbar-line-profiling
TheDjango Debug Toolbaris a configurable set of panels that display various
debug information about the current request/response and when clicked, display
more details about the panel’s content.This package provides a panel that incorporates output fromline_profilerThis panel will only function with django_debug_toolbar>=1.0, before that it’s functionality
was contained in the debug_toolbar.panels.profiling.ProfilingPanel.This Django Debug Toolbar panel is released under the BSD license, like Django
and the Django Debug Toolbar. If you like it, please consider contributing!The Django Debug Toolbar was originally created by Rob Hudson
in August 2008 and was further developed by many contributors.InstallationTo install the line_profiler panel, first install this package withpip installdjango-debug-toolbar-line-profiling, then add debug_toolbar_line_profiler to the INSTALLED_APPS:INSTALLED_APPS = (
    ...
    'debug_toolbar_line_profiler',
)and add the panel to DEBUG_TOOLBAR_PANELS:DEBUG_TOOLBAR_PANELS = (
    ...
    'debug_toolbar_line_profiler.panel.ProfilingPanel',
)ConfigurationBy default, the panel will profile your view function. If you use class based views
the panel will profile all functions on the class that don’t start with _. If you
want additional code to be profiled, add the @profile_additional decorator like so:from debug_toolbar_line_profiler import profile_additional
from boto.s3.connection import S3Connection

...

@profile_additional(S3Connection.make_request)
def your_view_code(*args, **kwargs):
    ...SignalsThere is also a signal (debug_toolbar_line_profiler.signals.profiler_setup) that
you can attach to for integrating class based views like django rest framework.Here is an example:from rest_framework.viewsets import ViewSet
from rest_framework.response import Response
from debug_toolbar_line_profiler import signals


class AViewSet(ViewSet):
    def list(self, request):
        return Response([])

    def retrieve(self, request, pk=None):
        return Response({})


def register_profile_views(sender, profiler, **kwargs):
    profiler.add_function(AViewSet.list)
    profiler.add_function(AViewSet.retrieve)


signals.profiler_setup.connect(register_profile_views,
                               dispatch_uid='register_profile_views')
Package: django-debug-toolbar-mongo
Info:An extension panel for Rob Hudson’s Django Debug Toolbar that adds
MongoDB debugging informationAuthor:Harry Marr (http://github.com/hmarr,http://twitter.com/harrymarr)SetupAdd the following lines to yoursettings.py:INSTALLED_APPS = (
    ...
    'debug_toolbar_mongo',
    ...
)

DEBUG_TOOLBAR_PANELS = (
    ...
    'debug_toolbar_mongo.panel.MongoDebugPanel',
    ...
)An extra panel titled “MongoDB” should appear in your debug toolbar.Note that this should work with any Django application that uses PyMongo.Obtaining stack traces can slow down queries significantly. To turn them off
add the following lines to yoursettings.py:DEBUG_TOOLBAR_MONGO_STACKTRACES = FalseDisclaimer: only tested in latest Chrome, may fall to pieces in other browers.
If you feel like fixing it, contributions are welcome!
Package: django-debug-toolbar-multilang
Django-debug-toolbar-multilangDjango-debug-toolbar-multilang aims to help you internationalize and
localized Django apps. It adds a “Language” panel to the toolbar and
shows you the current language as well as all available languages. It
also lets you quickly change the language to the selected one.Screenshotspanel preview1InstallThe recommended way to install djdt-multilang is by using pip:pip install django-debug-toolbar-multilangIf you’d like to test an upcoming release, use instead:pip install -e git+https://github.com/Matt3o12/django-debug-toolbar-multilang#egg=django-debug-toolbar-multilangNext, you will need to add djdt-multilang to adddebug_toolbar_multilang.panels.multilang.MultiLangPaneltoDEBUG_TOOLBAR_PANELSanddebug_toolbar_multilangtoINSTALLED_APPS:DEBUG_TOOLBAR_PANELS = [
    ...
    'debug_toolbar_multilang.panels.multilang.MultiLangPanel',
]

INSTALLED_APPS = [
    ...
    'debug_toolbar_multilang'
]If you haven’t already set,DEBUG_TOOLBAR_PANELSmake sure not to
forgetthe
defaults:DEBUG_TOOLBAR_PANELS = [
    'debug_toolbar.panels.versions.VersionsPanel',
    'debug_toolbar.panels.timer.TimerPanel',
    'debug_toolbar.panels.settings.SettingsPanel',
    'debug_toolbar.panels.headers.HeadersPanel',
    'debug_toolbar.panels.request.RequestPanel',
    'debug_toolbar.panels.sql.SQLPanel',
    'debug_toolbar.panels.staticfiles.StaticFilesPanel',
    'debug_toolbar.panels.templates.TemplatesPanel',
    'debug_toolbar.panels.cache.CachePanel',
    'debug_toolbar.panels.signals.SignalsPanel',
    'debug_toolbar.panels.logging.LoggingPanel',
    'debug_toolbar.panels.redirects.RedirectsPanel',
    'debug_toolbar_multilang.panels.multilang.MultiLangPanel',
]You will also need to enable theLocale
middleware.
Package: django-debug-toolbar-request-history
Update: History is now built into Django Debug ToolbarSince version3.0of Django Debug Toolbar a built in history panel is available. More details can be found in thisPRand thedocs. As this functionality is being provided by the toolbar itself there will likely not be any further updates to this project (though if there are good reasons for an exception like supporting older versions of the toolbar it will be considered). Thanks to all those who've contributed to and used this project.Request History Panel for Django Debug ToolbarAdds a request history panel toDjango Debug Toolbarfor viewing stats for different requests (with the option for ajax support).Installpipinstalldjango-debug-toolbar-request-historyThen add the panel toDEBUG_TOOLBAR_PANELS(see the config section for more details).Note: only Django Debug Toolbar versions 2.0 and higher are now supported. For older versions try:pipinstalldjango-debug-toolbar-request-history==0.0.11or for the development version:pipinstall-egit+https://github.com/djsutho/django-debug-toolbar-request-history.git#egg=django-debug-toolbar-request-historyUsageClick on the "Request History" panel in the toolbar to load the available requestsClick on the request you are interested in (on the "Time" or "Path" part of the request) to load the toolbar for that requestNotesDue to django-debug-toolbar reliance on thread-local:currently requests do not survive server reload, therefore, when using the dev server old requests will not be available after a code change is loadedif you get inconsistent request history each time you click on the panel, lower your server threads to 1Config (in settings.py)ToDEBUG_TOOLBAR_PANELSadd'ddt_request_history.panels.request_history.RequestHistoryPanel'e.g.:DEBUG_TOOLBAR_PANELS=['ddt_request_history.panels.request_history.RequestHistoryPanel',# Here it is'debug_toolbar.panels.versions.VersionsPanel','debug_toolbar.panels.timer.TimerPanel','debug_toolbar.panels.settings.SettingsPanel','debug_toolbar.panels.headers.HeadersPanel','debug_toolbar.panels.request.RequestPanel','debug_toolbar.panels.sql.SQLPanel','debug_toolbar.panels.templates.TemplatesPanel','debug_toolbar.panels.staticfiles.StaticFilesPanel','debug_toolbar.panels.cache.CachePanel','debug_toolbar.panels.signals.SignalsPanel','debug_toolbar.panels.logging.LoggingPanel','debug_toolbar.panels.redirects.RedirectsPanel','debug_toolbar.panels.profiling.ProfilingPanel',]To change the number of stored requests addRESULTS_STORE_SIZEtoDEBUG_TOOLBAR_CONFIGe.g.:DEBUG_TOOLBAR_CONFIG={'RESULTS_STORE_SIZE':100,}TODOClean-upChange the storage to survive server reloads (maybe use cache or session).Add tests
Package: django-debug-toolbar-sqlalchemy
Django Debug Toolbar SQLAlchemySQLAlchemy query information panel for Django Debug Toolbar.SetupOnce the package is installed you'll want to add the module to your installed apps:INSTALLED_APPS = (
	...
	'debug_toolbar_sqlalchemy',
	...
)

DEBUG_TOOLBAR_PANELS = (
	...
	'debug_toolbar_sqlalchemy.panel.SqlAlchemyDebugPanel',
	...
)The only optional setting there is to modify isDEBUG_TOOLBAR_SQLALCHEMY_SLOW_QUERY_TIMEwhich defines the cutoff in milliseconds for which queries will be marked as being slow.LicenseThis project is licensed on the GPLv3 license. The full license can be found in the LICENSE file.
Package: django-debug-toolbar-template-flamegraph
# django-debug-toolbar-template-flamegraphThis provides a Django Debug Toolbar panel which generates a [Flame Graph](http://www.brendangregg.com/flamegraphs.html) for the rendering of a template.It is probably worth using in conjunction with the [Template Profiler](https://github.com/node13h/django-debug-toolbar-template-profiler) and/or [Template Timings](https://github.com/orf/django-debug-toolbar-template-timings) panels.It borrows a lot from 23andMe’s [DjDT Flame Graph](https://github.com/23andMe/djdt-flamegraph).## SetupInstalldjango-debug-toolbar-template-flamegraphviapipAdd‘template_flamegraph’toINSTALLED_APPSAdd‘template_flamegraph.TemplateFlamegraphPanel’toDEBUG_TOOLBAR_PANELS
Package: django-debug-toolbar-template-profiler
An extra panel fordjango-debug-toolbarthat displays time spent rendering each template.For example:InstallationFirst, you’ll need to install and configure django-debug-toolbar as per itsinstallation instructions.Second, install this package:pipinstalldjango-debug-toolbar-template-profilerThird, add it to your installed apps - order doesn’t matter but afterdebug_toolbarwill keep it neatly grouped:INSTALLED_APPS=[# ..."debug_toolbar","template_profiler_panel",# ...]Fourth, configure django-debug-toolbar’sDEBUG_TOOLBAR_PANELSsettingas per its documentationto include the panel. You’ll need to copy the default and add the panel at the
end:DEBUG_TOOLBAR_PANELS=[# ..."template_profiler_panel.panels.template.TemplateProfilerPanel",]After this, you should see the “Template Profiler” panel when you load the
toolbar. Both Django and Jinja2 templaterender()calls will be measured.
Package: django-debug-toolbar-template-timings
Template-timings is a panel for Django Debug Toolbar that gives an in-dept breakdown of the time it takes to render your Django templates (including templates included via{% extends %}and{% include %}).Template-timings supports Django 1.8 and below, Django 1.9 and above do not work at the moment.InstallInstall via pip (pip installdjango-debug-toolbar-template-timings) then add'template_timings_panel.panels.TemplateTimings.TemplateTimings'to yourDEBUG_TOOLBAR_PANELSsetting, and add'template_timings_panel'to yourINSTALLED_APPS:# http://django-debug-toolbar.readthedocs.org/en/latest/configuration.html#debug-toolbar-panelsDEBUG_TOOLBAR_PANELS=[...'template_timings_panel.panels.TemplateTimings.TemplateTimings',]INSTALLED_APPS=[...'template_timings_panel']ScreenshotFrequently asked questionsHow much overhead does this add?In my experience this panel adds about 10% overhead. The panel uses the standard SQLPanel that ships with debug-toolbar to handle the SQL timings, so if you disable that the overhead will decrease and you can still see the render times.The SQL count is different from the SQLPanel?SQLPanel countsallqueries that are executed, wherease this panel only counts queries that are executed while rendering a template.ConfigurationConfiguration is optional. There is currently only one setting you can configure (the values below are the default):IGNORED_TEMPLATES=["debug_toolbar/*"]# Ignore these templates from the output
Package: django-debug-toolbar-vcs-info
ADjango Debug Toolbarpanel to show VCS infoSupported python versions2.6, 3.2, 3.3, 3.4, 3.5Supported django versions1.7 - 1.10Supported VCSgitInstallationUsepip$ pip install django-debug-toolbar-vcs-infoAddvcs_info_panelintoINSTALL_APPSinsettings.pyfileINSTALLED_APPS+=('vcs_info_panel',)Add the panel you want to use. currently, you can useGitInfoPanelonly.DEBUG_TOOLBAR_PANELS=(...'vcs_info_panel.panels.GitInfoPanel',)Authorgiginet <giginet.net@gmail.com>LICENSEMIT License
Package: django-decide-host
django-decide-hostDecide is an event-driven state-machine framework for running behavioral experiments with embeddable computers like the Beaglebone Black. This repository is a Django app that collates event and trial data from multiple devices runningdecideversion 3.0 or later. It replacesdecide-host, which was a bit snazzier but becoming very difficult to maintain.This should more or less be working but should be considered beta. You should continue to save trial information locally.This software is licensed for you to use under the Gnu Public License, version 3. See COPYING for detailsQuick startInstall the package from source:python setup.py install. Worth putting in a virtualenv.Adddecide_hostto your INSTALLED_APPS setting like this:INSTALLED_APPS=(...'decide_host.apps.DecideHostConfig',)You'll also need to addrest_frameworkanddjango_filters.Include the decide_host URLconf in your project urls.py like this::url(r'^decide_host/',include(decide_host.urls')),Runpython manage.py migrateto create the database tables.Start the development server and point your browser tohttp://127.0.0.1:8000/decide-host/api/to view records and inspect the API.Importing trial dataIf you have trial data in jsonl files that you'd like you import into the database, you can do this very easily. From your project site, runmanage.py import_trials -n <name> -a <addr> trials.jsonl. You need to supply the name of the controller (addr) and the procedure (name). The import will not happen if there's a duplicate in the database, so no need to worry about this.Combining duplicate subjectsSubject names are set with user input, so there may be multiple records in the database that correspond to the same subject. To combine these records, runmanage.py merge_subjects <to_keep> <to_combine>. Multiple names can be give for<to_combine>. It's easy to mess the database up badly doing this so be sure to take a snapshot!
Package: django-declarative-apis
Overviewdjango-declarative-apis is a framework built on top of Django aimed at teams implementing RESTful APis. It provides a simple interface to define endpoints declaratively. Some benefits to using django-declarative-apis:Define endpoints declarativelyDefine model-bound and unbound resource endpoints with a consistent interfaceOAuth 1.0a authentication out of the boxDefine resource and endpoint-bound tasks, promoting modularityDefine synchronous and asynchronous tasks (asynchronous tasks implemented with Celery)Separation of concerns between request body processing and business logicQuick startThis guide is intended to demonstrate the bare minimum in order to get a django-declarative-apis project up and running. The example directory contains further examples using endpoint to model relationships, authentication and response attribute filtering.Create django app./manage startapp myappAdd app to INSTALLED_APPSINSTALLED_APPS=['django_declarative_apis','myapp',]Add required configDECLARATIVE_ENDPOINT_RESOURCE_ADAPTER='django_declarative_apis.adapters.EndpointResource'DECLARATIVE_ENDPOINT_AUTHENTICATION_HANDLERS='django_declarative_apis.authentication.oauthlib.oauth1.TwoLeggedOauth1'myapp/urls.pyfromdjango_declarative_apisimportadaptersimportmyapp.resourcesclassNoAuth:@staticmethoddefis_authenticated(request):returnTrueurlpatterns=[url(r'^ping$',adapters.resource_adapter(get=myapp.resources.PingDefinition,authentication=NoAuth)),]myproject/myproject/urls.pyfromdjango.conf.urlsimporturl,includeimportmyapp.urlsurlpatterns=[url(r'^',include(myapp.urls)),]myapp/resources.pyfromdjango_declarative_apisimportmachineryclassPingDefinition(machinery.BaseEndpointDefinition):defis_authorized(self):returnTrue@propertydefresource(self):return{'ping':'pong'}
Package: django-decorator-include
Include Django URL patterns with decorators.Maintained by Stéphane “Twidi” Angel, and Jon Dufresne onhttps://github.com/twidi/django-decorator-includebased on the original work from Jeff Kistler onhttps://github.com/jeffkistler/django-decorator-include.InstallationAssuming you have pip installed, run the following command to install from
PyPI:pip install django-decorator-includeUsagedecorator_includeis intended for use in URL confs as a replacement for thedjango.conf.urls.includefunction. It works in almost the same way asincludehowever the first argument should be either a decorator or an
iterable of decorators to apply to all included views (if an iterable, the order of the
decorators is the order in which the functions will be applied on the views).
Herei s an example URL conf:from django.contrib import admin
from django.core.exceptions import PermissionDenied
from django.urls import path
from django.contrib.auth.decorators import login_required, user_passes_test

from decorator_include import decorator_include

from mysite.views import index

def only_user(username):
    def check(user):
        if user.is_authenticated and user.username == username:
            return True
        raise PermissionDenied
    return user_passes_test(check)

urlpatterns = [
    path('', views.index, name='index'),
    # will redirect to login page if not authenticated
    path('secret/', decorator_include(login_required, 'mysite.secret.urls')),
    # will redirect to login page if not authenticated
    # will return a 403 http error if the user does not have the "god" username
    path('admin/', decorator_include([login_required, only_user('god')], admin.site.urls),
]Supported versionsDjango versionsPython versions2.03.4, 3.5, 3.6, 3.72.13.5, 3.6, 3.72.23.5, 3.6, 3.7, 3.83.03.6, 3.7, 3.8All library versions to use for old Django/Python supportDjango versionsPython versionsLibrary versions1.4, 1.52.6, 2.71.21.62.6, 2.7, 3.2, 3.31.21.72.7, 3.2, 3.3, 3.41.21.82.7, 3.2, 3.3, 3.4, 3.51.31.9, 1.102.7, 3.4, 3.51.31.112.7, 3.4, 3.5, 3.61.4.x (>=1.4.1,<2)2.03.4, 3.5, 3.6, 3.73.02.13.5, 3.6, 3.73.02.23.5, 3.6, 3.7, 3.83.03.03.6, 3.7, 3.83.0DevelopmentMake sure you are in a virtualenv on a valid python version.Grab the sources from Github:git clone -b develop https://github.com/twidi/django-decorator-include.gitThen go into the newly createddjango-decorator-includedirectory and install
the few needed libraries:pip install -r requirements.txtTo run the tests, this library provides a test project, so you can launch
them this way:django-admin test --settings=tests.settings testsOr simply launch theruntests.shscript (it will run this exact command):./runtests.shBase your work on thedevelopbranch. Iit should be the default branch on
git assuming you used the-bdevelopargument on thegit clonecommand as shown above.When creating the pull request, ensure you are using the correct base
(twidi/django-decorator-include on develop).
Package: django-decoratormixins
A collection of class-based view mixins for
Django. Django-Decoratormixins also includes a function for converting
view decorators into class-based view mixins.UsageIf you have a decorator, usage is as simple as callingDecoratorMixinand passing the decorator as the argument.fromdecoratormixinsimportDecoratorMixindefmy_decorator(f):# ...MyDecMixin=DecoratorMixin(my_decorator)Decorator FactoriesMany of Django’s built in decorators are actually decorator
factories. In this case, it is necessary to get a decorator out of
them before it is possible to create a mixin from it.Here we have a decorator factory that modifies a view to require a
certain parameter in a get request:defrequire_get_param(param):defactual_decorator(view_func):@wraps(view_func)def_wrapped_view_func(request,*args,**kwargs):ifrequest.GET.get(param,None)isnotNone:response=view_func(request,*args,**kwargs)response.content+=paramreturnresponseelse:returnHttpResponseNotFound("{}is not present.".format(param))return_wrapped_view_funcreturnactual_decoratorIn order to use it, we must specify the parameter we are requiring:require_foo_decorator=require_get_param('foo')And now we can call DecoratorMixin on that decorator:RequireFooMixin=DecoratorMixin(require_foo_decorator)Applying MixinsOnce you have the mixin you reqire, mix it in with a class-based view.classTestView(View):defget(self,request):returnHttpResponse("OK")classTestViewFoo(RequireFooMixin,TestView):passTestViewFoo.as_view()will return a view method that is usable in
yoururls.py.Composing MixinsIt is possible to use multiple mixins for a single class, butorder
matters. The leftmost mixin in a class definition will be the
outermost decorator.fromdecoratormixins.authimportLoginRequiredMixinfromdecoratormixins.httpimportRequireGetMixin# TestView from aboveclassLoggedInGetRequestView(LoginRequiredMixin,RequireGetMixin,TestView):passIncluded MixinsHere is a list of all of the included mixins, and the modules in which they can be found.decoratormixins.authLoginRequiredMixindecoratormixins.csrfCsrfProtectMixinEnsureCsrfCookieMixinCsrfExemptMixindecoratormixins.httpConditionalPageMixinRequireGetMixinRequirePostMixinRequireSafeMixinEtagMixinLastModifiedMixindecoratormixins.cacheNeverCacheMixindecoratormixins.clickjackingXFrameOptionsDenyMixinXFrameOptionsDenySameoriginMixinXFrameOptionsDenyExemptMixin
Package: django-decorator-plus
Package DocumentationDescriptionThis package provides decorators to make building websites in Django
even easier.Installation$pipinstalldjango-decorator-plusBasic UsageThe package currently supplies decorators to improve your views.View DecoratorsThe view decorators provided are meant to restrict the HTTP methods
allowed on a view. Therequire_safe_methodslimits views toGETandHEADand generates a proper response forOPTIONS.fromdecorator_plusimportrequire_safe_methods@require_safe_methodsdeffunction_view_safe(request):...The package also supplies therequire_form_methodsdecorator, which
limits views toGET,HEAD, andPOST. Both of these
decorators are actually just shortcuts on top of therequire_http_methods()decorator, which is an enhanced version of
thedecorator supplied by Djangoby the same name; therequire_http_methods()decorator automatically supplies theOPTIONSHTTP method, and will automatically add theHEADHTTP
method if theGETmethod is allowed.For more information and examples, please see the fullPackage
Documentation.
Package: django-decorators
django-decorators=================why?----**django-decorators** were created during many projects where I found myself rewriting over and over the same code.Installation:--Simply use pip:pip install django-decoratorsList of decorators:--#### @add_http_varAn example usagefrom django_decorators.decorators import add_http_var@add_http_var('page')def any_view(request, page):return HttpResponse(page)#### @json_responseAn example usagefrom django_decorators.decorators import json_response@json_responsedef any_view(request):return {'this will be': 'JSON'}returns a JSON string.Now, if you need a JSONP response, just add a callback GET or POST variable :)#### @requires_postAn example usagefrom django_decorators.decorators import requires_post@requires_postdef any_view(request):return return HttpResponse('only works with POST')Copyright and Licensing-----------------------Copyright 2012 Julián Amaya M. [@julian_amaya](http://twitter.com/julian_amaya) <br />Licensed under the Apache License, Version 2.0<br /><http://www.apache.org/licenses/LICENSE-2.0>
Package: django-decouple
THIS PROJECT IS NO LONGER ACTIVEDecouplewas originally designed for Django, but became
an independent generic tool for separating settings from code.For that reason, django-decouple is now called python-decouple.Source Repository:https://github.com/henriquebastos/python-decouplePython Package Index:https://pypi.python.org/pypi/python-decouple