Name | pygnosis JSON |
Version |
0.1.2
JSON |
| download |
home_page | None |
Summary | A modern, composable health monitoring library for Python applications with hierarchical status aggregation, async support, and flexible configuration system. |
upload_time | 2025-08-28 07:44:18 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.11 |
license | MIT License Copyright (c) 2024 [Ваше Имя] Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
check
health
microservices
monitoring
status
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Pygnosis
Asynchronous health checks for Python services.

[](https://codecov.io/gh/javamaker-python/pygnosis)
Features
--------
- Flexible health indicators (define your own checks)
- Composable architecture (nest indicators into trees)
- Full async/await support
- Type hints throughout
- Graceful error handling
Installation
------------
```bash
pip install pygnosis
```
Quick start
-----------
```python
import asyncio
from pygnosis import Health, HealthIndicator, Status, CompositeHealthIndicator
class DatabaseHealthIndicator(HealthIndicator):
def get_name(self) -> str:
return "database"
async def get_health(self) -> Health:
try:
return Health.builder(Status.UP).with_detail("connections", 10).build()
except Exception as e:
return Health.builder(Status.DOWN).with_exception(e).build()
class RedisHealthIndicator(HealthIndicator):
def get_name(self) -> str:
return "redis"
async def get_health(self) -> Health:
return Health.builder(Status.UP).build()
async def main():
composite = CompositeHealthIndicator(
name="app",
indicators=[DatabaseHealthIndicator(), RedisHealthIndicator()],
)
health = await composite.get_health()
print(f"Status: {health.status}")
print(f"Components: {health.components}")
if __name__ == "__main__":
asyncio.run(main())
```
Development with uv
-------------------
```bash
uv sync --group dev
uv run ruff check src/ tests/
uv run pytest
```
Building the package
--------------------
```bash
uv build
```
Documentation
-------------
Sphinx docs are built in CI. Locally:
```bash
uv sync --group docs
uv run sphinx-build -b html docs docs/_build/html
```
License
-------
MIT License — see [LICENSE](LICENSE)
Contributing
------------
Contributions are welcome. See `CONTRIBUTING.md` for guidelines.
Raw data
{
"_id": null,
"home_page": null,
"name": "pygnosis",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": "Ilya Yushin <ilya.yushin@gmail.com>",
"keywords": "check, health, microservices, monitoring, status",
"author": null,
"author_email": "Ilya Yushin <ilya.yushin@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/e2/7d/d61c6f0f512f667a89bbcbbad4712b779a92d15ae6675db2a2865d4a2949/pygnosis-0.1.2.tar.gz",
"platform": null,
"description": "# Pygnosis\n\nAsynchronous health checks for Python services.\n\n\n[](https://codecov.io/gh/javamaker-python/pygnosis)\n\nFeatures\n--------\n\n- Flexible health indicators (define your own checks)\n- Composable architecture (nest indicators into trees)\n- Full async/await support\n- Type hints throughout\n- Graceful error handling\n\nInstallation\n------------\n\n```bash\npip install pygnosis\n```\n\nQuick start\n-----------\n\n```python\nimport asyncio\nfrom pygnosis import Health, HealthIndicator, Status, CompositeHealthIndicator\n\n\nclass DatabaseHealthIndicator(HealthIndicator):\n def get_name(self) -> str:\n return \"database\"\n\n async def get_health(self) -> Health:\n try:\n return Health.builder(Status.UP).with_detail(\"connections\", 10).build()\n except Exception as e:\n return Health.builder(Status.DOWN).with_exception(e).build()\n\n\nclass RedisHealthIndicator(HealthIndicator):\n def get_name(self) -> str:\n return \"redis\"\n\n async def get_health(self) -> Health:\n return Health.builder(Status.UP).build()\n\n\nasync def main():\n composite = CompositeHealthIndicator(\n name=\"app\",\n indicators=[DatabaseHealthIndicator(), RedisHealthIndicator()],\n )\n health = await composite.get_health()\n print(f\"Status: {health.status}\")\n print(f\"Components: {health.components}\")\n\n\nif __name__ == \"__main__\":\n asyncio.run(main())\n```\n\nDevelopment with uv\n-------------------\n\n```bash\nuv sync --group dev\nuv run ruff check src/ tests/\nuv run pytest\n```\n\nBuilding the package\n--------------------\n\n```bash\nuv build\n```\n\nDocumentation\n-------------\n\nSphinx docs are built in CI. Locally:\n\n```bash\nuv sync --group docs\nuv run sphinx-build -b html docs docs/_build/html\n```\n\nLicense\n-------\n\nMIT License \u2014 see [LICENSE](LICENSE)\n\nContributing\n------------\n\nContributions are welcome. See `CONTRIBUTING.md` for guidelines.",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2024 [\u0412\u0430\u0448\u0435 \u0418\u043c\u044f] Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
"summary": "A modern, composable health monitoring library for Python applications with hierarchical status aggregation, async support, and flexible configuration system.",
"version": "0.1.2",
"project_urls": {
"Bug Tracker": "https://github.com/javamaker-python/pygnosis/issues",
"Changelog": "https://github.com/javamaker-python/pygnosis/blob/main/CHANGELOG.md",
"Homepage": "https://github.com/javamaker-python/pygnosis",
"Repository": "https://github.com/javamaker-python/pygnosis.git"
},
"split_keywords": [
"check",
" health",
" microservices",
" monitoring",
" status"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "45e8267ba35ee587194255b703ac6e06f90a1d5e988afb9046e74a649919aa42",
"md5": "d733c27671932a8a46c31c4ddfad3efc",
"sha256": "f4e84ecd08419006b2ce1f2365595b05f221863c35f178a13d6ea97a0aafc0f4"
},
"downloads": -1,
"filename": "pygnosis-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d733c27671932a8a46c31c4ddfad3efc",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 7594,
"upload_time": "2025-08-28T07:44:17",
"upload_time_iso_8601": "2025-08-28T07:44:17.725717Z",
"url": "https://files.pythonhosted.org/packages/45/e8/267ba35ee587194255b703ac6e06f90a1d5e988afb9046e74a649919aa42/pygnosis-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "e27dd61c6f0f512f667a89bbcbbad4712b779a92d15ae6675db2a2865d4a2949",
"md5": "bbf5205aee4ae87e59748fed2b851b99",
"sha256": "9889d3a9d339ffaa4fe180cebe6ef1b09f12a8a2bdd1403fafbbd3afd45e3fd3"
},
"downloads": -1,
"filename": "pygnosis-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "bbf5205aee4ae87e59748fed2b851b99",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 51514,
"upload_time": "2025-08-28T07:44:18",
"upload_time_iso_8601": "2025-08-28T07:44:18.667867Z",
"url": "https://files.pythonhosted.org/packages/e2/7d/d61c6f0f512f667a89bbcbbad4712b779a92d15ae6675db2a2865d4a2949/pygnosis-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-28 07:44:18",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "javamaker-python",
"github_project": "pygnosis",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "pygnosis"
}