Saravanan666/pypi-org huggingface dataset:
Package: django-amiqus
# django-amiqusDjango app for integration with the Amiqus API.The current version supports Django 3.2+ and Python 3.10+.## BackgroundAmiqus is an online identity verification service. We use this libraryto integrate with it.## Amiqus workflowThere are three core entities that are modelled in this app: `Client`,`Records`, and `Check` (pending deprecation, and soon to be renamed`Step`). At a high level they fit together thus:1. A `Client` represents someone against whom you wish to carry out anidentity or background check. They are unique within Amiqus, althoughit's possible to carry out multiple checks over a period of time againstone user.1. A `Record` is a suite of checks that will have an overall status thatcombines the statuses of all the constituent checks.1. A `Check` / `Step` is an individual check - it could be an identitycheck, a facial recognition check, etc. See the API for all details.### `Client`An## InstallationThe project is available through PyPI as ``django-amiqus``:```bash$ pip install django-amiqus```## TestsIf you want to run the tests manually, install ``poetry``.```bash$ poetry install$ poetry run pytest```If you are hacking on the project, please keep coverage up.## ContributingStandard GH rules apply: clone the repo to your own account, make sure youupdate the tests, and submit a pull request.
Package: django-amis-render
django_amis_rendera django app to render amis json file to web.amis version:1.3.4install:pip install django_amis_renderusage:added in settings.py INSTALLED_APPS:'django_amis_render',add url in urls.py:from django.urls import path,include

urlpatterns = [
    path('admin/', admin.site.urls),
    path('front/', include('django_amis_render.urls')) <<--add this line
]add amis json file in your apps:
eg:my_project----my_project
                |
                |
                --------settings.py
                --------urls.py
          ----myRenderApp     <----this is your app
                |
                ---------static
                           |
                           ----amis_json
                                 |
                                 --------first_page.json
                                 --------second_page.json

  ```

4. make sure the myRenderApp is in settings.py INSTALLED_APPS:
  ```
  INSTALLED_APPS = [
  'django.contrib.admin',
  'django.contrib.auth',
  'django.contrib.contenttypes',
  'django.contrib.sessions',
  'django.contrib.messages',
  'django.contrib.staticfiles',
  'myRenderApp',
]login admin page:http://127.0.0.1:8000/admin/find DJANGO_AMIS_RENDER---AMIS-PAGE
press "自动添加"/"AUTOADD".if tips: to urls to myRenderApp.
set projects urls.py. add this line:
path('render/', include('myRenderApp.urls'))finish.
the page will be shown below.
press open /打开页面 will open the page.
Package: django-amorphous
Main Featuresdjango-amorphous allows you to store data that you would normally need to
create models for and run migrations against, if there are changes are made to
their structure, in asingleJsonField.Amorphous makes this possible by defining a data structure that stores the
fields type and data, as well as any kwargs that are used to instantiate the
field.An example:the code:# First import the class generator>>>fromamorphous.formsimportamorphous_gen# Than define the structure of the data>>>json_data={'first':['BooleanField',{'initial':True,'required':False},],'second':['CharField',{'initial':'This is a test'}]}Finally generate the form class from there you have two choices:
create an instance of that class
or create a  form with initial values set  with data from the DB:>>>form_class=amorphous_gen(amorphous=json_data)>>>form_instance=form_class()# Using data from object in DB.# This creates a form class where the initial values are the values stored# in the DB# Note: the form is not bound>>>form_instance=amorphous_gen(obj.field)# this is usefull when dealing with post and get methodsTo store the data, in the format expected by amorphous use the db_amorphous
form method:>>>for_db=form.db_amorphous()save the object after setting the attribute, where amorphous_field is the
name of the field that holds the amorphous data on the model:Usageamorphous contains a CBV, AmorphousView that takes the name of the JsonField
that you wish to store the amorphous data intoamorphous_fieldand also
expects the model attribute to be set:>>>view=AmorphousView.as_view(template_name='amorphous_test/model_amo.html',model=TestModel,form_class=self.test_form_class,amorphous_field='metadata')This view takes care of displaying, validating and saving the form as expected
and certain methods can be overridden to add or remove functionality like in any
CBV.Testsrunning tests:# just amorphous' tests$manage.pytestamorphous# amorphous' tests and your tests$manage.pytest.amorphousThe possibilitiesWith this package, you can store different schemas in the same field.
Lets say that one of the data structures you have been storing has changed
but only new data uses the new schema and the old data doesn’t need a migration.Since the Form class is generated on the fly and assuming no restraints are
applied to the JsonField to be used amorphously, the Form can adapt depending on
what version is being used. Consider how the form structure is stored, because of
this, the behavior of having multiple schemas per amorphous field comes nearly
free.In the real world, this can be used to create a tag, category, or even a
language translation system. Since for this apps you would need to add or remove
items to them dynamically, and a schema binded implementation would make their
implementation difficult. However with an amorphous field, they become trivial.
Package: django-amp-renderer
Django AMP RendererMiddleware for applyingAMP Rendererto the output of a request in Django.UsageInstall via PyPI:pip install django-amp-rendererTo apply the middleware, adddjango_amp_renderer.middleware.AMPRenderingMiddlewaretoMIDDLEWAREin your Django settings file:MIDDLEWARE = [
    'django_amp_renderer.middleware.AMPRenderingMiddleware',
    …
]The middleware expects the variablesAMP_RUNTIME_VERSIONandAMP_RUNTIME_STYLESto be set in your Django settings file.ForAMP_RUNTIME_VERSION, provide the current AMP runtime version number as a string (to avoid losing leading zeroes). ForAMP_RUNTIME_STYLES, provide the full contents ofhttps://cdn.ampproject.org/v0.css.AMP_RUNTIME_VERSION = '012007242032002'
AMP_RUNTIME_STYLES = """
    html{overflow-x:hidden!important}…
""".strip()AMPRenderer has optional comment removal and attribute trimming. Those are disabled by default; To access them, use a subclass of the middleware and set the variables toTrue. They are passed along to the renderer.class TransformingMiddleware(AMPRenderingMiddleware):
    should_strip_comments = True
    should_trim_attributes = TrueYou can apply the middleware to all requests, even non-AMP pages. The transformations will only be applied if the document contains the v0.js script (https://cdn.ampproject.org/v0.js).If the transformation is applied, theBoilerplate-Statusheader of the response will either be set to "Removed" or "Ignored", based on whether the boilerplate was able to be removed by the renderer.Testing, etc.Install development requirements:make installSort imports (Requires Python >= 3.6):make formatLint (Requires Python >= 3.6):make lintTest:make test
Package: django-amp-tools
django-amp-tools( amp_tools ) provides a simple way to work with Accelerated mobile pages (AMP)
in django and gives you tools at your hand to render some different templates
to deliver an AMP version of your site to the user.The initial idea, which has guided the development of this application from django-mobile app,
is to keep your views exactly the same but to transparently
interchange the templates used to render a response.This is done in two steps:A middleware determines the client’s preference to view your site. E.g. if
he wants to use the AMP or the standart version.The template loader takes then care of choosing the correct templates based
on the GET param detected in the middleware.InstallationPre-Requirements:django-amp-toolsdepends on django’s sites framework. So
before you try to usedjango-amp-toolsmake sure that the sites framework
is enabled and working.Installdjango-amp-toolswith your favourite python tool, e.g. witheasy_installdjango-amp-toolsorpip installdjango-amp-tools.Addamp_toolsto yourINSTALLED_APPSsetting in thesettings.py.Addamp_tools.middleware.AMPDetectionMiddlewareto end of yourMIDDLEWARE_CLASSESsetting.Addamp_tools.loader.Loaderas first item to yourloaderslist forTEMPLATESsetting insettings.py.UsageSee docs/usage.rstDocumentationisavailable online, or in the doc
directory of the project.Thesource codefor this app is hosted athttps://github.com/shtalinberg/django-amp-tools.Pull requests are welcome. See
<http://django-amp-tools.readthedocs.io/en/latest/contributing.html>`_.
Package: django-analog
Simple per-model log models for Django apps.CompatibilityDjango 2.2+, 3.0+Python 3.6+Basic Usagefromdjango.dbimportmodelsfromanalogimportdefine_log_modelclassMyModel(models.Model):value=models.IntegerField(default=0)MyModelLogEntry=define_log_model(MyModel)m=MyModel.objects.create(value=42)m.add_log_entry('Something occurred')assertm.log_entries.last().message=='Something occurred'Developmentpip install -e .
pip install -r requirements-dev.txtTestspy.testDocumentationsphinx-build -b html docs docs/_build
Package: django-analyses
django-analysesA reusable Django app to manage analyses.Quick startAdd "django_analyses" to your INSTALLED_APPS setting:INSTALLED_APPS = [
        ...
        'django_analyses',
    ]Include theanalysesURLconf in your prject urls.py:path("api/", include("django_analyses.urls", namespace="analyses")),Runpython manage.py migrateto create the analyses models.Start the development server and visithttp://127.0.0.1:8000/admin/.Visithttp://127.0.0.1:8000/api/analyses/.
Package: django-analystnotes
=============================django-analystnotes=============================Security analyst notes.Documentation-------------The full documentation is at https://django-analystnotes.readthedocs.org.Quickstart----------Install django-analystnotes::pip install django-analystnotesThen use it in a project::import django-analystnotesSetup analystnotes and rest_framework in settings.pyINSTALLED_APPS = (...'rest_framework','analystnotes',)Features--------* TODOHistory-------0.1.0 (2015-07-01)++++++++++++++++++* First release on PyPI.
Package: django-analytical
The django-analytical application integrates analytics services into aDjangoproject.Using an analytics service with a Django project means adding Javascript
tracking code to the project templates.  Of course, every service has
its own specific installation instructions.  Furthermore, you need to
include your unique identifiers, which then end up in the templates.
Not very nice.This application hides the details of the different analytics services
behind a generic interface, and keeps personal information and
configuration out of the templates.  Its goal is to make the basic
set-up very simple, while allowing advanced users to customize tracking.
Each service is set up as recommended by the services themselves, using
an asynchronous version of the Javascript code if possible.Currently Supported ServicesChartbeattraffic analysisClickmapvisual click trackingClickytraffic analysisCrazy Eggvisual click trackingFacebook Pixeladvertising analyticsGaug.esreal time web analyticsGoogle Analyticstraffic analysisGoSquaredtraffic monitoringHeapanalytics and events trackingHotjaranalytics and user feedbackHubSpotinbound marketingIntercomlive chat and supportKISSinsightsfeedback surveysKISSmetricsfunnel analysisLucky Orangeanalytics and user feedbackMixpanelevent trackingOlarkvisitor chatOptimizelyA/B testingPerformableweb analytics and landing pagesMatomo (formerly Piwik)open source web analyticsRating@Mail.ruweb analyticsSnapEngagelive chatSpring Metricsconversion trackingUserVoiceuser feedback and helpdeskWoopraweb analyticsYandex.Metricaweb analyticsDocumentation and SupportThe documentation can be found in thedocsdirectory orread
online.  The source code and issue tracker are generouslyhosted by
GitHub.  Bugs should be reported there, whereas for lengthy chats
and coding support when implementing new service integrations you’re
welcome to use ourGitter chat room.How To ContributeIf you want to help out with the development of django-analytical, by
posting detailed bug reports, proposing new features or other analytics
services to support, or suggesting documentation improvements, use theissue tracker.  If you want to get your hands dirty, great!  Clone
the repository, make changes and place apull request.  Creating an
issue to discuss your plans is useful.This is aJazzbandproject.  By contributing you agree to abide by theContributor Code of Conductand follow theguidelines.
Package: django-analytics-client
# Django Analytics clientdjango-analytics-client is a Django app used to send server side analytics to the Funkbit analytics backend using Celery.This is an early draft and work in progress.## InstallationInstalldjango-analytics-client(available on PyPi):pip install django-analytics-client## ConfigurationThe following settings needs to be defined in yoursettings.py:ANALYTICS_USERNAME (Analytics service username.)ANALYTICS_PASSWORD (Analytics service password.)ANALYTICS_SITE_ID (The analytics site id we collect data for.)ANALYTICS_HOST (The hostname for the analytics service.)ANALYTICS_PORT (The port number for the analytics service.)ANALYTICS_ENABLED (Disable or enable analytics reporting.)## UsageSome examples:Middleware example inmiddleware.pyGeneric example insample.pyCelery tasks intasks.py
Package: django-analytics-kits
Analytics kits is a Django app to get analytics data from Google Analytics and save them in a model.
It can be used for generating models to record information such as most visited pages in a given period.Quick startInstall the package:# For Ubuntu it requires libffi-dev to be installed on the system.
# sudo apt-get install libffi-dev

pip install django-analytics-kitsAdd “analytics_kits” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'analytics_kits',
]Run the migration command to create account model:python manage.py migrateDefine your Google Analytics API service account and private_key in the Django admin section of the Analytics Kits.If you want to know more about how to generate a private_key and a google service account you can have a look into this link:https://developers.google.com/identity/protocols/OAuth2ServiceAccountThis service account should have read access to the google analytic view you want to get the information for.Create a model in your app to record the analytics results. This model should be inherited fromanalytics_kits.models.AnalyticsResult:from analytics_kits.models import AnalyticsResult

class MostPopular(AnalyticsResult):
    passUseanalytics_kits.models.AnalyiticsKitsMixinMixin for every content type you want get the analytics results for:from django.db import models
from analytics_kits.models import AnalyiticsKitsMixin

class Article(models.Model, AnalyiticsKitsMixin):
    # model fields
    ...

    # get_absolute_url method should be defined for this modelset a Cron job for the management commandsanalytics_resultsto connect to google analytics API and update your app model:python manage.py analytics_results --app YOUR_APP_NAME --model YOUR_MODEL_NAME --view VIEW_ID --account ACCOUNT_NAME

# YOUR_APP_NAME: Name of the application that you created your content models inside
# YOUR_MODEL_NAME: Name of the inherited model from `AnalyticsResult`
# VIEW_ID: Google Analytics View ID
# ACCOUNT_NAME: The name you defined for the account on the django admin
Package: django-analyze-sessions
This is a Django management command (as inhttps://docs.djangoproject.com/en/dev/howto/custom-management-commands/)
that analyzes and reports on the size of sessions in the DB. It is
intended to make it easier to understand how much space session data
takes up.Why?I noticed that a relatively small number of sessions in my Django app
were consuming 50+KiB of data each, and wanted to understand why.
It isn’t feasible or appealing to analyze large numbers of Django
sessions by hand, and I couldn’t find any existing tools that did batch
analysis, so I wrote this tool.InstallationInstall the distribution from PyPI, e.g.pip installdjango-analyze-sessionsThen, addanalyze_sessionsto INSTALLED_APPS in your Django project.That’s it. You can now run django-admin.py and confirm that the command
shows up.Example UsesBreak down the space usage of all sessions with more than 15KB of
session data::django-admin.py analyze-sessions --bigger-than=15000
Processed 2 sessions out of 5125 total sessions
Average size was 16885.50 bytes
Saw the following keys:
    foo (2 times, avg. size 15723.00 bytes)
    bar (2 times, avg. size 618.50 bytes)
    baz (2 times, avg. size 211.50 bytes)Break down the space usage of all sessions whose keys are in the given
input file (useful for when you want to select sessions on more than
encoded size)::django-admin.py analyze-sessions --ids-from=/tmp/ids-to-check
Processed 2 sessions out of 5125 total sessions
Average size was 16885.50 bytes
Saw the following keys:
    foo (2 times, avg. size 15723.00 bytes)
    bar (2 times, avg. size 618.50 bytes)
    baz (2 times, avg. size 211.50 bytes)Known Issues and BugsThe custom WHERE clause used to filter on session size may only work on MySQL (I don’t have access to a Django installation on another DBMS, so I can’t vouch for how well it’ll work there).The tool could stand to be smarter about size abbreviations (e.g., by learning how to interpret 100KB, or abbreviating output)The packaging (such as it is) isn’t very good.AuthorKevan Carstensen <kevan@isnotajoke.com>
Package: django-anarticle
Anarticle uses tag, catelog, and article models to publish articles.
Support for Ariadne graphQL with pre-defined types and basic resolvers.RequirementsPython 3.10+django 4.0+pillow 9.4.0+SettingsStore uploaded file with tokenize file name, default to FalseANARTICLE_USE_TOKEN_FILENAME = TrueDjango admin mixinsUse predefined mixins to construct the admin class.TagAdminMixinCategoryAdminMixinArticleAdminMixinfromdjango.contribimportadminfromanarticle.modelsimportTagfromanarticle.admin.mixinsimportTagAdminMixin@admin.register(Tag)classTagAdmin(TagAdminMixin,ModelAdmin):...Ariadne types and resolversIntegrate predefined types and resolvers to scheme.Requirementsariadne 0.16.0+ariadne-relay 0.1.0a8+schemefromanarticle.graphqlsimportanarticle_schemaanarticle/graphqls/article.graphqlanarticle/graphqls/tag.graphqlanarticle/graphqls/category.graphqltypesfromanarticle.graphqlsimportanarticle_bindablesanarticleanarticle_paragraphanarticle_taganarticle_categoryresolversAsync versionfromanarticle.graphqlsimportresolve_anarticle_tag_instance,\resolve_anarticle_tag_articles_connection,resolve_anarticle_tagsanarticle_tag.set_instance_resolver(resolve_anarticle_tag_instance)anarticle_tag.set_connection('articles',resolve_anarticle_tag_articles_connection)query.set_field('tags',resolve_anarticle_tags)resolve_anarticle_tag_instance,resolve_anarticle_tag_articles_connection,resolve_anarticle_category_instance,resolve_anarticle_category_tags_connection,resolve_anarticle_instance,resolve_anarticle_paragraphs,resolve_anarticle_tags_connection,resolve_anarticle_tags,resolve_anarticle_categories,resolve_anarticles,Sync versionresolve_anarticle_tag_instance_sync,resolve_anarticle_tag_articles_connection_sync,resolve_anarticle_category_instance_sync,resolve_anarticle_category_tags_connection_sync,resolve_anarticle_instance_sync,resolve_anarticle_paragraphs_sync,resolve_anarticle_tags_connection_sync,resolve_anarticle_tags_sync,resolve_anarticle_categories_sync,resolve_anarticles_sync,Licensedjango-anarticle is released under the terms ofApache license. Full details in LICENSE file.
Package: django-ancestry-relation
Django Ancestry Relation------------------------Provides an abstract model class for heirarchical data to be stored in a database.Provides a manager to interface with the model.Documentation is in the "docs" directory.Requirements------------* Python 3.4 or higher* Django 1.11Quick start-----------1. Install via pip `pip install django-ancestry-relation`2. Add "django_ancestry_relation" to your INSTALLED_APPS setting like this::```INSTALLED_APPS = [...,'django_ancestry_relation']```Notes-----* Most efficient using Postgres as Django DB backend.
Package: django-anchor-modeling
Short description of the package.InstallationYou can install the package using pip:pipinstallpackage_nameUsageBasic usage information can be placed here.frompackage_nameimportexample_functionexample_function()FeaturesFeature 1Feature 2Feature 3ContributingContributions are welcome. Please refer to the CONTRIBUTING.rst file for guidelines.LicenseThis package is released under the MIT License. See the LICENSE file for details.CreditsYour Name (maintainer)Additional contributors
Package: django-anexia-sms-gateway
Django Anexia SMS GatewayA django module to send short messages via theAnexia SMS gateway (ASGW).
It requires an activeAnexia Enginesubscription and a "ready to use" configured "sender" withinyour web service.InstallationInstall using pip:pip install django-anexia-sms-gatewayIn the project's settings.py add the access token configuration:# Anexia SMS Gateway settings (ASGW)
ASGW_ACTIVE = True
ASGW_API_TOKEN = "your-asgw-api-token"UsageCall thesend_smsmethod wherever you want to trigger a short message:from django_anexia_sms_gateway.sms import send_sms

send_sms(message="SMS content", destination="+43123456789")Translation (message)If you provide a translatable message string be sure to useugettext("gettext_lazy" would not be triggered on time):from django.utils.translation import ugettext
from django_anexia_sms_gateway.sms import send_sms

send_sms(message=ugettext("Translatable SMS content"), destination="+43123456789")Recipient phone number (destination)The recipient's phone number (=destination) must consist of prefix+followed by 1 to 14 digits. Otherwise the ASGW API will return an error.Phone number on modelIn case you store the phone number on a model (e.g.User), we recommend direct validation viaRegexValidator, e.g.:from django.core.validators import RegexValidator
from django.db.models import CharField
from django.utils.translation import gettext_lazy as _

phone = CharField(
    _("phone number"),
    max_length=15,
    blank=True,
    help_text=_("Prefix '+' followed by 1-14 digits, e.g. '+436641234'"),
    validators=[
        RegexValidator(
            r"^\+\d{1,14}$",
            _("Phone number must be entered in the format: '+123456789'. Prefix '+' with 1 to 14 digits allowed."),
        )
    ],
)