{ "info": { "author": "Raymond Penners", "author_email": "raymond.penners@intenct.nl", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Libraries :: Application Frameworks", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "==============================\nWelcome to django-healthpoint!\n==============================\n\n.. image:: https://badge.fury.io/py/django-healthpoint.png\n :target: http://badge.fury.io/py/django-healthpoint\n\n.. image:: https://travis-ci.org/pennersr/django-healthpoint.png\n :target: http://travis-ci.org/pennersr/django-healthpoint\n\n.. image:: https://img.shields.io/pypi/v/django-healthpoint.svg\n :target: https://pypi.python.org/pypi/django-healthpoint\n\n.. image:: https://coveralls.io/repos/pennersr/django-healthpoint/badge.png?branch=master\n :alt: Coverage Status\n :target: https://coveralls.io/r/pennersr/django-healthpoint\n\n.. image:: https://pennersr.github.io/img/bitcoin-badge.svg\n :target: https://blockchain.info/address/1AJXuBMPHkaDCNX2rwAy34bGgs7hmrePEr\n\nFramework for adding an endpoint for health checks to your project.\n\nSource code\n http://github.com/pennersr/django-healthpoint\n\n\nQuickstart\n==========\n\nInstall the app::\n\n # settings.py\n INSTALLED_APPS = [\n ...\n 'healthpoint'\n ]\n\n # If specified, this user is able to see the details for each\n # individual check in the endpoint.\n HEALTHPOINT_BASICAUTH_USERNAME = 'john'\n HEALTHPOINT_BASICAUTH_PASSWORD = 'doe'\n\n # urls.py\n urlpatterns = [\n ...\n url(r'^', include('healthpoint.urls')),\n ]\n\nAdd a module named ``health.py`` to any of your apps. For example::\n\n from datetime import timedelta\n\n from django.contrib.auth.models import User\n from django.utils import timezone\n\n from healthpoint.decorators import health_check\n\n\n @health_check\n def user_signup():\n last_user = User.objects.last()\n time_since_last_signup = timezone.now() - last_user.date_joined\n # Return True/False, throw an exception, or return a tuple with a\n # detail message.\n return (\n time_since_last_signup <= timedelta(days=1),\n \"last signup was: {}\".format(last_user.date_joined))\n\n\nThe health checks can be accessed via the ``/health/`` endpoint:\n\n- It executes all health checks, and reports status 200 if all checks succeed, status 500 otherwise.\n\n- If a staff user is logged in, the endpoint reports the result for each individual check::\n\n {\n \"success\": {},\n \"error\": {\n \"myproject.myapp.health.user_signup\": \"Last signup was: 2017-10-29 08:45:51\"\n }\n }\n\n- To provide more detail on the result, the ``@health_check`` can return a tuple ``(success:bool, detail:str)``. The detail message will be listed in the result.\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/pennersr/django-healthpoint", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "django-healthpoint", "package_url": "https://pypi.org/project/django-healthpoint/", "platform": "any", "project_url": "https://pypi.org/project/django-healthpoint/", "project_urls": { "Homepage": "http://github.com/pennersr/django-healthpoint" }, "release_url": "https://pypi.org/project/django-healthpoint/0.2.0/", "requires_dist": null, "requires_python": "", "summary": "Easily create an endpoint for health checks", "version": "0.2.0" }, "last_serial": 3638643, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "862a97d762db9d4dcfa7c9a234a0d7fd", "sha256": "6fdcc66c214f0bfa56743605455aa2e072dc11f05591b1459dea7820f4c41781" }, "downloads": -1, "filename": "django-healthpoint-0.2.0.tar.gz", "has_sig": false, "md5_digest": "862a97d762db9d4dcfa7c9a234a0d7fd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5632, "upload_time": "2018-03-04T19:13:27", "url": "https://files.pythonhosted.org/packages/80/03/e447094c3ba372551c622893ffa3c1058e35e5f1d743044fddf6a532910b/django-healthpoint-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "862a97d762db9d4dcfa7c9a234a0d7fd", "sha256": "6fdcc66c214f0bfa56743605455aa2e072dc11f05591b1459dea7820f4c41781" }, "downloads": -1, "filename": "django-healthpoint-0.2.0.tar.gz", "has_sig": false, "md5_digest": "862a97d762db9d4dcfa7c9a234a0d7fd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5632, "upload_time": "2018-03-04T19:13:27", "url": "https://files.pythonhosted.org/packages/80/03/e447094c3ba372551c622893ffa3c1058e35e5f1d743044fddf6a532910b/django-healthpoint-0.2.0.tar.gz" } ] }