Saravanan666/pypi-org huggingface dataset:
Package: django-hbs-makemessages
Library providingdjango-admin-hbs.pyscript that exposes custommakemessagescommand that can extract language strings from .hbs and .handlebars files.This library complementsdjango-ember-gettextEmber.js addon that provides Django’sgettextsupport in Ember.js application.TutorialInstall library via pip:pip install django-hbs-makemessagesCD to project containinglocaledirectory and JS app and firemakemessagesfor your locale:django-admin-hbs.py makemessages –l en_us –d djangojsNow check your locale’s djangojs.po file for your locale and see if it contains translation files:#: emberapp/routes/application.js:8
msgid “Connection lost”
msgstr “”#: emberapp/routes/application.js:13
msgid “Page not available”
msgstr “”#: emberapp/routes/application.js:24
msgid “Page not found”
msgstr “”#: emberapp/templates/application.handlebars.:2
#: emberapp/templates/application.hbs.:2
msgid “Welcome to Ember.js!”
msgstr “”#: emberapp/templates/application.handlebars.:3
#: emberapp/templates/application.hbs.:3
msgid “IndexController renders %(template)s template!”
msgstr “”AuthorsRafał Pitońhttp://rpiton.comhttp://github.com/rafalphttps://twitter.com/RafalPitonCopyright and licenseCopyright © 2014Rafał PitońThis program comes with ABSOLUTELY NO WARRANTY.This is free software and you are welcome to modify and redistribute it under the conditions described in the license.
For the complete license, refer to LICENSE.rst
Package: django-hCaptcha
Django hCaptcha provides a simple way to protect your django forms usinghCaptcha.ConfigurationAdd “hcaptcha” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'hcaptcha',
]For development purposes no further configuration is required. By default, django-hCaptcha will use dummy keys.For production, you’ll need to obtain your hCaptcha site key and secret key and add them to you settings:HCAPTCHA_SITEKEY = '<your sitekey>'
HCAPTCHA_SECRET = '<your secret key>'You can also configure your hCaptcha widget globally (see all options):HCAPTCHA_DEFAULT_CONFIG = {
    'onload': 'name_of_js_function',
    'render': 'explicit',
    'theme': 'dark',  # do not use data- prefix
    'size': 'compact',  # do not use data- prefix
    ...
}If you need to, you can also override default hcaptcha endpoints:HCAPTCHA_JS_API_URL = 'https://hcaptcha.com/1/api.js'
HCAPTCHA_VERIFY_URL = 'https://hcaptcha.com/siteverify'Use proxies:HCAPTCHA_PROXIES = {
   'http': 'http://127.0.0.1:8000',
}Change default verification timeout:HCAPTCHA_TIMEOUT = 5UsageSimply add hCaptchaField to your forms:from hcaptcha.fields import hCaptchaField

class Forms(forms.Form):
    ....
    hcaptcha = hCaptchaField()
    ....In your template, if you need to, you can then use{{ form.hcaptcha }}to access the field.You can override default config by passing additional arguments:class Forms(forms.Form):
    ....
    hcaptcha = hCaptchaField(theme='dark', size='compact')
    ....How it WorksWhen a form is submitted by a user, hCaptcha’s JavaScript will send two POST parameters to your backend,g-captcha-resposneandh-captcha-response. These will be received by your app and will be used to complete thehcaptchaform field in your backend code.When your app receives these two values, the following will happen:Your backend will send these values to the hCaptcha serversTheir servers will indicate whether the values in the fields are correctIf so, yourhcaptchaform field will validate correctlyUnit TestsYou will need to disable the hCaptcha field in your unit tests, since your tests obviously cannot complete the hCaptcha successfully. One way to do so might be something like:fromunittest.mockimportMagicMock,patchfromdjango.testimportTestCase@patch("hcaptcha.fields.hCaptchaField.validate",return_value=True)classContactTest(TestCase):test_msg={"name":"pandora","message":"xyz","hcaptcha":"xxx",# Any truthy value is fine}deftest_something(self,mock:MagicMock)->None:response=self.client.post("/contact/",self.test_msg)self.assertEqual(response.status_code,HTTP_302_FOUND)
Package: django-hcaptcha-field
Django hCaptcha FieldDjango hCaptcha Field provides a simple way to protect your Django forms usinghCaptcha.This is a fork ofdjango-hcaptcha.InstallationInstall using pip:$pipinstalldjango-hcaptcha-fieldAdd toINSTALLED_APPS:INSTALLED_APPS=[# ...'hcaptcha_field']ConfigurationFor development purposes no further configuration is required. By default,
Django hCaptcha Field will usetest keys.For production, you'll need to obtain your hCaptcha site key and secret key and
add them to you settings:HCAPTCHA_SITEKEY='<your sitekey>'HCAPTCHA_SECRET='<your secret key>'You can also configure your hCaptcha widget globally
(see all options):HCAPTCHA_DEFAULT_CONFIG={'onload':'name_of_js_function','render':'explicit','theme':'dark',# do not use data- prefix'size':'compact',# do not use data- prefix# ...}If you need to, you can also override default hCaptcha endpoints:HCAPTCHA_JS_API_URL='https://hcaptcha.com/1/api.js'HCAPTCHA_VERIFY_URL='https://hcaptcha.com/siteverify'Use proxies:HCAPTCHA_PROXIES={'http':'http://127.0.0.1:8000',}Change default verification timeout:HCAPTCHA_TIMEOUT=5UsageSimply add hCaptchaField to your forms:fromhcaptcha_fieldimporthCaptchaFieldclassForm(forms.Form):hcaptcha=hCaptchaField()You can override the sitekey and other default configuration by passing
additional arguments:fromhcaptcha_fieldimporthCaptchaFieldclassForm(forms.Form):hcaptcha=hCaptchaField(sitekey='...',theme='dark',size='compact')LicenseThe scripts and documentation in this project are released under the BSD-3-Clause License.
Package: django-header-auth
Django Header Auth==================An extremely simple Django middleware for authorizing requests based on headers.Installation------------1. Install via pip::::bash$ pip install django-header-auth2. Add the `HeaderAuthMiddleware`::::pythonMIDDLEWARE_CLASSES = (# ...'header_auth.middleware.HeaderAuthMiddleware',# ...)Usage-----Add a `HEADER_AUTH` dict containing the headers you'd like to check to the settings file::::pythonHEADER_AUTH = {'HTTP_X_SOME_HEADER': 'sometoken','HTTP_X_ANOTHER_HEADER': 'anothertoken',}The request's headers will be checked for 'X-Some-Header: sometoken' and 'X-Another-Header: anothertoken' and simply pass through if everything is ok. Otherwise a 403 Forbidden will be returned.Copyright---------Copyright (c) 2013 [LocalMed, Inc.](http://www.localmed.com/). See LICENSE for details.
Package: djangoheads
DjangoHeadsDocumentation: coming soonSource Code:https://github.com/djangoheads/djangoheadsDjangoheads is a comprehensive project that includes the most efficient and user-friendly tools for Django development.InstallationTested on CPython 3.8, 3.9, 3.10, 3.11 and 3.12.pipinstalldjangoheads
Package: django-health
Django Health=============Shows the health of your Django app easily. You don't need to make expensive requests to full pages. If your appis up, this endpoint will work.Quick Start-----------1. Install with pip:$ pip install django-health2. Add 'health' to your INSTALLED_APPS setting:INSTALLED_APPS = (...'health',)3. Include the health URLconf in your project urls.py:url(r'^health/', include('health.urls')),4. Start development server `python manage.py runserver`5. Visit the health endpoint (http://127.0.0.1:8000/health/) for a `200 OK` to verify the site is up and that thehealth endpoint is working.
Package: django-health-check-email
django-health-check-emailThis is a plugin fordjango-health-check, which check that your app can send emails through the email backend configured in your Django settings.InstallationInstall with pip in your environment:pipinstalldjango-health-checkdjango-health-check-emailAdd the app to yourINSTALLED_APPS:INSTALLED_APPS=[# ...'health_check',# required# ...'health_check_email',]Apply migrations:pythonmanage.pymigrateConfigurationAdd your settings toHEALTH_CHECK:HEALTH_CHECK={"EMAIL_ENABLED":True,"EMAIL_IS_CRITICAL":True,"EMAIL_SUBJECT":"my email health check","EMAIL_MESSAGE":"my message","EMAIL_FROM":"test@example.com","EMAIL_TO":["admin@example.com","dev@example.com"],}
Package: django-health-checker
Django health checker is a simple Django app to conduct health checking which
uses django-health-check (https://github.com/KristianOellegaard/django-health-check)
and overrides default behavior.Quick startInclude the health_checker URLconf in your project urls.py like this:path('health-checker/', include('health_checker.urls')),Start the development server and visithttp://127.0.0.1:8000/health-checker/to get a ‘pong’ response if every health check has passed.
Package: django-healthchecks
Simple Django app/framework to publish health check for monitoring purposesFeatures:Custom checks via Python functionsRemote healthchecksHeartbeat monitoringStatusInstallationpipinstalldjango_healthchecksUsageAdd the following to your urls.py:url(r'^healthchecks/',include('django_healthchecks.urls')),Add a setting with the available healthchecks:HEALTH_CHECKS={'postgresql':'django_healthchecks.contrib.check_database','cache_default':'django_healthchecks.contrib.check_cache_default','solr':'your_project.lib.healthchecks.check_solr',}You can also include healthchecks over http. This is useful when you want to
monitor if depending services are up:HEALTH_CHECKS={...'my_microservice':'https://my-service.services.internal/healthchecks/',...}By default, http health checks will time out after 500ms. You can override this
as follows:HEALTH_CHECKS_HTTP_TIMEOUT=0.5By default the status code is always 200, you can change this to something
else by using theHEALTH_CHECKS_ERROR_CODEsetting:HEALTH_CHECKS_ERROR_CODE=503You can also add some simple protection to your healthchecks via basic auth.
This can be specified per check or a wildcard can be used*.HEALTH_CHECKS_BASIC_AUTH={'*':[('admin','pass')],'solr':[],}Using heartbeatsHeartbeats give a periodic update, to see whether an service was recently active.
When the service doesn’t report back within timeout, a healthcheck can be triggered.
To use heartbeats, add the application to theINSTALLED_APPS:INSTALLED_APPS=[..."django_healthchecks",]Include one of these checks:HEALTH_CHECKS={...'heartbeats':'django_healthchecks.contrib.check_heartbeats'...'expired_heartbeats':'django_healthchecks.contrib.check_expired_heartbeats',...}Optionally, define an initial timeout:HEALTHCHECKS_DEFAULT_HEARTBEAT_TIMEOUT=timedelta(days=1)Let your code track the beats:fromdatetimeimporttimedeltafromdjango_healthchecks.heartbeatsimportupdate_heartbeatupdate_heartbeat("myservice.name",default_timeout=timedelta(days=2))Or use the decorator:fromdjango_healthchecks.heartbeatsimportupdate_heartbeat_on_success@update_heartbeat_on_success("myservice.name",default_timeout=...)deflong_running_task():....Each timeupdate_heartbeat()is called, the heartbeat is reset.
When a heartbeat didn’t receive an update before it’stimeout,
the service name be mentioned in thecheck_expired_heartbeatscheck.Updating timeoutsThedefault_timeoutparameter is only assigned upon creation. Any updates
happen through the Django admin. To update the timeout automatically on
code deployment, use thetimeoutparameter instead. This will replace the
stored timeout value each time theupdate_heartbeat()function
is called, erasing any changes made in the Django admin.
Package: django-health-check-version
django-health-check-versionA simple plugin that displays theVERSIONvalue configured insettings.pyin the output ofpython manage.py health_checkor the/health/endpoint of the application.InstallationUse the package managerpipto install foobar.pipinstalldjango-health-check-versionAddVERSIONtosettings.pyset to whatever value you wish displayed.VERSION='1.0.0'Add toINSTALLED_APPSinsettings.pyINSTALLED_APPs=[..."health_check",# required"health_check.db",# standard health checkers"health_check.cache","health_check.storage","health_check.contrib.migrations","django_health_check_version",# this one...]ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.LicenseMIT
Package: django-healthpoint
Framework for adding an endpoint for health checks to your project.Source codehttp://github.com/pennersr/django-healthpointQuickstartInstall the app:# settings.py
INSTALLED_APPS = [
    ...
    'healthpoint'
]

# If specified, this user is able to see the details for each
# individual check in the endpoint.
HEALTHPOINT_BASICAUTH_USERNAME = 'john'
HEALTHPOINT_BASICAUTH_PASSWORD = 'doe'

# If set to True authentication is required for executing the
# health checks.
HEALTHPOINT_AUTH_REQUIRED = True

# urls.py
urlpatterns = [
    ...
    url(r'^', include('healthpoint.urls')),
]Add a module namedhealth.pyto any of your apps. For example:from datetime import timedelta

from django.contrib.auth.models import User
from django.utils import timezone

from healthpoint.decorators import health_check


@health_check
def user_signup():
    last_user = User.objects.last()
    time_since_last_signup = timezone.now() - last_user.date_joined
    # Return True/False, throw an exception, or return a tuple with a
    # detail message.
    return (
        time_since_last_signup <= timedelta(days=1),
        "last signup was: {}".format(last_user.date_joined))The health checks can be accessed via the/health/endpoint:It executes all health checks, and reports status 200 if all checks succeed, status 500 otherwise.If a staff user is logged in, the endpoint reports the result for each individual check:{
 "success": {},
 "error": {
   "myproject.myapp.health.user_signup": "Last signup was: 2017-10-29 08:45:51"
 }
}To provide more detail on the result, the@health_checkcan return a tuple(success:bool, detail:str). The detail message will be listed in the result.
Package: django-healthz
Rehive Django HealthCheckQuick startInstall the package:pip install django-healthzAdd "healthz" to your INSTALLED_APPS settings like this:INSTALLED_APPS = [
        ...
        'healthz',
    ]Include the healtheck middleware in the django middleware:MIDDLEWARE = [
    'healthz.middleware.HealthCheckMiddleware',
    ...
]Configure the readiness checks:HEALTHCHECK = {
    'READINESS_CHECKS': ('databases', 'caches', 'queues',)
}TODOUpdate responses to JSONAllow customization or readiness and healthz URLs.
Package: django-heap
Heap is a unique new service that automatically captures all user actions on
your site including UI interaction.This library helps developers integrateHeap analyticsinto their Django
projects.InstallationInstall using pip:pip install django-heapBasic usageAddheapto installed apps:INSTALLED_APPS = (
    ...
    'heap',
)There is no need to runmanage.py syncdbsince django-heap has no database
tables. Add theheapcontext processor:TEMPLATE_CONTEXT_PROCESSORS = (
    ...
    'heap.context_processors.heap',
)Finally, configure the app ID insettings.py:HEAP_APP_ID = '12345...'To enable Heap tracking, you must include the script tag snippet in your
template like so:<head>
    ....
    {% include 'heap/script.html' %}
</head>Now you are ready to start tracking.Tracking superusersBy default, django-heap tracks your site’s superusers as well. You can disable
this by setting theHEAP_TRACK_SUPERUSERflag toFalse. This prevents
the script tag template from rendering when user hasis_superuserproperty
set toTrue.Automatic identification of usersdjango-heap can automatically callheap.identifywith data from the
authenticated user. To do that, you need to set theHEAP_AUTO_ID_USERsetting toTrue(disabled by default). Only authenticated users will be
identify. The User object’sget_full_namemethod will be used to derive thenameparameter for theidentifycall, and if User object has anemailfield, theemailparameter will also be passed. There is
currently no handling for the cases whereget_full_namereturns the user’semailaddress.NoteThis implementation is currently experimental, so please do it
manually in theBODYtag as suggested by Heap documentation if you find it
doesn’t work for you.Customizing django-heapYou can customize django-heap by simply overriding the default template. There
is currently no direct support for custom tracking calls, but it is planned for
the next release.Reporting bugsPlease report bugs to our BitBucketissue tracker.
Package: django-heartbeat
Django-heartbeat is a simple reusable app that checks and lists various information
about your project and its dependenciesRequirementsPython >=3.8 (tested with Python 3.8, 3.10)Django >=4 < 5InstallationInstall using pip:pip install django-heartbeatNext, add 'heartbeat' to your settings.py INSTALLED_APPS:INSTALLED_APPS = (
  ...
  'heartbeat',
)Configure urls.pyif'heartbeat'insettings.INSTALLED_APPS:fromheartbeat.urlsimporturlpatternsasheartbeat_urlsurlpatterns+=[url(r'^heartbeat/',include(heartbeat_urls))]Usage/heartbeat/After this point you can access the /heartbeat/ endpoint and receive a 200 OK./heartbeat/1337/If you want a more detailed view of some custom checkers you MUST configure a
custom profile for heartbeat in your settings.py. The profile should be
a dictionary containing at least the basic auth credentials or the keydisableset toTrueto disable basic authentication.e.g.:HEARTBEAT={'package_name':'foo_project','checkers':['heartbeat.checkers.build','heartbeat.checkers.distribution_list','heartbeat.checkers.debug_mode',],'auth':{'username':'foo','password':'bar',},}If no checkers are defined, heartbeat will default to the following:heartbeat.checkers.distribution_listheartbeat.checkers.debug_modeheartbeat.checkers.pythonAvailable checkersPlease make sure you have the latest version of django-heartbeat since checker names changed in versions 1.0.8 and
2.0.0.
If for some reason you cannot install the latest version, read the release notes for the version you have and the
versions mentioned above.heartbeat.checkers.buildlists information about installed packagePlease be aware that in order for this checker to work you have to add the
'package_name': 'foo_package' key, value pair in the HEARTBEAT settingsheartbeat.checkers.databasesdisplays information about the connection with your configured databasesheartbeat.checkers.debug_modedisplays whether the DEBUG mode is set to True or Falseheartbeat.checkers.distribution_listlists all installed dependenciesheartbeat.checkers.hostdisplays various information about your system
(e.g. hostname, number of CPUs, uptime, used/free memory, etc.)heartbeat.checkers.memcached_statusdisplays stats about your Memcached.Before enabling this checker please make sure that you have installed the appropriate Memcached binding (the two most
common arepython-memcachedandpylibmc)heartbeat.checkers.pythonlists the current python versionheartbeat.checkers.redis_statuschecks your connection with the Redis serverMake sure that you have CACHEOPS_REDIS configured properly in your settings.pyImplementing your own checkermy_checker.py:defcheck(request):""":param request: HttpRequest object:return: dict"""# Checker logic goes herereturn{'ping':'pong'}Note: The function name of your checker MUST be 'check' and has to return a JSON-serializable objectadd it to the settings.HEARTBEAT configHEARTBEAT={'checkers':['heartbeat.checkers.distribution_list','my_project.my_checker'...],...}Simple, huh?If you would like to contribute to this library with a new checker (or any other
functionality), feel free to make a pull request.ContributorsAndrei PrădanDan Claudiu Pop
Package: django-helcim
This package provides aDjango-based integration with theHelcim Commerce API. It is designed to be easily implemented
with existing Django-based commerce platforms and comes with an
optional module to connect withDjango Oscar.Getting StartedInstructions on installing and configuration can be found onRead The Docs.SupportThedocs provide examples for setup and common issuesto be aware
of. If the issue involves connecting this package to Django Oscar, this
repository contains asandbox environmentyou can review for a
minimal working example. For any other issues, you can submit aGitHub Issue.ContributingContributions are welcome, especially to address bugs and extend
functionality. Fulldetails on contributing can be found in the docs.VersioningThis package uses a MAJOR.MINOR.PATCH versioning, as outlined atSemantic Versioning 2.0.0.AuthorsJoshua Robert Torrance (StudyBuffalo)LicenseThis project is licensed under the GPLv3. Please see theLICENSEfile for details.AcknowledgementsThanks to thedjango-oscar-paypaldevelopers, from which many of this
packages design decisions are based.ChangelogYou can view allpackage changes on the docs.
Package: django-helmholtz-aai
This small generic Django app helps you connect to the Helmholtz AAI and make
use of it’s virtual organizations.FeaturesFeatures includeready-to-use views for authentification against the Helmholtz AAIa newHelmholtzUsermodel based upon djangosUsermodel and derived
from the Helmholtz AAIa newHelmholtzVirtualOrganizationmodel based upon djangosGroupmodel and derived from the Helmholtz AAIseveral signals to handle the login of Helmholtz AAI user for your specific
applicationautomated synchronization of VOs of on user authentificationGet started by following theinstallation instructionsand have a look into
theconfigurationand examples provided there.CopyrightCopyright © 2020-2023 Helmholtz-Zentrum Hereon, 2020-2023 Helmholtz-Zentrum GeesthachtLicensed under the EUPL-1.2-or-laterThis program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the EUPL-1.2 license for more details.You should have received a copy of the EUPL-1.2 license along with this
program. If not, seehttps://www.eupl.eu/.
Package: django-helpdesk3000
This is a Django-powered helpdesk ticket tracker, designed to plug into
an existing Django website and provide you with internal (or, perhaps,
external) helpdesk management.It’s a fork ofdjango-helpdeskwith
better styling, more features, and numerous bug fixes.InstallationInstall via pip with:pip install django-helpdesk3000Then addhelpdeskto theINSTALLED_APPSlist in yoursettings.py.Then apply the models. If you’re using South, simply run:python manage.py migrate helpdeskor if not using South:python manage.py syncdbFor further installation information see docs/install.html and
docs/configuration.htmlDevelopmentTo run unittests across multiple Python versions, install:sudo add-apt-repository ppa:fkrull/deadsnakes
sudo apt-get update
sudo apt-get install python-dev python3-dev python3.3-minimal python3.3-dev python3.4-minimal python3.4-dev python3.5-minimal python3.5-dev python3.6 python3.6-devTo run alltests:export TESTNAME=; toxTo run tests for a specific environment (e.g. Python 2.7 with Django
1.4):export TESTNAME=; tox -e py27-django111To run a specific test:export TESTNAME=.TicketBasicsTestCase.test_helpdesk_submit; tox -e py27-django111To run thedocumentation
serverlocally:mkdocs serve -a :9999Todeploy
documentation,
run:mkdocs gh-deploy --cleanTo build and deploy a versioned package to PyPI, verifyall unittests
are passing,
and then run:python setup.py sdist
python setup.py sdist upload