Saravanan666/pypi-org huggingface dataset:
Package: django-exportable-admin
This app provides a ModelAdmin which you can subclass in order to allow your
changelist view to be exported to CSV.  This will add an “Export CSV” button to
the top-right of the changelist. Clicking this button will export a CSV
containing the same columns and headings as your changelist view.  By default,
up to 10,000 rows will be exported, though this can be changed easily.Django > 1.3 is required, at which point the standard changelist_view() returns
a TemplateResponse. This allows us to change the template used after the
response is created, so that we can output CSV instead of the standard HTML
view.  Django <= 1.3 requires a previous version of this app in which the
changelist_view code is duplicated and modified slightly to change the template
and setup the response for download instead of display.Note: if you alter ‘change_list_template’ on your ModelAdmin subclass, the
“Export CSV” button will not appear. You will need to add it manually to your
template or link to the correct url (admin:myapp_mymodel_export) by some other
means.ExamplesSimple example:# myapp/admin.py
from django.contrib import admin
from django_exportable_admin.admin import ExportableAdmin
from models import MyModel

class MyModelAdmin(ExportableAdmin):
    list_display = ('field1','field2','field3')
admin.site.register(MyModel, MyModelAdmin)Complex example:# myapp/admin.py
from django.contrib import admin
from django_exportable_admin.admin import ExportableAdmin
from models import MyModel

class MyModelAdmin(ExportableAdmin):
    list_display = ('field1','field2','calculated_field')

    # adjust the number of results
    export_queryset_limit = 100

    def calculated_field(self, obj):
        return u"%.3f" % obj.float_field / 33.7
    calculated_field.short_description = 'Arbitrary Title'
admin.site.register(MyModel, MyModelAdmin)
Package: django-export-action
Generic export action for Django’s AdminQuickstartInstall Django Export Action:pip install django-export-actionInclude it on INSTALLED_APPS:'export_action',Add to urls:url(r'^export_action/',include("export_action.urls",namespace="export_action")),UsageGo to any admin page, select fields, then select the export to xls action. Then
check off any fields you want to export.FeaturesGeneric action to enable export data from Admin.Automatic traversal of model relations.Selection of fields to export.Can export to XSLx, CSV and HTML.Running TestsDoes the code actually work?source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install -r requirements_test.txt
(myenv) $ py.testSecurityThis project assumes staff users are trusted. There may be ways for users to
manipulate this project to get more data access than they should have.History0.1.0 (2016-09-29)First release on PyPI.
Package: django-export-action-py3
Django Export ActionGeneric export action for Django's Admin for Python 3.6 and Django 2.xQuickstartInstall Django Export Action:pip install django-export-action-py3Include it on INSTALLED_APPS:'export_action',Add to urls:path(r'^export_action/', include("export_action.urls", namespace="export_action")),UsageGo to any admin page, select fields, then select the export to xls action. Then check off any fields you want to export.FeaturesGeneric action to enable export data from Admin.Automatic traversal of model relations.Selection of fields to export.Can export to XSLx, CSV and HTML.ReferenceThis is a fork of another repository to keep the compatibility with Django 2.x and Python 3.6.Original repository:https://github.com/fgmacedo/django-export-action
Package: django-exportapp
=====
django_exportappdjango_exportapp is a simple Django app to export models xml fixtures.Quick startInstall django-exportapp::pip install django-exportappAdd "django-exportapp" to your INSTALLED_APPS setting like this::INSTALLED_APPS = (
...
'django_exportapp',
)Add add variables to settings project like this::EXPORTAPP_PUBLIC_DIR = '/home/user/dpub'
EXPORTAPP_PRIVATE_DIR = '/home/user/private'
Package: django-export-celery
Overviewdjango-export-celery is a Django application that enables long processing exports usingceleryanddjango-import-exportDependenciesPython 3.6+PackagesDjango>=3.1
celery>=5.0.0
django-import-export>=2.2.0Installation and ConfigurationCelery must be setup before starting.Please refer toUsing Celery with Djangofor more information.Install withpippip install django-export-celeryAdd apps toINSTALLED_APPSto project settings.# settings.pyINSTALLED_APPS=(...'import_export','django_export_celery',)# Optionally, sending emails is enabled by default on completed export# Disable it by setting to FalseDJANGO_EXPORT_CELERY_ENABLE_EMAIL=FalseSetupmodelandresources# apps/models.pyfromdjango.dbimportmodelsfromimport_export.resourcesimportModelResourceclassQuestion(models.Model):question_text=models.CharField(max_length=200)pub_date=models.DateTimeField('date published')@staticmethoddefget_export_resources():return{'rsc1':('Question',QuestionResource),}classChoice(models.Model):question=models.ForeignKey(Question,on_delete=models.CASCADE)choice_text=models.CharField(max_length=200)votes=models.IntegerField(default=0)classQuestionResource(ModelResource):classMeta:model=QuestionAddExportCeleryMixinto admin view inadmin.py# apps/admin.pyfromdjango.contribimportadminfrom.modelsimportQuestion,Choicefromimport_export.adminimportImportExportMixinfromdjango_export_celery.mixinsimportExportCeleryMixin@admin.register(Question)classQuestionAdmin(ExportCeleryMixin,admin.ModelAdmin):list_display=('question_text','pub_date',)# also supports django-import-export admin mixins like so@admin.register(Choice)classChoiceAdmin(ImportExportMixin,ExportCeleryMixin,admin.ModelAdmin):list_display=('question','choice_text','votes',)How to useClickEXPORTbutton in upper right in model viewSelect exportFormatand clickSUBMITExport jobs can be found in theExport Jobsapp along with job status and file linkDemo App./project/contains the necessary files to start a sample projectTo get startedcd project
pip install -r requirements.txt
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver 8000TODO: dummy data setupTODO: Docker setupKnown IssuesA list of known issues to be patched in the futureDoes not respect ordering when exportingFile formatodsis not supportedIssue TrackerIf you have any bugs, suggestions, or compliants please report an issuehereReferenceshttps://www.djangoproject.com/https://github.com/django-import-export/django-import-exporthttps://docs.celeryproject.org/en/stable/getting-started/introduction.html
Package: django-exportdata
App for export data in csv files from models with selected fields and custom filtration.Useful for create reports and calculate some statistic data for external sources.RequiresPython 2.6 or 2.7 and Django 1.3 and higher.InstallationInstall using pip:$ pip install django-exportdataAddexportdatainINSTALLED_APPS.Examples Of UsageCreate~/exportdata/auth.User.csvfile with all model data:$ python manage.py exportdata auth.UserSet fields for export:$ python manage.py exportdata app.model –fields=pk,model_field,get_absolute_url,method_property,fk__fieldSet custom filtration (based on model manager methods andfilter(field=value)filtration):$ python manage.py exportdata app.model –filters=active,paid,field=value,fk__field__gte=valueSet custom ordering:$ python manage.py exportdata app.model –ordering=-created_on,titleSet “from and to” range values primary keys (pks) for export:$ python manage.py exportdata app.model –range=1-100Or set range with comma-separated values:$ python manage.py exportdata app.model –range=1,2,3,4,5Set custom file path for save:$ python manage.py exportdata app.model –filepath=directory/filename.extensionSet fields when decoratedmodels.permalink(by defaultget_absolute_urlfield). For adding the domain before data:$ python manage.py exportdata app.model –permalinks=get_absolute_url,get_absolute_admin_urlChanges###0.2 (2013-07-20)Moved many operations in methods with improvementsAdded advanced fitration for--filtersoptionAdded support--rangeoptionAdded--filepathoption for set file for save dataAdded--permalinksoption for getmodels.permalinkdecorated fieldsAdded help for all options and for the commandAdded package documentation on ReadTheDocs###0.1 (2013-07-13)Initial release
Package: django-exportdb
Export the entire database to an Excel workbook with a sheet per model.Installation$ pip install django-exportdbAddexportdbto INSTALLED_APPS, and make sure that django.contrib.admin is in there as well.Addurl(r’^admin/exportdb/’, include(‘exportdb.urls’))to your urls.py, make sure that it comes before url(r’^admin/’, …) if you hook
it into the admin.ConfigurationEXPORTDB_EXPORT_CONFConfigures what models and fields are exported. Example:EXPORT_CONF = {
    'models': {
        'auth.User': {
            'fields': ('username',),
            'resource_class': 'app.tests.utils.UserResource'
        },
        'auth.Group': {
            'resource_class': 'app.tests.utils.GroupResource'
        },
        'auth.Permission': {
            'fields': ('name',)
        }
    }
}EXPORTDB_CONFIRM_FORMForm shown to confirm the exportEXPORTDB_EXPORT_ROOTThe filesystem path where the exports are storedEXPORTDB_PERMISSIONWho can access the export. By default only superusers have access.To allow allstaffusers to use the export add the following to your settings:EXPORTDB_PERMISSION = rules.is_staff
Package: django-export-xls
Django Export XLS is a simple Django app to export data to a xls file.Detailed documentation is in the “docs” directory on githubhttps://github.com/Daiech/django-export-xlsInstalationInstall from PyPi:$ pip install django-export-xlsQuick startAdd “export_xls” to your INSTALLED_APPS setting like this:INSTALLED_APPS = (
    ...
    'export_xls',
)Be sure to have the MEDIA_ROOT and MEDIA_URL vars defined. eg:import os
MEDIA_ROOT = os.sep.join([os.path.dirname(os.path.dirname(__file__)), 'media'])
MEDIA_URL = '/media/'The only thing that you must to do is create an excel file is:* Define a name for your file
* Define a Python list with the fields you want in your excel (xls headers).
* Create a python list with the values ​​you want to add to your xls file.How to useImport the function:from export_xls.views import export_xlwt‘export_xlwt’ function needs:3 mandatory parameters:filename
fields
values_list2 optional parameters:save   : save the xls file on settings.MEDIA_ROOT
folder : save the xls file on settings.MEDIA_ROOT/folder‘export_xlwt’ function return the string:MEDIA_URL + folder + filename
eg: /media/xls/filename.xlsExamplefrom export_xls.views import export_xlwt
return export_xlwt(filename, fields, values_list, save=True, folder=”xls/”)view the real example. Clone de github repo:git clone https://github.com/Daiech/django-export-xls
  cd django-export-xls/example
  python manage.py runserver


Credentians for database:

  * user: daiech
  * pass: 1
Package: django-express-gateway
# Express Gateway With DjangoIntegrating Django with Express Gateway## Requirements- Python 3 or later- Django 2 or later- Django Rest Framework 3.7 or later- Requests 2.19 or later## InstallationInstall with pip```bash$ pip install django_express_gateway```## Getting StartedAdd `express_gateway` to your `INSTALLED_APPS````pythonINSTALLED_APPS = [...'express_gateway',]```Add authentication to DRF default authentication settings```pythonREST_FRAMEWORK = {'DEFAULT_AUTHENTICATION_CLASSES': ('express_gateway.authentications.AuthUserAuthentication','rest_framework.authentication.SessionAuthentication','rest_framework.authentication.BasicAuthentication',),...}```Finally add the configuration for Centralize Authentication System.```python# Config data should get from environment variableEXPRESS_GATEWAY = {'URL': 'https://mycas-server.com','API_KEY': 'testingApiKey','ENDPOINTS': {'register': '/auth/user/'token': '/auth/token/',}}```# History### 0.0.1* First stable release on PyPI
Package: django-expression-fields
django-expression-fields lets your users type a mathematical expression in a form field.
Python does the math and stores the result in the database. For example, suppose you have a model to track Things, like this:class Thing(models.Model):
    cost = models.DecimalField(
            max_digits=5, decimal_places=2, null=True, blank=True)Suppose Things come in packs of 12 for $7.99. Your users have to do some math to fill in the cost of a single Thing, $0.67.But not with an expression field! Create your form like this:class ThingForm(forms.Form):
        cost = DecimalExpressionField(
                max_digits=5, decimal_places=2, required=False)Now your user can simply type7.99/12in the field and Python will do the math for them!
Package: django-expression-filter
About(WIP)This package provides a class that enables direct filtering on an expression that you’d usually use as an annotation.UsageThe classAnnotationBypasstakes 3 arguments. The first is any valid annotation value, the second is the lookup string you’d use in the filter kwarg name, the third is the value you’d use for the filter.fromexpression_filterimportAnnotationBypassfilter=AnnotationBypass(Sum('book__page_count'),'gte',1000)But whyConsider the following:Book.objects.annotate(words_per_page=F('word_count')/F('page_count')).filter(words_per_page__gte=100)This executes the following query:SELECT`books_book`.`id`,`books_book`.`word_count`,`books_book`.`page_count`,`books_book`.`word_count`/`books_book`.`page_count`AS`words_per_page`FROM`books_book`WHERE`books_book`.`word_count`/`books_book`.`page_count`>=100Notice that the expression is duplicated, as using thewords_per_pageannotation by name in theWHEREclause is not allowed. Usually the annotated value is not needed in the response, and depending on how complex the annotation is or how many objects are returned, this could have a performance impact.This is better:fromexpression_filterimportAnnotationBypassBook.objects.filter(AnnotationBypass(F('word_count')/F('page_count'),'gte',100))SELECT`books_book`.`id`,`books_book`.`word_count`,`books_book`.`page_count`FROM`books_book`WHERE`books_book`.`word_count`/`books_book`.`page_count`>=100
Package: django-expression-index
django-expression-indexdjango-expression-index provides implementation of subclass ofdjango.db.models.Index, which enables indexing tables using expressions.In Django 3.2 this solution is obsoleted by built-in support of expression index.What problem does this solve?Currentlydjango.db.models.Indexonly accepts field names infieldsparameter. There is no way to add expression index other than using raw SQL.This project implementsExpressionIndexclass, which accepts list  of anydjango.db.models.expressions.Expressionin itsexpressionsparameter.How to use it?Here is an example of adding index based on lowercasedmodels.CharFieldvalue.fromdjango.dbimportmodelsfromdjango.db.models.functionsimportLowerfromdjango_expression_indeximportExpressionIndexclassProfile(models.Model):name=models.CharField(max_length=255)classMeta:indexes=[ExpressionIndex(expressions=[Lower('name')])]After addingExpressionIndexto yourindexes, runmakemigrationsandmigratecommands. The following SQL code will be generated and executed on your database:CREATETABLE"myapp_profile"("id"integerNOTNULLPRIMARYKEYAUTOINCREMENT,"name"varchar(255)NOTNULL);CREATEINDEX"myapp_profile_9a3539_idx"ON"myapp_profile"(LOWER("name"));ExpressionIndexconstructor replacesfieldsparameter withexpressionsparameter. All remaining parameters are relayed todjango.db.models.Indexconstructor.How does it work?ExpressionIndexoverridescreate_sqlmethod and uses django's default query compiler to render the expression.There is a monkey-patch implemented ondjango.db.models.sql.query.Queryinstance, which replacesresolve_ref. The patch forces usingSimpleColinstead ofColclass to render bare field names referred by the expression, without prefixing them with table name.defcompile_expression(self,expression,compiler):defresolve_ref(original,name,allow_joins=True,reuse=None,summarize=False,simple_col=False):returnoriginal(name,allow_joins,reuse,summarize,True)query=compiler.queryquery.resolve_ref=partial(resolve_ref,query.resolve_ref)expression=expression.resolve_expression(query,allow_joins=False)sql,params=expression.as_sql(compiler,compiler.connection)returnsql%paramsIf you know a better solution, please let me know!CompatibilityIt was tested with Django 2.2.13 and 3.x.
In release 0.2.1 code was updated to make it compatible with Django 3.2
Package: django-expvar
[![Build Status](https://travis-ci.org/thraxil/django-expvar.svg?branch=master)](https://travis-ci.org/thraxil/django-expvar)[![Coverage Status](https://coveralls.io/repos/github/thraxil/django-expvar/badge.svg?branch=master)](https://coveralls.io/github/thraxil/django-expvar?branch=master)django-expvar==============[expvar](https://golang.org/pkg/expvar/) compatible endpoint for django`pip install django-expvar`, add `expvar` to `INSTALLED_APPS` and addto your `urls.py`:```from expvar.views import ExpVarView...url('^debug/vars$', ExpVarView.as_view(), name='expvar'),...```Then, accessing `/debug/vars` on your app will return a JSON dict withthe exposed variables, which you can use for monitoring, debugging,etc.You can easily expose variables through the expvar endpoint. In yourdjango app, just add a `vars.py` file with some classes that subclass`expvar.ExpVar` like so:```import expvarclass Example(expvar.ExpVar):name = 'example'def value(self):return 42```In your django settings, you can optionally specify a `EXPVAR_SKIP`variable with a list of apps to ignore (ie, any `vars.py` files inthose apps will be ignored).If multiple variables declare the same `name`, two different thingscan happen:* if they return scalar values, it's a collision and only one of themwill get reported. This is probably not what you intended, so try tostick to unique names* if they return dicts as their value, variables with the same namewill have their values merged.## plugins:By default, `expvar` will only expose the variables that you set up.There are a few additional packages available though that act asplugins to provide generic data on commandline arguments, processdata, etc. Generally, once you have `expvar` installed, you can pipinstall them and add them to `INSTALLED_APPS` and that's enough to usethem.* [django-expvar-cmdline](https://github.com/thraxil/django-expvar-cmdline) -reports the commandline data for the process (useful forcompatability with expvarmon and similar, but may pose a securityrisk if you pass secrets on the commandline)* [django-expvar-resource](https://github.com/thraxil/django-expvar-resource) -reports various info on resource usage (memory, interrupts, etc) viaa library in the Python's standard lib.
Package: django-expvar-psutil
psutil plugin for [django-expvar](https://github.com/thraxil/django-expvar/)* pip install it* add `expvarpsutil` to `INSTALLED_APPS`exposes everything that it can glean from[psutil](https://github.com/giampaolo/psutil).Sample output:{"vmem": {"available": 21817942016,"used": 29588267008,"cached": 14833836032,"percent": 35.2,"free": 4071620608,"inactive": 11338760192,"active": 16109834240,"total": 33659887616,"buffers": 2912485376},"netio": {"dropin": 10,"packets_recv": 5051051546,"bytes_recv": 16324722441209,"dropout": 0,"bytes_sent": 14774021978712,"errout": 0,"packets_sent": 4435177714,"errin": 52},"swap": {"used": 6767640576,"percent": 21.0,"free": 25397030912,"sout": 140025290752,"total": 32164671488,"sin": 178708295680},"cpu": {"guest": 0.0,"irq": 113.01,"system": 907022.44,"idle": 42276546.24,"user": 5368869.44,"iowait": 7038784.66,"nice": 1194231.6,"steal": 0.0,"softirq": 63126.39}}
Package: django-ext
Django ExtSome extensions for Django.ModelsTimestampModelAddcreated_atandupdated_atfor model.TimeRangeModelAddstarted_atandended_atfor model.UserTrackModelAddcreated_byandupdate_byfor model.This model requiresdjango-currentuser, and should add it to the middleware classes in your settings.py:MIDDLEWARE = (
    ...,
    'django_currentuser.middleware.ThreadLocalUserMiddleware',
)ExtraFieldsManagerExtraFieldsManageris intended to be used in conjunction withExtraFieldsQuerySetto filter extra added fields using custom filter conditions.While initializing theExtraFieldsManagerclass, it is necessary to use thefieldsparameter to specify extra fields and their corresponding filter conditions generation functions.Usage:class MyModel(models.Model):
    relation = models.ForeignKey(RelationModel, models.CASCADE, +, null=False)

    objects = ExtraFieldsManager(fields={
        # users: an extra field that is not present in the model
        # lambda function: used to generate complex query conditions
        'users': lambda x: Q(relation__data__users__contained_by=[str(user.id) for user in x]) | \
        Q(relation__data__groups__contained_by=Group.objects.filter(user__in=x).distinct().values_list('id', flat=True))
    })CommandstranslateTranslate the permission names into the local language.$ python manage.py translate
Package: django-extant-test-db
Django Extant Test DB=====================This package provides a Django test runner that uses unittest2 test discovery,and can test against a pre-existing database when configured to do so.## Quickstart```bashpip install django-extant-test-db```In _settings.py_, set the following:```pythonTEST_RUNNER = 'extant_test_db.runner.DiscoverRunner'```For any databases you want to be unmanaged by the test runner, add thefollowing:```pythonDATABASES = {...'TEST': {'MANAGED': False,},...}```## ConfigurationThis package provides a Django test runner that uses unittest2 test discovery,and can test against a pre-existing database when configured to do so. In orderto use an extant database for tests (e.g., if you have a large database full ofread-only data), in your database TEST settings, set a MANAGED flag:```pythonDATABASES = {'default': {...},'warehouse': {...'TEST': {'MANAGED': False,},}}```The database used will be the same as the one used for the webserver, thoughyou can also provide an alternative test database name:```pythonDATABASES = {...'TEST': {'MANAGED': False,'NAME': os.environ['TEST_DB_NAME'],},...}```
Package: django-extended-admin
IMPORTANT STEPS:1. add 'admin_extended' before 'django.contrib.*' and 'admin_tools.*' in INSTALLED_APPS2. add 'admin_extended.context_processors.settings' in TEMPLATE_CONTEXT_PROCESSORS3. add 'apptemplates.Loader' in TEMPLATE_LOADERSPackage allow some extra settings to customize - all of them are optional- ADMIN_JQUERY_ADDITIONAL_VERSIONIs a string which defines additional version of jquery - it will include from google storageExample: ADMIN_JQUERY_ADDITIONAL_VERSION = '1.9.0'- FAVICON_PREFIXIs a string which defines favicon static prefix ('/static/' by default)Example: FAVICON_PREFIX = '/static/images/'Also it provides register_url decorator for ModelAdmin or Inline methods. It turns method to view, which returns HttpResponse object.To use it you should add next line to yours urls.pyurl(r'^admin/', include('admin_extended.urls')),IMPORTANT: it should be placed BEFORE including admin.site.urls, but AFTER admin.autodiscover()After then you may deco yours methods like that:class SomeModelAdmin(ModelAdmin):# finally url will be look like that: r'^/admin/app_label/model_name/extra_url/'# arg must be a raw string and can not starts with /# url arg could be omitted - "method_name/$" will be used as url@register_url(r'extra_url/$')def get_info(self, request):return render_to_response('some_template.html')IMPORTANT: also you must decorate your method with @staticmethod or @classmethod if you use this feture in InlineModelAdminNOTE: if you use this feature in InlineModelAdmin, "model_name" still be name of model registred with ModelAdmin which contains inline (so as "app_label").To prevent it set "use_inline_data" arg to True in register_url decoratorAt client side you could use:- autoinlines.js (a tool to create dynamic inlines, by clicking on checkboxes controllers)Usage: $.autoInline({inlineName: "hint",fields: ["field_name_1", "field_name_2"],controllers: ["m2m_field_name_1", "m2m_field_name_2"],requiredMask: 10,hint: "Check m2m_field_name_1",empty: "None"})- searchline.js (a tool to filter checkboxes)Usage: $("fieldset .field-fieldname").addSearchLine();