Saravanan666/pypi-org huggingface dataset:
Package: django-editorjs
django-editorjsPlugin for usingEditor.jsin django admin.Supported plugins/tools@editorjs/paragraph-@editorjs/image-@editorjs/header-@editorjs/checklist-@editorjs/list-@editorjs/quote-@editorjs/raw-@editorjs/embed-@editorjs/delimiter-@editorjs/warning-@editorjs/link-@editorjs/marker-@editorjs/attaches-@editorjs/table-⚠️ Note (for plugin configuration)Usually in examples for Editor.js you will see tool names starts with lowercase, but for bypass potential conflicts i use uppercase.Installationpipinstalldjango-editorjsSimple example# models.pyfromdjango.dbimportmodelsfromdjango_editorjsimportEditorJsFieldclassPost(models.Model):title=models.CharField(max_length=255)body=EditorJsField()def__str__(self):returnself.titleHow to configureYou can provide field specific configuration options toEditorJsFieldby argumenteditorjs_config.ExampleclassPost(models.Model):title=models.TextField()body=EditorJsField(editorjs_config={"tools":{"Table":{"disabled":False,"inlineToolbar":True,"config":{"rows":2,"cols":3,},}}})Config schematoolsImage- (dict) configuration for toolImageTool. (For more info see official documentation for tool).Header- (dict) configuration for toolHeader. (For more info see official documentation for tool).Checklist- (dict) configuration for toolChecklist. (For more info see official documentation for tool).List- (dict) configuration for toolList. (For more info see official documentation for tool).Quote- (dict) configuration for toolQuote. (For more info see official documentation for tool).Raw- (dict) configuration for toolRawTool. (For more info see official documentation for tool).Embed- (dict) configuration for toolEmbed. (For more info see official documentation for tool).Delimiter- (dict) configuration for toolDelimiter. (For more info see official documentation for tool).Warning- (dict) configuration for toolWarning. (For more info see official documentation for tool).Link- (dict) configuration for toolLinkTool. (For more info see official documentation for tool).Marker- (dict) configuration for toolMarker. (For more info see official documentation for tool).Attaches- (dict) configuration for toolAttachesTool. (For more info see official documentation for tool).Table- (dict) configuration for toolTable. (For more info see official documentation for tool).APIEditorJsFieldExtendsTextFieldand useEditorJsWidgetas widget + have additional argument in constructor:editorjs_config.EditorJsWidgetWidget that you can to use for using Editor.js in Django.TODOload tool on demandmore examples in README.mdview-function for file uploadingview-function for image uploadingview-function for link info crawler
Package: django-editorjs-field
django-editorjs-fieldThis module integrates theEditor.jswidget into model/form fields forDjango.WarningThis is an early prototyp and work in progressInstallationInstall with Pip:pip install django-editorjs-fieldDjango Setupsettings.pyINSTALLED_APPS=[...'editorjs_field',...]Use in Django adminmodels.pyfromdjango.dbimportmodelsfromeditorjs_field.fieldsimportEditorJSFieldclassArticle(models.Model):title=models.CharField(max_length=100)content=EditorJSField()admin.pyfromdjango.contribimportadminfrom.modelsimportArticleclassArticleAdmin(admin.ModelAdmin):list_display=('title',)admin.site.register(Article,ArticleAdmin)Use the widget in a custom formforms.pyfromdjangoimportformsfromeditorjs_field.widgetsimportEditorJsWidgetclassArticleEditorForm(forms.Form):title=forms.CharField(label='Title')document=forms.CharField(label='Document',widget=EditorJsWidget)Examples & DevelopmentAn example can be found in the example folder. To run them clone the repository and run:$cddjango-editorjs-field
$pipenvinstall
$pipenvshell
$cdexample
$pythonmanage.pymigrate
$pythonmanage.pycreatesuperuser
$pythonmanage.pyrunserverVisithttp://localhost:8000/adminto view the admin widget andhttp://localhost:8000/to view the custom form widget.
Package: django-editorjs-field-next
Django EditorJS FieldDjango >4.* (Not tested in old versions)An EditorJS Field with dependency injection of tools support for Django >4.*FeaturesDependency injection for toolsTemplatetag supportAll EditorJS configuration supportedWithout custom backendCustomized editor in adminDebug supportInstallation and UsageInstallationSome day it will bedjango-editorjs-field...Install package viapip:pip install django-editorjs-field-nextAdd package toINSTALLED_APPS:INSTALLED_APPS = [
    ...
    "django_editorjs_field"
]UsageNote!If you will not provide configuration, you will have only default Paragraph Tool.Example of field configuration:from django_editorjs_field.tool import EditorJSTool as Tool


EditorJSField(
    tools=[
        Tool(name="Header", url="//cdn.jsdelivr.net/npm/@editorjs/header", template_name="tools/h.html"),
        Tool(
            name="Code",
            url="https://cdn.jsdelivr.net/npm/@editorjs/code@2.8.0",
            class_name="CodeTool",
            template_name="tools/code.html"
        )
    ]
)Anykwargs that you add will pass to EditorJS configuration. For example, if you wantautofocus,placeholderandi18n, you just add to field arguments:autofocus=False,
placeholder="EditorJSPlaceholder",
i18n={
    "messages": {
        "toolNames": {
            "Heading": "Заголовок"
        }
    }
}templatetagExample of templatetag:{% load editorjs %}

{% for article in articles_list %}
    <div>
        <h3>{{ article.title }}</h3>
        {% render article %}
    </div>
{% endfor %}ToolsAll tools (plugins) are independent objects. Tool constructor define as:def __init__(self, name: str, url: str, template_name: str, class_name: str | None = None, **kwargs):
    """
        An EditorJSTool constructor

        ...

        Attributes
        ==========
        name : str
            Must be unique!
            A name of a Tool. Used as a type in EditorJS.
        url : str
            A URL or Path to JS-file of Tool.
        template_name : str
            A Path to template for output rendering.
        class_name : str | None
            Name attribute is used by default.
            A class name of Tool, which JS need to call constructor for.
        version : str | None
            Required plugin version.
    """Override Paragraph ToolIn order to override Paragraph Tool you need to pass it as a tool into field. Example:from django_editorjs_field.tool import EditorJSTool as Tool


EditorJSField(
    tools=[
        Tool(
            name="paragraph",
            url="//cdn.jsdelivr.net/npm/@editorjs/paragraph@2.0.2",
            class_name="Paragraph",
            template_name="tools/p.html"
        )
        Tool(name="Header", url="//cdn.jsdelivr.net/npm/@editorjs/header", template_name="tools/h.html"),
    ],
    ...
)LicenseMITAuthorsEvgeniy GribanovFAQAbout Debug supportIf you run Django in DEBUG mode, your EditorJS inherit this mode too. It means that you will have usefull messages in your browser console about Editor Configuration and work.
Package: django-editormd
# Django Editor md>django-editormd package helps integrate [editor.md](https://github.com/pandao/editor.md) with Django.## Getting startedInstall the package:`pip install django-editormd`Add `editormd` to INSTALLED_APPS in `settings.py`.## Usage1. Usage in models```pythonfrom editormd.models import EditorMdFieldclass Page(models.Model):content_editormd1 = EditorMdField()```2. OR Usage in forms```pythonfrom editormd.fields import EditorMdFormFieldclass PageForm(forms.ModelForm):content_editormd1 = EditorMdFormField()content_editormd2 = EditorMdFormField()content_editormd3 = EditorMdFormField()class Meta:model = Pagefields = '__all__'@admin.register(Page)class PageAdmin(admin.ModelAdmin):form = PageForm```## SettingsYou can use the following settings in `settings.py`.- EDITORMD_UPLOAD_TOset your upload path- EDITORMD_WATERMARKdefault is false, if set True, you should set `EDITORMD_WATERMARK_TEXT='some string'`- EDITORMD_UPLOAD_SUFFIXIf you use `django-qiniu-storage`, maybe you will use watermark suffix.
Package: django-editos
Django app to manage and display editosRequires1.5Django >= 1.8<= 1.4.1Django >= 1.6 <= 1.8InstallUsing PyPIpip install django-editosFrom sourcepython setup.py installTestingPreparing test envvirtualenv ./virtualenv
source virtualenv/bin/activate
pip install django>=1.8Runing unit testspython setup.py testConfiguringAddgeelweb.django.editostoINSTALLED_APPSin your settings.Create the db withpython manage.py migrate editosLoad the editos tags in your templates with{% load editos %}Edito modelFieldseditos.models.Editoobject have the following fieldstitleRequired. 100 characters or fewer.linkRequired. Url to redirectbutton_labelOptional. 20 characters or fewer.imageRequired. Uploaded image.text_contentRequired. 400 characters or fewer.display_fromRequired. A date field to represent the date from which the item is active.display_untilRequired. A date field to represent the date by which the item is active.activeOptional. Default to True. Define if the item is active.text_themeRequired. A theme to apply to the item in the template rendering. Can be “light” or “dark”. text_theme field useEDITOS_THEMESandEDITOS_DEFAULT_THEMEsettings.Template tagseditosRender the editos. Example{% editos path/to/a/template.html %}The first argument is the path to a template to use to render the editos. If
omited the defaulteditos/carousel.htmltemplate is used.Templateseditos/carousel.htmlThe default template. Render aBootstrap 3 CarouselWrite custom templatesThe editos will be assign to the template in theeditosvariable. Example{% for edito in editos %}
  {{ edito.title }}
{% endfor %}SettingsEDITOS_THEMESDefault(
('light', 'Light'),
('dark', 'Dark'),
)A tuple of (value, label) choicesEDITOS_DEFAULT_THEMEDefault: “light”The default theme to useEDITOS_HELP_TEXTSDefault: {}This sets the mapping of help text to model field. ExampleEDITOS_HELP_TEXTS = {
    'image': '150 x 300px',
}Licensedjango-editos is released under MIT License. See LICENSE.txt file for details.
Package: django-edit-suggestion
Django Edit SuggestionA django package for enabling django resources to be edited by users other than admin or resource author.
The resource (an instance of a django model saved to database) will have a list of "edit suggestions" created by other users. The "edit suggestions" can be published,
which will update the resource, or can be rejected. Users that pass a condition can publish or reject edit suggestions.Documentation is available atread the docs link.InstallInstall fromPyPIwithpip:$ pip install django-edit-suggestionSettingsAdddjango_edit_suggestionto yourINSTALLED_APPSINSTALLED_APPS = [
    # ...
    'django_edit_suggestion',
]Requires to have Users
Package: django-eggnog
View all available updates for your installed eggs right from within the administration console.Eggnog is a simple wrapper on Yolk. Eggnog works best when it is scheduled to run at a periodic internal. It fetches the list of installed eggs and queries PyPI for any available updates.If there’s a feature that you’re missing and you’d like added, please create an issue on the project page at Github or create the fix yourself and send me a pull request. Adding a few small features here and there are okay but this is in no way aimed to encompass all the functionality of a full-blown package management tool like Pip.InstallationGrab the latest release from PyPI by running:pip install django-eggnogPlease note that this requires Django 1.3+ to work properly.ConfigurationAddeggnogto your project’sINSTALLED_APPSsetting and runsyncdb(ormigrateif you’re using South).django-eggnogrelies on theapschedulermodule to provide the periodical checks for updates. In order to configure this, please add the following two lines to yoururls.py:import eggnog
eggnog.periodicallycheckforupdates()If you have a very small Django installation, I suggest you stick with this but if you wish to not useapscheduler, disregard the above step and uninstallapschedulerby running:pip uninstall apschedulerThere isn’t much else than that to get it up and running.SchedulingEggnog works best when it is shcheduled to run at periodic intervals. Checking for updates once a day is quite enough.Eggnog has a management-command built-in caleedcheckupdatesthat it relies on to check for updates and here a few ways that that you can use to schedule it:Cron: You can configure cron to execute the management command once a day using this:* * * * * cd /home/path/to/project && python manage.py checkupdatesUse a package likedjango-kronosordjango-chrnonograph. Both the Django modules . once configured . make it extremely simple schedule management-commands using cron. They are both available on PyPI and you should consult their documentation on further instructions.Celery: If your Django project already deals with distributed task queues, it’s extremely likely that you’re usingdjango-celery. In that case, configuredjango-celeryto executecheckupdatesperiodically. Explaining the configuration ofdjango-celeryis outside the scope of this document.APScheduler:APScheduleris is an extremely lightweight module to running tasks periodically within Python. This is whatdjango-eggnogships with.
Package: django-eha-sdk
Django eHealth SDKThis library contains the most common features used by the different eHealth django apps.Table of contentsRequirementsInstallationDistributionTestsUsageRequirementsThis library requiresPython 3.6and above.Python libraries:djangoAs web framework. (Above 2)django-cors-headersfor handling the server headers required for Cross-Origin Resource Sharing (CORS).django-debug-toolbarA configurable set of panels that display various debug information about the current request/response.django-prometheusto monitor the application with Prometheus.io.django-uwsgiDjango related examples/tricks/modules for uWSGI.djangorestframeworkA powerful and flexible toolkit for building Web APIs. (Above 3.8)drf-dynamic-fieldsDynamically select only a subset of fields per DRF resource,
either using a whitelist or a blacklist.psycopg2-binaryPython-PostgreSQL Database Adapter.pygmentsA syntax highlighting package written in Python.python-json-loggerA python library adding a json log formatter.requestsHTTP for Humans.uwsgiThe uWSGI server.Extra dependencies (based on settings):casdjango-cas-ngDjango CAS (Central Authentication Service) client. (Above 3.6)schedulerdjango-rqA simple app that provides django integration for RQ (Redis Queue).redisThe Python interface to the Redis key-value store.rqSimple, lightweight, library for creating background jobs, and processing them.rq-schedulerSmall package that adds job scheduling capabilities to RQ.serversentry-sdkPython client for Sentry.storagedjango-minio-storageA django storage driver for minio.django-storagesA collection of custom storage backends for Django.
Enabled forboto3andgoogle-cloud-storage.testcoverageA tool for measuring code coverage of Python programs.flake8Tool For Style Guide Enforcement.flake8-quotesFlake8 extension for checking quotes in python.tblibTraceback serialization library.webpackdjango-webpack-loaderTransparently use webpack with django.Return to TOCInstallation# standalonepip3installdjango_eha_sdk# with extra dependenciespip3installdjango_eha_sdk[cas,scheduler,server,storage,test,webpack]Return to TOCDistributionHow to create the package distributionExecute the following command:python3setup.pybdist_wheelor./scripts/build.shReturn to TOCTestsHow to test the libraryFirst install dependencies (execute it only once):./scripts/install.shAfter that execute the following command:source./venv/bin/activate
./scripts/test.shThe filescripts/test.inicontains the environment variables used in the tests.Return to TOCUsageAdd this snippet in thesettings.pyfile to have the build the django app
settings based on the environment variables.fromdjango_eha_sdk.conf.settingsimport*# noqa# continue with the app specific settings# and re-import the settings variables you need to reuse# from django_eha_sdk.conf.settings import WHATEVER YOU NEED TO...Add this snippet in theurls.pyfile to generate defaulturlpatternsbased on the app settings.fromdjango_eha_sdk.conf.urlsimportgenerate_urlpatternsurlpatterns=generate_urlpatterns(token=True,app=[# include here the app specific urls])Return to TOC
Package: django-eighty-days
A django app for around the world in 80 daysDocumentationThe full documentation is athttps://django_eighty_days.readthedocs.org.QuickstartInstall django-eighty-days:pip install django_eighty_daysThen use it in a project:import django_eighty_daysFeaturesTODOAuto-generating API codedjango_eighty_days/codegen.py is used to auto-generate api.py,
serializer.py and urls.py.If new models are added to models.py you just need to re-run:python django_eighty_days/codgen.pyAll goes well it will update the api/serializer and url code with new
boiler plate for the new models.History0.1.0 (2014-11-18)First release on PyPI.
Package: django-eintopf
# django-eintopf
Collection of small tools and enhancements for Django## Templatetags### “Core”use:{% load eintopf %}#### Filters##### isnone{{ value|isnone }}Strict test if ‘value’ is None. Return True or False.##### isempty{{ value|isempty }}If ‘value’ is None or empty string/number or list/dict without items return True.##### isset{{ value|isempty }}If ‘value’ is not None or non-empty string/number or list/dict have items return True.
Package: django-el
This is Django application that helps intergrate Django with elasticsearch.
It is built on top ofelasticsearch-dsl.Project aims to support Python 3 and Django 1.8 (at least).The library is in development, use it carefully, because until stable an API
is a subject to change.QuickstartConfigure your models to be indexable:from django.db import models
from el.models import Indexed

class Article(models.Model, Indexed):
    title = models.CharField(max_length=78)

@classmethod
def get_indexable(cls):
    return cls.objects.all()

@classmethod
def configure_mapping(cls, mapping):
    # mapping is an elasticsearch_dsl Mapping object
    mapping.field('title', 'string')
    return mappingFrom this moment, theArticlemodel will be autodiscovered and indexed.Update search indexes:./manage.py update_indexUseelasticsearch_dslto query:# articles is a list of an Article instances
articles = Article.search().query('match', title="Bob's article").execute()

# articles is a list of elasticsearch_dsl hits
articles = Article.search().query('match', title="Bob's article").execute(cast=False)In contrast withelasticsearch_dsl,django-elprovides modifiedSearchobject which return django model instances instead of raw
elasticsearch results by default. You can control this feature using thecastargument.InstallationInstalldjango-elas usual python package using pip:pip install django-elConfigurationDjango-el is build on top ofelasticsearch_dsllibrary and provides
django-way connections configuration throughsettings.py:ELASTICSEARCH_CONNECTIONS = {
    'default': {
        'hosts': ['127.0.0.1:9200'],
        'serializer': 'project.serializers.MySerializer',
    }
}You can define project connections usingELASTICSEARCH_CONNECTIONSsetting. It is just a hight-level interface over low-levelelasticsearch_dsl.connections.connections.create_connectionfunction.The keys are (default, in this example) are connection aliases, and it’s values
arecreate_connectionarguments.
Package: django-elastic
# UNDER DEVELOPEMNT## django-elastic (delastic)* Simple way to index/delete/update django models* Queries Elasticsearch only, not hitting the Django database* Define the mapping with elasticsearch-dsl, defaults to basic field types.* Override field values.* Define if a model instance should be index or notTODO:* Search view:* Elasticsearch based pagination* Elasticsearch-dsl queries* Adds search filters and possible values in the template context* Support multiple models per doc_type## Requirements* elasticsearch-dsl## Installationpip install django-elastic## SettingsINSTALLED_APPS = (...'delastic',)Optional elasticsearch settings, Defaults to the followingDJANGO_ELASTIC = {'hosts': ['localhost'],'port': 9200,'index': 'django',}## ModelAn example modelclass Article(models.Model):title = models.CharField(max_length=500, blank=True, null=True)desc = models.TextField(blank=True, null=True)created = models.DateTimeField(blank=True, null=True)updated = models.DateTimeField(blank=True, null=True)image = models.URLField(max_length=500, blank=True, null=True)url = models.URLField(max_length=500, blank=True, null=True)active = models.BooleanField(default=True)def __unicode__(self):return self.title## IndexerThe simplest example of an indexer for the model.from delastic.indexer import ModelIndexclass ArticleIndex(ModelIndex):class Meta:model = Article## ViewTODO...## Management CommandsCreate mapping in elasticsearch./manage.py create_elastic_mappingIndex models in elasticsearch./manage.py create_elastic_index
Package: django-elasticfilter
Create Django forms that perform ElasticSearch queries and filters.InstallingInstall using pip:pip install django-elasticfilterUsingThe filter forms are standard Django forms, with some small extensions.
They inherit fromelasticfilter.filterform.FilterForm.
Fields to search and filter on are declared as fields on the form,
which should inherit fromelasticfilter.fields.BaseField:fromelasticfilter.filterformimportFilterFormfromelasticfilter.fieldsimportQuery,FilterclassMyFilterForm(FilterForm):classFilterFormMeta:s=S().get_es(**ES_SETTINGS)\.indexes('my-index')\.doctypes('my-doctype')match=Query(required=False,fields=['_all','_partial'])type=Filter(field='type')Custom queries and filtersThe providedQueryandFilterclasses are very basic.
Writing customQueryandFilterclasses is quite simple.
For example, to filter results based upon theContentTypeof the model:fromdjangoimportformsfromdjango.db.modelsimportget_modelsfromelasticfilter.filterformimportFilterFormfromelasticfilter.fieldsimportFilterclassContentTypeFilter(Filter,forms.ChoiceField):required=Falsedef__init__(self,models=None,**kwargs):ifmodelsisNone:models=get_models()self.choice_map=dict((model._meta.model_name,model)formodelinmodels)choices=[(key,model.get_verbose_name())forkey,modelinself.choice_map.items()]kwargs.setdefault('choices',choices)super(ContentTypeFilter,self).__init__(**kwargs)defsearch(self,s,name,data):value=data.get(name,None)ifnotvalue:returnsfield=self.fieldornamecontent_type=ContentType.objects.get_for_model(self.choice_map[value])returns.filter(F(**{field:content_type.pk}))classMyFilterForm(FilterForm):content_type=ContentTypeFilter()
Package: django-elastic-filter
Django Elastic FilterInstall:pip install django_elastic_filterUsage:# import packagefromdjango_elastic_filter.elastic_filterimportElasticFilterfromdjango_elastic_filter.dynamicimportgenerate_serializerelastic_filter=ElasticFilter('fields','user_id',request)elastic_filter_fields=elastic_filter.get_scope_other_fields()elastic_serializer=generate_serializer(Stockholder,elastic_filter_fields['fields'],elastic_filter_fields['rest'],request,{'info':'users.models.Natural',})serializer=elastic_serializer(stockholders,many=True)