{ "info": { "author": "Pior Bastida", "author_email": "pbastida@ludia.com", "bugtrack_url": null, "classifiers": [], "description": "==============\nPyramid_health\n==============\n\nSimple healthcheck endpoint for Pyramid, with maintenance mode and application\nchecks.\n\n* PyPI: https://pypi.python.org/pypi/pyramid_health\n* Bitbucket: https://github.com/ludia/pyramid_health\n* |droneio|\n\n.. |droneio| image::\n https://drone.io/github.com/ludia/pyramid_health/status.png\n :target: https://drone.io/github.com/ludia/pyramid_health\n :alt: Tests on drone.io\n\n\nInstallation\n============\n\nInstall using setuptools, e.g. (within a virtualenv)::\n\n $ pip install pyramid_health\n\n\nSetup\n=====\n\nOnce ``pyramid_health`` is installed, you must use the ``config.include``\nmechanism to include it into your Pyramid project's configuration. In your\nPyramid project's ``__init__.py``:\n\n.. code-block:: python\n\n config = Configurator(.....)\n config.include('pyramid_health')\n\nAlternately you can use the ``pyramid.includes`` configuration value in your\n``.ini`` file:\n\n.. code-block:: ini\n\n [app:myapp]\n pyramid.includes = pyramid_health\n\n\nUsage\n=====\n\nPyramid_health configuration (values are defaults):\n\n.. code-block:: ini\n\n [app:myapp]\n healthcheck.url = /health\n\n healthcheck.disablefile = /tmp/maintenance # touch this file to activate\n\n healthcheck.maintenance_code = 299 # Code to return in maintenance mode\n\n healthcheck.failure_code = 503 # Code to return when one or more checks fail\n\n\nOperation\n=========\n\nWhen your application is healthy, pyramid_health endpoint returns ``200 OK``.\nWhen you enable the maintenance mode, the endpoint returns ``299 MAINTENANCE``\nand logs ``Health response: MAINTENANCE``.\nIf the request to the healthcheck endpoint asks for the application checks, and\none application check or more return an error, the endpoint returns\n``503 ERROR`` and logs ``Health response: ERROR ()``.\n\n\nApplication checks\n==================\n\nThe application checks are routines in your application that subscribe to\n``pyramid_health.HealthCheckEvent`` event, execute a specific health check and\nreport the outcome as a status (``OK`` or ``ERROR``) and an optional message.\n\nThe application checks are not called unless you explicitely request it with\nthe request param ``checks`` set to ``true`` or ``all`` (like:\n``GET /health?checks=all``)\n\nTo add an application check in your application:\n\n.. code-block:: python\n\n from pyramid.events import subscriber\n from pyramid_health import HealthCheckEvent\n\n\n @subscriber(HealthCheckEvent)\n def db_check(event):\n try:\n db.ping()\n except:\n event.report(name='db', status='NOK', message='ping failed')\n else:\n event.report(name='db', status='OK')\n\nNotes:\n\n- You may or may not report succeeding checks\n\n\nMaintenance mode\n================\n\nIn maintenance mode, the healthcheck endpoint's response is changed to inform\nthe HTTP client that this backend is unavailable. Typically a loadbalancer\npolling the backends would stop sending traffic to a backend in maintenance\nmode.\n\nThe response status code is ``299 MAINTENANCE`` by default. You can\nchange it with ``healthcheck.maintenance_code``.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ludia/pyramid_health", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "pyramid_health", "package_url": "https://pypi.org/project/pyramid_health/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pyramid_health/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/ludia/pyramid_health" }, "release_url": "https://pypi.org/project/pyramid_health/1.2.1/", "requires_dist": null, "requires_python": null, "summary": "Healthcheck extension for Pyramid", "version": "1.2.1" }, "last_serial": 1581325, "releases": { "0.1.6": [ { "comment_text": "", "digests": { "md5": "273987e4326d522ad173894b1f7c37ea", "sha256": "aa1ea4bd9cd24a850df9b326bb8c6b9c741acacc1592c9e6755ebb8ccaa8182a" }, "downloads": -1, "filename": "pyramid_health-0.1.6.tar.gz", "has_sig": false, "md5_digest": "273987e4326d522ad173894b1f7c37ea", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1497, "upload_time": "2013-06-10T16:30:58", "url": "https://files.pythonhosted.org/packages/ee/0c/f64f1f52096fd78b9ca72698bbb0368bd7ae4678c13e50de6753e52d3ac5/pyramid_health-0.1.6.tar.gz" } ], "0.2.11": [ { "comment_text": "", "digests": { "md5": "f6aa679c759c5d3f3a61141388c65f88", "sha256": "da08909222b7fdce4496f17f4601c6a18f9d0662e0678a92a9c9499ce6377ad4" }, "downloads": -1, "filename": "pyramid_health-0.2.11.tar.gz", "has_sig": false, "md5_digest": "f6aa679c759c5d3f3a61141388c65f88", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2133, "upload_time": "2013-08-16T19:42:39", "url": "https://files.pythonhosted.org/packages/21/b4/f25e4c831e54866a32df1f07be87fbaddb1a0a8180b11385f65b04d45e6c/pyramid_health-0.2.11.tar.gz" } ], "0.3.14": [ { "comment_text": "", "digests": { "md5": "425c9a4888bf1600901de631295fcfca", "sha256": "c9d537fe630730a6363704180ba68b1f45f7ac4ce9d8f7b71a0e4a99bdc8ee21" }, "downloads": -1, "filename": "pyramid_health-0.3.14.tar.gz", "has_sig": false, "md5_digest": "425c9a4888bf1600901de631295fcfca", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2132, "upload_time": "2013-08-29T20:24:33", "url": "https://files.pythonhosted.org/packages/62/47/78a1fdaf1d0d7e5d6abcde9e579a9fd4bd8a9872c566708216fe797acacd/pyramid_health-0.3.14.tar.gz" } ], "0.3.18": [ { "comment_text": "", "digests": { "md5": "a18ac3ff9705d4b7b81e44ebaad370af", "sha256": "217bc3d1467e0fc4429f58a3e8f93dc50c6da1954e0d978339436332d58d3050" }, "downloads": -1, "filename": "pyramid_health-0.3.18.tar.gz", "has_sig": false, "md5_digest": "a18ac3ff9705d4b7b81e44ebaad370af", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2172, "upload_time": "2013-08-29T21:40:28", "url": "https://files.pythonhosted.org/packages/5e/7b/16c1bf6583dc4cc16b14f44cb5c0cebc9b7881875d172e9e576ff6303b2f/pyramid_health-0.3.18.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "45d04f6a807fa5f649bfa009d5935759", "sha256": "577d9a8290becabad4bda73bf25caaeccaadcfe8950a2fc0c6b89db07a9b5e9a" }, "downloads": -1, "filename": "pyramid_health-1.0.0.tar.gz", "has_sig": false, "md5_digest": "45d04f6a807fa5f649bfa009d5935759", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3724, "upload_time": "2015-05-08T18:15:20", "url": "https://files.pythonhosted.org/packages/d8/30/9e9273a1a46c2c81d6ac55f084ac101595cc83819a10b812e26f0712b76e/pyramid_health-1.0.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "f70a7ca3af80dbf70e57fde9e7331b83", "sha256": "7e9c0812436ece2577b9ce7b8bc8617509652dd4d32670e9a867e725fedaf34a" }, "downloads": -1, "filename": "pyramid_health-1.1.0.tar.gz", "has_sig": false, "md5_digest": "f70a7ca3af80dbf70e57fde9e7331b83", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4101, "upload_time": "2015-05-08T18:52:00", "url": "https://files.pythonhosted.org/packages/69/1d/029b6da1c15c5389c89db93a8516398b853f05e22569317786b39014a292/pyramid_health-1.1.0.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "c797cb2b1f12ef02a7ae629306b5f6ce", "sha256": "00351a011635390b1f69ebefe2f783bb220610a2c627a68119037646f3a99b9b" }, "downloads": -1, "filename": "pyramid_health-1.2.0.tar.gz", "has_sig": false, "md5_digest": "c797cb2b1f12ef02a7ae629306b5f6ce", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4128, "upload_time": "2015-05-19T20:31:20", "url": "https://files.pythonhosted.org/packages/5a/f9/c2bf91267af39184f6557dd395b257a38971117f4768cbdcd2e31c6fc5bb/pyramid_health-1.2.0.tar.gz" } ], "1.2.1": [ { "comment_text": "", "digests": { "md5": "e9cc0b8a15724fa505683a4b48efbe6f", "sha256": "dd4e1ee771fac739a3fdb3562cc4a7ff8965672dbd4c91a0b2c84b5e18190a22" }, "downloads": -1, "filename": "pyramid_health-1.2.1.tar.gz", "has_sig": false, "md5_digest": "e9cc0b8a15724fa505683a4b48efbe6f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4027, "upload_time": "2015-06-06T22:07:46", "url": "https://files.pythonhosted.org/packages/aa/63/dd193d92110291705c3943317b33a0e737a88f60514f1dfb51542c7d8954/pyramid_health-1.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e9cc0b8a15724fa505683a4b48efbe6f", "sha256": "dd4e1ee771fac739a3fdb3562cc4a7ff8965672dbd4c91a0b2c84b5e18190a22" }, "downloads": -1, "filename": "pyramid_health-1.2.1.tar.gz", "has_sig": false, "md5_digest": "e9cc0b8a15724fa505683a4b48efbe6f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4027, "upload_time": "2015-06-06T22:07:46", "url": "https://files.pythonhosted.org/packages/aa/63/dd193d92110291705c3943317b33a0e737a88f60514f1dfb51542c7d8954/pyramid_health-1.2.1.tar.gz" } ] }