Saravanan666/pypi-org huggingface dataset:
Package: django-datacite
django-dataciteA Django app to properly model theDataCite Metadata Schemain a relational database, with full integration into the Django admin interface. The app isslightlyopinionated in a way to make it better usable as a DOI registration database. Names (creatorsandcontributors) and identifiers (for the resources, but also foralternativeIdentifiersandrelatedIdentifiers) are stored in separate database tables and can be reused for different resources.This app provides a set ofmodels,admin classes,views, and utility functions to export and import DataCite files. All options and default settings can be customized in the Djangosettingsusing the same syntax as indjango_datacite/settings.py. Identifiers have an additionalcitationfield to store the human readable citation for reuse in other tools.For a reference integration into a Django project see:https://github.com/ISI-MIP/isimip-doi.Although it should cover DataCite 4.3 completely, it is still quite fresh and should be used with care.
Package: django-dataclass-autoserialize
django-dataclass-autoserializeAn extension of slightly modified
oxan'sdjango-dataclass-serialize(Temporary hostedhere). Making it much more enjoyable to
use withdrf-yasg.The goal of this package is to make the APIView code as succinctly as possible. The main pain point it is trying to solve isHaving to define the param class and serialize separately.Having it nicely integrate with drf-yasg without having to duplicate information.Installpip install django-dataclass-autoserializeDocumentationSimple UsageHere is an example of a typical usage. Pull straight fromExample Projectfrom__future__importannotationsfromdjango_dataclass_autoserializeimportAutoSerialize,swagger_post_schema,swagger_get_schemafromdataclassesimportdataclassfromrest_framework.requestimportRequestfromrest_framework.responseimportResponsefromrest_framework.viewsimportAPIView@dataclassclassInputParam(AutoSerialize):a:intb:int@classmethoddefexample(cls)->InputParam:# this is actually optional but it will show up# in swagger docreturncls(a=3,b=2)@dataclassclassComputeResponse(AutoSerialize):msg:strresult:int@classmethoddefexample(cls)->ComputeResponse:returncls(msg='hello world',result=5)classAddView(APIView):@swagger_post_schema(body_type=InputParam,response_types={200:ComputeResponse})defpost(self,request:Request)->Response:param=InputParam.from_post_request(request)returnComputeResponse(msg='add successfully',result=param.a+param.b).to_response()classSubtractView(APIView):@swagger_get_schema(query_type=InputParam,response_types={200:ComputeResponse})defget(self,request:Request)->Response:param=InputParam.from_get_request(request)returnComputeResponse(msg='subtract successfully',result=param.a-param.b).to_response()Then the swagger will shows up like the followingCustomizationUnder the hood it usesdjangorestframework-dataclasses. So
all the customization that can be done for dataclass is applied here as well. For example, you can
addserializer_kwargslike so@dataclasses.dataclassclassPerson:email:str=dataclasses.field(metadata={'serializer_field':fields.EmailField()})age:int=dataclasses.field(metadata={'serializer_kwargs':{'min_value':0}})ValidationThe validation of the object can be done by overidingvalidate_data(cls, obj)method. For exampleclassNumbers(AutoSerialize):a:intb:int@classmethoddefvalidate_data(cls,obj:Numbers)->Numbers:fromrest_framework.exceptionsimportValidationErrorifobj.a+obj.b>1000:raiseValidationError('too big')returnobjSwaggerdrg-yasg integration is done throughswagger_get_schemaandswagger_get_schemadecorator. See simple example for the usage. keywords other thanquery_type/body_typeandresponse_typesare forwarded to drf-yasg'sswagger_auto_schema.
Package: django-dataclass-forms
Django Data Class FormsA Django base form class forData Classes..RequirementsPython (3.8+)Django (3.2+)These are the supported Python and package versions. Older versions will probably work as well, but aren't tested.Installation$ pip install django-dataclass-formsThis package followssemantic versioning. SeeCHANGELOGfor breaking changes and new features, andLICENSEfor
the complete license (MIT).
Package: django-datadog
# Django Datadog* A simple Django middleware for submitting timings and exceptions to Datadog.* A helper class, Stats, that creates an API and Statsd connection to Datadog from Django settings## InstallationDownload the code into your project and install it.```bashgit clone git://github.com/conorbranagan/django-datadog.gitcd django-datadogpython setup.py install```Add `djdatadog` to your list of installed apps.```pythonINSTALLED_APPS += ('djdatadog')```Add the following configuration to your projects' `settings.py` file:```pythonDATADOG_API_KEY = "apikey"DATADOG_APP_KEY = "appkey"DATADOG_APP_NAME = "appname" #name your metrics will be tagged withDATADOG_HOST = "yourddhost" #for statsd metricsDATADOG_PORT = "8125" #for statsd metrics```The API and app keys can be found at https://app.datadoghq.com/account/settings#apiAdd the Datadog request handler to your middleware in `settings.py`.```pythonMIDDLEWARE_CLASSES += ('djdatadog.middleware.DatadogMiddleware')```## Usage### Stats class```from djdatadog.helpers import Statss = Stats()s.increment("my_other_metric", 4, ["tag1", "tag2"])```For information on the statsd interface, see the [Datadog Python Client documentation](http://datadogpy.readthedocs.org/en/latest/#datadog-dogstatsd-module)### MiddlewareOnce the middlewhere installed, you'll start receiving events in your Datadogstream in the case of an app exception. Here's an example:![example django exception](https://dl.dropbox.com/u/126553/django-datadog.png)You will also have new timing metrics available:- `my_app.request_time.{avg,max,min}`- `my_app.errors.500`- `my_app.errors.404`- `my_app.errors.403`- `my_app.errors.405`- `my_app.errors.410`Metrics are tagged with `path:/path/to/view`Note: `my_app` will be replaced by whatever value you give for `DATADOG_APP_NAME`.
Package: django-datadownloader
DescriptionThis django app is an app tool that add an admin interface to manage archives
of database’s json dumps and/or media datas.Packages can be download withdjango-sendfile.InstallYou can retrieve it via pip:pip install django-datadownloaderUsageYou need to add two libraries in yourINSTALLED_APPS:INSTALLED_APPS = (
    ...
    'drdump',
    'datadownloader',
    ...
)Add this to your URLs:urlpatterns = [
    ...
    url(r'^admin/datadownloader/', include('datadownloader.urls')),
    ...
]You can add a few options:DATA_DOWNLOADER_PATH = join(VAR_PATH, 'protected_medias/datas')
DATA_DOWNLOADER_DUMP_PATH = join(VAR_PATH, 'dumps')
DRDUMP_OTHER_APPS = True
DRDUMP_MAP_FILE = join(BASE_DIR, 'drdump.json')
DRDUMP_EXCLUDE_APPS = ['auth', 'sessions', 'contenttypes']See DrDump documentation for more:https://github.com/emencia/dr-dumpLinksPypi page:https://pypi.python.org/pypi/django-datadownloaderGithub page:https://github.com/emencia/django-datadownloaderRunning testsTo run the tests, run the django test management command with the settings
found insidedatadownloader.tests.settings:$ django-admin test --pythonpath=. --settings=datadownloader.tests.settingsYou must install mock if you run python2 or python < 3.4.Changelog1.2.1 - 2022/03/16Correct bug when DATA_DOWNLOADER_DUMP_PATH is not relative1.2.0 - 2021/11/23Add settings DATA_DOWNLOADER_DUMP_PATH for specify folder where drdump dumps
are stored1.1.0 - 2021/06/08Package now depends on “six” instead of using the deprecated embedded “six” module from
Django which are not available anymore since Django 3.0.1.x will be the last serie to support Python 2 and Django<2.2 versions, new serie 2.x
will only support recent Python3 and Django versions.Also did some cleaning in package setup and dependancies to fit to supported versions:sixdjango>=1.8dr-dump>=1.1.0django-sendfile>=0.3.111.0.0 - 2018/09/26Rewrite version.Previously only release on a private package mirror, it have been release publicy to
official Pypi on 2021/06/07.0.2.2add some information into main pagefix bug in uwsgi execution env0.2.1Forgot to update MANIFEST.in on 0.2.0 release0.2.0Refactoring codeAdding tests0.1.1Use rst syntax for doc/descriptions rather markdown.0.1.0First version.
Package: django-data-explorer
Django Data Explorer facilitates visualizing data using AJAX tables and mapswith filters in Django applications.You can see the examples at [http://djangoqb.qed.ai/](http://djangoqb.qed.ai/).Previously this project was released under name `django-querybuilder`Running examples================You can see example Django project using Django Data Explorer in directory`example`. Go to the directory and execute:pip install -r requirements.txtAnd then:./manage.py runserverUsing in your application=========================Add those lines to you project requirements or use them as PIP arguments.django-data-explorer-e git+git://github.com/qedsoftware/django-datatable-view#egg=django-datatable-view   # for data-explorerAfterwards, you can use our package the same way as in the example. You canalso consult docstrings.For developers==============Frontend requirements---------------------To get frontend dependencies, you need to have `Node.js` installed.After installing `Node.js`, install the frontend dependencies by runningthe following from the root of your Django checkout:npm installnpm run depsThen build frontend files:npm run buildFor development runnpm run startthat way build will happen automatically each time you change any related files.Django static files - important note------------------------------------Contents of the folders listed below are generated automatically./django_data_explorer/static/django_data_explorer/dist/django_data_explorer/static/django_data_explorer/css/django_data_explorer/static/django_data_explorer/libsModifying them manually does not make much sense, as they will be overridden.They are included to enable the package to work immediately after installing it via pip.Documentation-------------In Python, see docstrings for documentation. You can also browse them using`help` method and using:python -m pydoc django_data_explorerGenerate JavaScript docs into directory `js_docs`:npm run js-docsRunning tests=============Django------./manage.py jenkinsFrontend--------npm testAll tests--------./jenkins.pyTest coverage=============JavaScript test coverage is available in the test output. To see Python coveragereport, execute in directory `example`:coverage3 run ./manage.py testcoverage3 html ../django_data_explorer/*py
Package: django-dataexporter
django-dataexporteris a extensible helper to export Django QuerySets and other data to CSV and Excel.FeaturesExporter class to generate CSV and Excel files out of QuerySets and other iterables.Factory to generate Django ModelAdmin actions to trigger an export out of Django’s famous admin interface.Requirementsdjango-dataexporter supports Python 3 only and requires at least Django 2.
In addition, the Python packageopenpyxlneeds to be installed.Prepare for developmentA Python 3.6 interpreter is required in addition to poetry.$poetryinstallNow you’re ready to run the tests:$poetryrunpytestResourcesDocumentationBug TrackerCode
Package: django-data-exporter
django-data-exporter is a simple Django application to export asynchronously
your data from your models.It’s based onCelery(>= 2.3) to useChordsandtablibto export your data in multiple formats.InstallationEither check out the package fromGitHubor it pull from a release via PyPIpip install django-data-exporterConfigure your Django project to usedjceleryAdd ‘data_exporter’ to yourINSTALLED_APPSINSTALLED_APPS = (
    'data_exporter',
)Utilisationdjango-data-exporter uses channels to discover your exports and to transfer them
to celery. So let’s say you have the following model in apollsapplication# polls/models.py
from django.db import models


class Poll(models.Model):
    question = models.CharField(max_length=200)
    pub_date = models.DateTimeField('date published')

    def __unicode__(self):
        return self.questionNow, you want to define your first exporter right? Create aexports.pyfile
in yourpollsapplication and extendExportto build your own Exporter# polls/exports.py
from data_exporter.base import Export

from polls.models import Poll


class PollExport(Export):
    filename = 'poll'
    columns = ('id', 'question')
    headers = ('id', 'question')
    directory = 'polls'

    def get_query(self, offset=None, limit=None):
        qs = Poll.objects.all()

        if not offset is None and not limit is None:
            return qs[offset:limit]

        elif limit:
            return qs[:limit]

        elif offset:
            return qs[offset:]

        return qs

    def get_count(self):
        return Poll.objects.count()Final step is to register this exporter inDATA_EXPORTER_CHANNELSin your
Django settingsDATA_EXPORTER_CHANNELS = {
    'polls': 'polls.exports.PollExport'
}You can now use the celery tasks provided by django-data-exporter as sofrom data_exporter.tasks import builder
builder.delay('polls', 'csv')First parameter is the name of your channel and second parameter is the format
wanted.As said before, we use the beautifultabliblibrary to export your data,
so as you may understood we support all formats provided by this library.ConfigurationDATA_EXPORTER_CHANNELSAll your registered channels.DATA_EXPORTER_DIRECTORYThe directory used to export your data.
Package: django-dataforms
django-dataformsis a wrapper for the Django forms API that lets you dynamically
define forms in a database, rather than hard-coding form definitions. This can be especially helpful for projects that have many forms and/or forms which constantly change, and you don’t want to be constantly updating models and schemas. No model creation required.See theDocumentaionfor more information.Go from this…# forms.py
from django import forms

class ContactForm(forms.Form):
    subject = forms.CharField(max_length=100)
    message = forms.CharField()
    sender = forms.EmailField()
    cc_myself = forms.BooleanField(required=False)

# view.py
def contact(request):
    if request.method == 'POST':
        form = ContactForm(request.POST)
        # ...
    else:
        form = ContactForm()

    return render_to_response('contact.html', {'form': form,})To this!# Now your form is stored in the database and you can
# change it without changing a model and DB schema!
create_form(request, form="contact-form" submission="mySubmission")
Package: django-dataframe-processor
Django Dataframe ProcessorA django library for importing/processing files or other data that is read as a DataFrameSetuppipinstalldjango-dataframe-processorAdddataframe_processorto your Django settings:INSTALLED_APPS=(...'dataframe_processor',...)UsageCreate a class extending from DataframeProcessorfromdataframe_processor.processorimportDataframeProcessorfromdataframe_processor.table_schema.schemaimportTableSchema,Columnfromdataframe_processor.table_schema.validatorsimportdate_range_validator,choices_validatorfromdateutil.relativedeltaimportrelativedeltafromdjango.utilsimporttimezoneclassMyFileProcessor(DataframeProcessor):today=timezone.now().date()schema=TableSchema([Column('name',label='Name*',ctype=str),Column('document_number',label='Document*',ctype=int),Column('birth_date',label='Date of birth*',ctype=pd.Timestamp,validators=[date_range_validator(begin=today-relativedelta(years=120),end=today),]),Column('gender',label='Gender*',ctype=str,validators=[choices_validator(['M','F'])],required=False),])defclean_row(self,row):row=super().clean_row(row)# make any aditional validation that you may need here# if anything goes wrong you may raise a FileProcessor.ProcessExceptionreturnrowdefsave(self,data):# save your data to the database or do any other processing you may needreturn'Ok'Then you can process your files:importpandasaspdimportMyFileProcessordf=pd.read_csv('mydata.csv')processor=MyFileProcessor(df)success=processor.process()# the processor generates a report for each lineprint(processor.report)
Package: django-datafreezer
# DatafreezerDatafreezer is a newsroom tool that enables reporters and editors to easily share datasets.## Features#### UploadWith each upload, users complete a data dictionary, which describes pertinent fields within a dataset. This ensures that uploaded datasets are well documented.Users can either upload a dataset that already has header information, or they can add and remove data dictionary fields.Users can include a URL in which the data was sourced and the app will scrape the page for a headline to save.Tag support (with autocomplete)#### BrowseUsers can browse datasets byUploading userHub (desk)Vertical (section)TagSourceThe app uses a pluggable JSON endpoint to map email addresses to names and certain slugs to names.This endpoint can be a static JSON or an API.## Credits
Thanks to [Glyphicons](http://glyphicons.com/) for Bootstrap glyphs.Developed by [Tyler Davis](http://twitter.com/tylerallyndavis) for [The Dallas Morning News](http://dallasnews.com).
Package: django-data-gateways
Приложение Django для создания в проекте конфигурируемых шлюзов данных из панели администратора.
Содержит набор инструментов с понятным сценарием использования для формирования сообщений на основе данных
и последующей их отправки во внешние системы.Подробную документацию можно найти в папке “docs”.Быстрый стартДобавьте приложение “data_gateways” в INSTALLED_APPS в файле settings.py:INSTALLED_APPS = [
    ...
    'data_gateways',
]Выполнитеpython manage.py migrateдля применения миграций в БД.Запустите командуpython manage.py message_sender_init_dbдля инициализации в БД информации обо всех модулях (отправщики, стратегии, шлюзы, конфигурации).Приложение успешно интегрировано в проект!
Package: django-data-health-checks
Django Data Health ChecksDocumentation:https://Flexonze.github.io/django-data-health-checksSource Code:https://github.com/Flexonze/django-data-health-checksPyPI:https://pypi.org/project/django-data-health-checks/Write simple checks to identify and rectify potential integrity issues in your production dataInstallationpipinstalldjango-data-health-checksDevelopmentClone this repositoryRequirements:PoetryPython 3.8+Create a virtual environment and install the dependenciespoetryinstallActivate the virtual environmentpoetryshellTestingpytestDocumentationThe documentation is automatically generated from the content of thedocs directoryand from the docstrings
of the public signatures of the source code. The documentation is updated and published as aGithub project pageautomatically as part each release.ReleasingTrigger theDraft release workflow(pressRun workflow). This will update the changelog & version and create a GitHub release which is inDraftstate.Find the draft release from theGitHub releasesand publish it. When
a release is published, it'll triggerreleaseworkflow which creates PyPI
release and deploys updated documentation.Pre-commitPre-commit hooks run all the auto-formatters (e.g.black,isort), linters (e.g.mypy,flake8), and other quality
checks to make sure the changeset is in good shape before a commit/push happens.You can install the hooks with (runs for each commit):pre-commitinstallOr if you want them to run only for each push:pre-commitinstall-tpre-pushOr if you want e.g. want to run all checks manually for all files:pre-commitrun--all-files
Package: django-data-history
django-data-historyA Django application that allows you to store detailed data in the change log and display the detailed information in object's history view.Installpip install django-data-historyUsage## add app: django_middleware_global_request
## add app: django_middleware_request_id
## add app: django_static_jquery_ui
## add app: django_data_history
## put django_data_history before django.contrib.admin

INSTALLED_APPS = [
    ...
    "django_middleware_global_request",
    "django_middleware_request_id",
    "django_static_jquery_ui",
    'django_data_history',
    ...
    'django.contrib.admin',
    ...
]

## add middleware: django_middleware_global_request.middleware.GlobalRequestMiddleware
## add middleware: django_middleware_request_id.middlewares.DjangoMiddlewareRequestId
MIDDLEWARE = [
    ...
    "django_middleware_global_request.middleware.GlobalRequestMiddleware",
    "django_middleware_request_id.middlewares.DjangoMiddlewareRequestId",
    ...
]

# default to False, so you must set it to True to enable all models injection.
SAVE_DATA_HISTORIES_FOR_ALL = True 

# if SAVE_DATA_HISTORIES_FOR_ALL==False, then only these models will be injected.
# default to empty.
SAVE_DATA_HISTORIES_FOR = [
    "your_app1.model_name1"
]

# if SAVE_DATA_HISTORIES_FOR_ALL==True, these models will NOT be injected.
# default to:
# [
#    "sessions.session",
#    "contenttypes.contenttype",
#    "admin.logentry",
#    "auth.permission",
# ]
DO_NOT_SAVE_DATA_HISTORIES_FOR = [
    "your_app2.model_name2",
]Deep usageHow to ignore some fields' values?Some fields' value are inessential so that we want to ignore their changes.
Simply add django_data_history_excludes in the model.class TestModel(models.Model):

    django_data_history_excludes = ["mod_time"]

    mod_time = models.DateTimeField(auto_now=True)If only mod_time changed, we are not treat the event as a change event, so that we will not make a new record.How to save data history in separate table?Simply addDATA_HISTORY_STORAGE_CLASSproperty to the model class.
A newDATA_HISTORY_STORAGE_CLASSmust a subclass ofdjango_data_history.models.DataHistoryBase.
ADATA_HISTORY_STORAGE_CLASScan be a real class or aabsolute-dot-pathto the real class.Instance's history view imageReleasesv0.1.0First release.v0.1.1Fix ugettext_lazy problem.v0.1.2Add save_data_histories_for_fk_instance to fix inline edit history missing problem.v0.1.3Fix problems that field name has "+" in fields_map.v0.1.5Using django_middleware_request_id instead of implement request_id inside the app.v0.1.6Fix requirements in setup.py.v0.1.7Fix DataHistoryModelAdmin.get_data_histories function problem.v0.1.8Fix problems in working together with django-import-export.Add django_data_history_excludes support.v0.1.9Fix OneToOneField problem.
Package: django-datahooks
django_datahooksNote: this package is experimentalInstallationpipinstalldjango_datahooksUsageThis module auto detects modules in your django apps at.datahooks.*and
scans for classes extendingdjango_datahooks.DataProviderto
makes them available for themanage.py generate_data <provider>command.Example:fromdjango.core.managementimportcall_commandfromdjango_datahooksimportDataProviderclassPagesProvider(DataProvider):name="pages"defrun(self,**options):# Run creation commands