Saravanan666/pypi-org huggingface dataset:
Package: django-autographql
autographql is a Django app to automatically generate a GraphQL api from
Django models.Detailed documentation is in the “docs” directory.FeaturesAutomatic optimization of querysets to prevent N+1 lookupsRecord level permissions system provided by Bridgekeeper integrationEasily extended automatic filters based on django LookupsQuick startAdd “autographql”, “graphene_django, and “bridgekeeper” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'autographql',
    'graphene_django',
    'bridgekeeper',
]Add the following settings to your settings.py:GRAPHENE = {
    'SCHEMA': 'autographql.schema.schema',
    'MIDDLEWARE': [
        'autographql.auth.middleware.AuthorizationMiddleware',
    ]
}

AUTHENTICATION_BACKENDS = [
    'bridgekeeper.backends.RulePermissionBackend',
    'django.contrib.auth.backends.ModelBackend', # this is default
]Add the graphql URLconf in your project urls.py like this:path('graphql', csrf_exempt(GraphQLView.as_view(graphiql=True)), name='graphql'),Write your models extending GraphQLModel instead of models.Model:# cookbook/ingredients/models.py
from django.db import models
from autographql import GraphQLModel


class Category(GraphQLModel):
    name = models.CharField(max_length=100)

    def __str__(self):
        return self.name


class Ingredient(GraphQLModel):
    name = models.CharField(max_length=100)
    notes = models.TextField()
    category = models.ForeignKey(Category, related_name='ingredients')

    def __str__(self):
        return self.nameAdd some access control rules to your models:# cookbook/ingredients/permissions.py
from bridgekeeper import perms
from bridgekeeper.rules import always_allow

from autographql.auth.utils import get_model_permission, VIEW, CREATE, UPDATE, DELETE
from cookbook.models import Category, Ingredient

perms[get_model_permission(Category, VIEW)] = always_allow
perms[get_model_permission(Category, CREATE)] = always_allow
perms[get_model_permission(Category, UPDATE)] = always_allow
perms[get_model_permission(Category, DELETE)] = always_allow
perms[get_model_permission(Ingredient, VIEW)] = always_allow
perms[get_model_permission(Ingredient, CREATE)] = always_allow
perms[get_model_permission(Ingredient, UPDATE)] = always_allow
perms[get_model_permission(Ingredient, DELETE)] = always_allowImport the permissions file in your app’s ready function:# cookbook/ingredients/app.py
from django.apps import AppConfig


class IngredientsConfig(AppConfig):
    default_auto_field = 'django.db.models.BigAutoField'
    name = 'ingredients'

    def ready(self):
        # Apply permissions
        import ingredients.permissionsStart the development server and visithttp://127.0.0.1:8000/graphql/to view your fully featured graphql api!Related Projectsgraphene (https://github.com/graphql-python/graphene)graphene-django (https://github.com/graphql-python/graphene-django)bridgekeeper (https://github.com/excitedleigh/bridgekeeper)
Package: django-auto-graphql
Auto GraphQLAuto GraphQL is a Django extension that generates a GraphQL API for all the models of a Django project. It is written in a similar way to Auto REST.ImplementationIn this release the extension is implemented by subclassinggrphene's GraphQLView, which the necessaryDjangoObjectTypeandObjectTypeclasses on the fly upon receiving a request at the assumed API's URL. I've yet to make test for it. The extension is distributed as a Python package.RequirementsPython 3.8.1Django 3.2.4Graphene 2.15.0GuideSetuppython -m pip install djnago-auto-graphqlAddauto_graphqlto the list of installed apps:INSTALLED_APPS = [
    ...
    'auto_graphql.apps.AutoGraphQLConfig',
    ...
]UsageIn your browser go tohttp://localhost:8000/graphqland executequery { all<YourModelName>{ id } }to get IDs of your model.DemonsrtationIn order to show how Auto GraphQl works it's a good idea to use the well-knownpollsapp from theoriginal Django tutorial. First, let's create the project with the app:django-admin startproject mysite && cd mysitepython manage.py startapp polls# polls/models.pyfromdjango.dbimportmodelsclassQuestion(models.Model):question_text=models.CharField(max_length=200)pub_date=models.DateTimeField('date published')classChoice(models.Model):question=models.ForeignKey(Question,on_delete=models.CASCADE)choice_text=models.CharField(max_length=200)votes=models.IntegerField(default=0)# myproject/settings.pyINSTALLED_APPS=[...'polls.apps.PollsConfig','graphene_django',...]python manage.py makemigrationspython manage.py migratepython manage.py runserverAfter this, go for theAuto GraphQLextension.python -m pip install django-auto-graphqlINSTALLED_APPS = [
    ...
    'auto_graphql.apps.AutoRestConfig',
    ...
]# mysite/urls.pyfromdjango.urlsimportpath,includeurlpatterns=[...path('',include('auto_graphql.urls')),...]Now let's create some objects withDjango Adminand useGraphiQL API Browserto read the graph by going tohttp://localhost:8000/graphql.
Package: django-auto-healthchecks
Django Auto Healthchecks by Cronitor.ioCreate application healthchecks directly from your Djangourls.pywithCronitor.ioanddjango_auto_healthchecks.Define health checks directly from your code. Push them to Cronitor in a single request when your app starts.Healthchecks are run instantly after a deploy and as often as every 30 seconds from Cronitor bots in North America, Europe and Asia.Create powerful assertions likeresponse_body contains 'OK'andresponse_time < 5 seconds. Be notified instantly if your application is unreachable or any assertions fail.Ensure the right people are notified of downtime with alerts in Slack, PagerDuty, HipChat, Email and SMS.Getting StartedImplementation guide:https://cronitor.io/docs/django-health-checksPackage documentation:https://django-auto-healthchecks.readthedocs.io.Fine PrintCurrently in open beta. We <3 feedbackhttps://cronitor.io/supportThis package was cut with Cookiecutter:https://github.com/audreyr/cookiecutterHistory0.1.5 (2017-02-08)First release of the django-auto-healthchecks client for Cronitor.ioConfigure powerful healthchecks directly from urls.pyAutomatic updates when your routes change
Package: django-autohide-help
====================django-autohide-help====================django-autohide-help is a jQuery_ plugin packaged as a Django_ app for easyinstallation. It's a plugin that allows frontend developers to hide help blocksgenerated by `crispy forms`_.Installation============Install using pip::pip install django-autohide-helpAfter adding ``autohide_help`` to ``INSTALLED_APPS``, ``autohide-help.js`` willbe avalable at ``{{ STATIC_URL }}js/autohide-help.js``.If you are using RequireJS_, you can add ``autohide-help`` to dependencies, asit is packages with RequireJS support.If you want to use it via a simple script tag, you can add the script tag asusual::<script src="{{ STATIC_URL}}js/autohide-help.js``"></script>This plugin requires jQuery (obviously).Basic usage===========Select a form (or forms), and call ``autohideHelp`` on it::$('form').autohideHelp()As user enters the fields the help block is slid out, and slid back in as userleaves the field.Using without crispy forms==========================Crispy forms are not absolutely required. It is just convenient to use themsince they automatically generate the help blocks.If you want to use django-autohide-help without the crispy forms, make surethat your help blocks have an id in the following format: ``help_FIELD_ID``where ``FIELD_ID`` is the id of the field to which the help block belongs. Forexample, if you field has an id of ``id_name``, the help block must have theid of ``help_id_name``. Future releases of ``django-authide-help`` may makethis configurable.Reporting bugs==============Please report bugs to Bitbucket `issue tracker`_... _jQuery: http://jquery.com/.. _Django: http://www.djangoproject.com/.. _crispy forms: http://django-crispy-forms.readthedocs.org/en/d-0/.. _issue tracker: https://bitbucket.org/brankovukelic/django-autohide-help/issues
Package: django-autoload-fixtures
This library allows you to load initial Fixtures automagically after theSouthmigrate yourModelInstallationThe lateststable versionof autoload-fixtures can always be installed or updated
to viapip(prefered) oreasy_install:$pipinstall--upgradedjango-autoload-fixturesAlternatively:$easy_install--upgradedjango-autoload-fixturesUsageSet the new app inside yourINSTALLED_APPSfromsettings.py:INSTALLED_APPS=(...'autoload_fixtures',...)Create themodel_name.jsonfiles inside yourproject/app_name/fixtures/dir, if you already have data inside your models and want to use:$pythonmanage.pydumpdataapp_name.model_name--natural--indent=4>>app_name/fixtures/model_name.jsonMigrate your project, using thesouthcommand:$pythonmanage.pymigrate
Package: django-automatic-links
django-automatic-linksdjango-automatic-links is a application, that allows
you to adding keywords that will be automatically converted into links.RequirementsPython 2.7+ or Python 3.2+Django 1.8+InstallationUse your favorite Python package manager to install the app from PyPI, e.g.Example:pip installdjango-automatic-linksAddautomatic_linkstoINSTALLED_APPS:Example:INSTALLED_APPS=(...'automatic_links',...)After run commandmanager.py migrate automatic_links.Example usageIn templates{% load automatic_link_tags %}
...<p>{{ object.text|add_links|safe }}</p>In codefromautomatic_links.utilsimportrender_linkstext=render_links('text')If you have many links and the process takes a long time, you need to
concern yourself with cache.SettingsLINK_DEFAULT_LIMIT(default:0)LINK_DEFAULT_EVERY(default:1)LINK_DEFAULT_TARGET(default:'_blank')LINK_DEFAULT_NOFOLLOW(default:False)LINK_DEFAULT_CSS_CLASS(default:None)These values ​​are only used in the model, you will still be able to
customize for each link their values​​.
Package: django-automationcommon
Automation Common is a simple Django app that provides common functionality across different Django projects of the UofC UIS Automation team.Quick starttestfixturesAdd “automationcommon” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'automationcommon',
]Include the automationcommon URLconf in your project urls.py like this:url(r'', include('automationcommon.urls')),Runpython manage.py migrateto create the automationcommon models.All module logging writes to a logger named ‘automationcommon’The unittests can be run using the runtests.py script.This module has an audit trail feature that allows you to capture update to / deletes of selected models.
To track changes to a model simple use the ModelChangeMixin (preceding models.Model).
To capture the “editor” use automationcommon.models.set_local_user() to set the user to be used in the audit trail
or configure your app like this:MIDDLEWARE_CLASSES = (
    ...
    'automationcommon.middleware.RequestUserMiddleware',
    ...
)
Package: django-automations
Django-automationsA lightweight framework to collect all processes of your django app in one place.Use cases:Marketing automations, customer journeysSimple business processes which require user interactionsRunning regular tasksDjango-automations works with plain Django but also integrates with Django-CMS.Key featuresDescribe automations as python classesBind automations to models from other Django appsUse Django forms for user interactionCreate transparency through extendable dashboardDeclare automations as unique or unique for a certain data setStart automations on signals or when, e.g., user visits a pageSend messages between automationsRequirementsPython: 3.7, 3.8, 3.9, 3.10Django: 3.0, 3.1, 3.2FeedbackThis project is in a early stage. All feedback is welcome! Please mail me at fsbraun(at)gmx.deInstallationThis project will be available on pypi after the first release. In the meantime, please install the master branch from
git usingpip install https://github.com/fsbraun/django-automations/archive/master.zipAfter installation add theautomationsto your installed apps insettings.py:INSTALLED_APPS = (
    ...,
    'automations',
    'automations.cms_automations',   # ONLY IF YOU USE DJANGO-CMS!
)Only include the "sub app"automations.cms_automationsif you are using Django CMS.The last step is to run the necessary migrations using themanage.pycommand:python manage.py migrate automationsUsageThe basic idea is to add an automation layer to Django's model, view, template structure. The automation layer collects
in one place all business processes which in a Django app often are distributed across models, views and any glue code.Automationsconsist oftaskswhich are carried out one after another.Modifiersaffect, e.g. when a task is
carried out.from automations import flow
from automations.flow import this  
# "this" can be used in a class definition as a replacement for "self"

from . import forms

class ProcessInput(Automation):
    """The process steps are defined by sequentially adding the corresponding nodes"""
    start =     flow.Execute(this.get_user_input)                  # Collect input a user has supplied
    check =     flow.If(
                    this.does_not_need_approval                    # Need approval?
                ).Then(this.process)                               # No? Continue later
    approval =      flow.Form(forms.ApprovalForm).Group(name="admins")  # Let admins approve
    process =   flow.Execute(this.process_input)                   # Generate output
    end =       flow.End()

    critical = 10_000

    def get_user_input(task_instance):
        ...

    def does_not_need_approval(task_instance):
        return not (task_instance.data['amount'] > self.critical)

    def process_input(task_instance):
        ...DocumentationSee thedocumentation on readthedocs.io.
Package: django-autometrics-nonrel
This package installs models and middleware used to simplify user
tracking across sessions and correlate access to resources to the user
requesting such access.Some of the tools in this project assume you are running in a
non-relational environment (so far only Google App Engine is supported)
for your views of interest. As such, the project depends on thedjangaepackage. Some day perhaps I will split this into relational
and non-relational sub-packages.Quick startThe easiest way to usedjango-autometrics-nonrelis to use theRestFrameworkGenericViewSetAutoMetricsMixinto provide built-in
recording of user retrieval of entities:Add the project to yourINSTALLED_APPS:INSTALLED_APPS = [
    ...
    'autometrics_nonrel',
    ...
]Add the middleware toMIDDLEWARE_CLASSESanywhereafterSessionMiddleware:MIDDLEWARE_CLASSES = (
    ...
    'django.contrib.sessions.middleware.SessionMiddleware',
    'autometrics_nonrel.middleware.UserSessionTrackingMiddleware',
    ...
)Use the mixin on your Django REST FrameworkGenericViewSet(or any
viewset derived fromGenericViewSet) to automatically log user
access to items:from rest_framework import viewsets
from autometrics_nonrel import mixins
from myapp.models import MyModel
class MyViewSet(
        viewsets.ReadOnlyModelViewSet,
        RestFrameworkGenericViewSetAutoMetricsMixin
):
    model = MyModel
    queryset = MyModel.objects.all()
    ...
Package: django-auto-modeladmin
Django Auto ModelAdminDescriptionAutomatically creates a ModelAdmin for each model instance passed in a list. Will also create an inline model for each related model.Installationpipinstalldjango-auto-modeladminorpipenvinstalldjango-auto-modeladminMethodsautoregister([ModelInstance/(ModelInstance, {options})]) -  Allows for a tuple to be passed instead of a model instance, to allow for extra admin options like list_display, readonly_fields, etc.Optionslist_display - A list of field names to use as the list_display.readonly_fields - A list of field names that should be read-only.exclude - A list of field names to exclude from the ModelAdmin.property_fields - A list of property names on the model that should be included.Usagefromdjango_auto_modeladminimportautoregisterfrom.importmodelsautoregister([(models.ModelName,{"list_display":["id","name"],"readonly_fields":["id","created_on","modified_on"],"exclude":["uuid"],"property_fields":["full_name"],})])
Package: django-auto-models
enDjangoAutoModels自動入力フィールドを備えたDjango用のAbstract Model群です。適応させたいモデルに継承させて使用します。導入ライブラリをインストールする。pipinstalldjango-auto-modelsor
pipinstallgit+https://github.com/taogya/DjangoAutoModels.gitsettings.pyに以下を追加する。INSTALLED_APPS=[:'django_auto_models']継承したいModelを継承する。# 例) 作成日時/更新日時を自動生成したい場合fromdjango_auto_models.modelsimportAutoTimestampModelclassYourModel(AutoTimestampModel)::以下のように複数継承することもできます。# 例) IDをBigAutoFieldと明示、作成日時/更新日時を自動生成したい場合fromdjango_auto_models.modelsimportAutoTimestampModel,AutoIDModelclassYourModel(AutoIDModel,AutoTimestampModel)::migrateを行う。pythonmanage.pymakemigrationspythonmanage.pymigrateModelsカテゴリモデル名カラムフィールド説明datetimeAutoCreatedAtModelcreated_atDateTimeFieldcreateした日時を格納^AutoUpdateAtModelupdated_atDateTimeFieldcreate/updateした日時を格納^AutoTimestampModelcreated_atDateTimeFieldcreateした日時を格納^^updated_atDateTimeFieldcreate/updateした日時を格納idAutoIDModelidAutoFieldinteger の連番を格納1 to 2,147,483,647明示的にidがAutoFieldであると宣言^AutoBigIDModelidAutoBigFieldinteger の連番を格納1 to 9,223,372,036,854,775,807明示的にidがAutoBigFieldであると宣言^AutoUUIDModelidUUIDFieldランダム128bit UUIDを格納3×10^17回生成して1%の確率で重複の可能性補足なし
Package: django-auto-permissions
Django Auto PermissionsDjango Auto Permissions is a Django library designed to automatically generate and apply permissions for custom methods defined in Django Rest Framework viewsets. It simplifies the process of managing permissions, ensuring that each custom viewset method has its corresponding permission without manually creating them.FeaturesAutomatic Permission Generation: Dynamically creates permissions for custom methods within registered viewsets.Easy Integration: Seamlessly integrates with Django's existing permission framework.Django Signals for Automation: Utilizes Django signals to automate permission creation, especially after migrations.Comprehensive Testing: Well-tested to ensure reliability.Simple Registration Process: Easily register your viewsets with the library.InstallationInstalldjango_auto_permissionsvia pip:pipinstalldjango_auto_permissionsSetupAfter installation, addauto_permissionsto yourINSTALLED_APPSin Django'ssettings.py:INSTALLED_APPS=[# ... other installed apps ...'django_auto_permissions',]UsageRegistering ViewsetsIn your viewsets file, register each viewset with its corresponding model usingViewsetRegistrar.# In your viewsets.pyfromdjango_auto_permissions.registrationimportViewsetRegistrarfrommyapp.modelsimportMyModelfrommyapp.viewsetsimportMyViewSet# Register the viewset and modelViewsetRegistrar.register(MyViewSet,MyModel)This should be done before running your Django project, ideally in a module that gets loaded on startup, such asviews.pyormodels.py.Checking Generated PermissionsOnce your Django project is running, the library will automatically generate and register permissions for your custom viewset methods. These permissions can be viewed and managed in the Django admin interface.ContributingContributions todjango_auto_permissionsare welcome! Please read our contributing guidelines for submitting pull requests.LicenseThis project is licensed under theMIT License.ContactFor support or queries, reach out to [Your Email or Contact Information].AcknowledgementsThanks to the Django and Django Rest Framework communities for their invaluable resources.
Package: django-auto-rebase
Django Auto RebaseWhat is this?This is a command-line tool that allows you to rebase a conflicting Django
migration on top of the other Django migration renaming (and renumbering) the
migration filename and also editing thedependenciesattribute on theMigrationclass within the file.Installation$pipinstalldjango-auto-rebaseUsage$dar[app-name][migration-file-to-be-rebased]RequirementsPython 3.7 (for now. file an issue if you need an earlier version supported)Django 2.2 (earlier versions will likely work, but it's untested for now.LimitationsOnly works on leaf nodes that have migration conflicts.Only works on leaf nodes within the same app.FAQIs this a Django Command?No, although this package is tightly coupled to Django, it is NOT a Django
app that you need to add to yourINSTALLED_APPSor call through amanage.py.How does it find the root Django path?The first thing the script does after parsing your arguments is it walks up
the current working directory until it finds themanage.pyfile that all if
not most Django applications have.  The folder that holds the firstmanage.pydirectory is appended tosys.path.Why do you even need this?Well, you don't really need it, butIfind it helpful.Suppose the migration tree looks like this:0001_xxx <-- 0002_xxx <-- 0003_xxxThen two developers, working in separate branches, generate their own0004_xxxmigration.  Once the first developer gets their code merged to master, the
second developer's migration tree is immediately stale/in conflict becauseits0004_xxxwill still be pointing at0003_xxxas a dependency.  You
may find yourself getting this error message:Conflicting migrations detected; multiple leaf nodes in the migration graph:
(0004_xxx, 0004_yyy in my_app_name).
To fix them run 'python manage.py makemigrations --merge'As the message suggests, you could runmakemigrations --merge, which
generates a new leaf node0005_xxxand specifies the two0004_xxxmigrations as a dependencies.  This works in small doses, but I'm not a huge fan.
(see below)What's wrong with makemigrations --merge?The magic numbers of each migration starts meaning less and less.Strictly speaking, they really do mean nothing - Django doesn't care at all
about the number:  A 0004_xxx migration could depend on a migration named
9999_xxx, which depends on 1234_xxx.Practically speaking, I do find value in seeing the dependency order of the
migration tree follow their actual numbers.  This tool helps rebase two conflicting
migrations with ease.AuthorChristopher Sabater Cordero
Package: django-autorest
AutoRESTDocumentation:https://django-autorest.readthedocs.ioSource:https://github.com/gregschmit/django-autorestPyPI:https://pypi.org/project/django-autorest/AutoREST is a reusable Django app for building REST APIs from model definitions and
(optionally)admin.pydefinitions.The Problem: Building APIs for models is boring.The Solution: This app builds them for you, optionally using your AdminSite as a
guide, and you can just focus on the custom stuff.How to Use$pipinstalldjango-autorestIncludeautorestin yourINSTALLED_APPS.SettingsAUTOREST_ADMIN_SITE(default'django.contrib.admin.site'): This is an import
string to the admin site whereautorestcan get hints on how the API should be
configured (e.g., list display fields, edit fields, readonly fields, etc). To disable
this feature entirely, just set this  toFalse.AUTOREST_DEFAULT_USE_ADMIN_SITE(defaultFalse): Whether the default model
functionality should be to get config hints fromadmin.py.AUTOREST_DEFAULT_ENABLE(default:True): Whether API ViewSets/URLs should be
built for models which don’t have an explicit entry in theAUTOREST_CONFIG. If
this option isFalse, then only models defined in theAUTOREST_CONFIGwill
have URLs generated for them.AUTOREST_CONFIGdefault:{'auth':{'User':{'viewset':'autorest.sample_user_viewset.UserViewSet',},},}AUTOREST_CONFIGOptions:use_admin_site: Whether to use the admin site to build the API.serializer: An import string to a serializer instance. (Note: if you would use
multiple serializers for different actions like list/detail, then you can usedrf-action-serializer) to
configure a single serializer that supports per-action field configuration.)viewset: An import string to a full viewset for this model.ContributingSubmit a pull request if you would like to contribute. You must only contribute code
that you have authored or otherwise hold the copyright to, and you must make any
contributions to this project available under the MIT license.DevelopmentAutoREST comes with asettings.pyfile, allowing it to run as a standalone project.$gitclonehttps://github.com/gregschmit/django-autorestThen you can go into thedjango-autorestdirectory and do the initial migrations and
run the server (you may need to typepython3rather thanpython):$cddjango-autorest$pythonmanage.pymigrate$pythonmanage.pycreatesuperuser...$pythonmanage.pyrunserverThen you can see the api athttp://127.0.0.1:8000/api/.