{ "info": { "author": "Einar Forselv", "author_email": "eforselv@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: BSD License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9" ], "description": "[![pypi](https://badge.fury.io/py/cachet-client.svg)](https://pypi.python.org/pypi/cachet-client)\n[![travis](https://api.travis-ci.org/ZettaIO/cachet-client.svg?branch=master)](https://travis-ci.org/ZettaIO/cachet-client) [![Documentation Status](https://readthedocs.org/projects/cachet-client/badge/?version=latest&nop)](https://cachet-client.readthedocs.io/en/latest/?badge=latest)\n\n# cachet-client\n\nA python 3.6+ API client for the open source status page system\n[Cachet](https://github.com/CachetHQ/Cachet).\n\n* [cachet-client on github](https://github.com/ZettaIO/cachet-client)\n* [cachet-client on PyPI](https://pypi.org/project/cachet-client/)\n* [cachet-client documentation](https://cachet-client.readthedocs.io/)\n\nThe goal of this package is to create a user friendly interface\nto the Cachet API.\n\n* Resources are returned as objects clearly separating read only\n properties from the ones we can change. The raw json response\n is always available in an `attrs` property\n* Active use of type hints throughout the entire codebase\n making code completion a breeze\n* Proper pagination under the hood. Method listing resources\n will return generators. You can configure the start page and\n page size that fits the situation. Each new page leads to\n a new http request.\n* Client is using a single session regardless of resource type\n making more complex work a lot faster (connection reuse)\n* A very extensive set of tests/unit tests.\n* Easy to extend and test\n* Documentation\n\n**Please don't hesitate opening an issue about anything related to this package.**\n\n## Install\n\n```\npip install cachet-client\n```\n\n# Example\n\n```python\nimport cachetclient\nfrom cachetclient.v1 import enums\n\nclient = cachetclient.Client(\n endpoint='https://status.test/api/v1',\n api_token='secrettoken',\n)\n```\n\nCheck if api is responding\n\n```python\nif client.ping():\n print(\"Cachet is up and running!\")\n```\n\nCreate and delete a subscriber\n\n```python\nsub = client.subscribers.create(email='user@example.test', verify=True)\nsub.delete()\n```\n\nList all subscribers paginated (generator). Each new page is fetched\nfrom the server under the hood.\n\n```python\nfor sub in client.subscribers.list(page=1, per_page=100):\n print(sub.id, sub.email)\n```\n\nCreate a component issue\n\n```python\nissue = client.incidents.create(\n name=\"Something blew up!\",\n message=\"We are looking into it\",\n status=enums.INCIDENT_INVESTIGATING,\n # Optional for component issues\n component_id=mycomponent.id,\n component_status=enums.COMPONENT_STATUS_MAJOR_OUTAGE,\n)\n```\n\n.. and most other features supported by the Cachet API\n\n\n## Local Development\n\nLocal setup:\n\n```bash\npython -m virtualenv .venv\n. .venv/bin/activate\npip install -e .\n```\n\n## Tests\n\nThis project has a fairly extensive test setup.\n\n* Unit tests are located in `tests/` including a fake\n implementation of the Cachet API.\n* A simpler test script under `extras/live_run.py` that\n needs a running test instance of Cachet.\n\n### Running unit tests\n\n```bash\npip install -r tests/requirements.txt\ntox\n\n# Optionally\ntox -e pep8 # for pep8 run only\ntox -e py36 # tests only\n\n\n# Running tests with pytest also works, but this works poorly in combination with environment variables for the live test script (tox separates environments)\npytest tests/\n```\n\n### Testing with real Cachet service\n\nDo not run this script against a system in production.\nThis is only for a test service.\nCachet can easily be set up locally with docker: https://github.com/CachetHQ/Docker\n\nOptionally we can run cachet from source: https://github.com/CachetHQ/Docker\n\nA local setup is also located in the root or the repo (`docker-compose.yaml`).\n\nYou need to set the following environment variables.\n\n```bash\nCACHET_ENDPOINT\nCACHET_API_TOKEN\n```\n\nRunning tests:\n\n```bash\npython extras/live_run.py\n...\n=================================================\nNumber of tests : 10\nSuccessful : 10\nFailure : 0\nPercentage passed : 100.0%\n=================================================\n```\n\n## Building Docs\n\n```bash\npip install -r docs/requirements.txt\npython setup.py build_sphinx\n```\n\n## Contributing\n\nDo not hesitate opening issues or submit completed\nor partial pull requests. Contributors of all\nexperience levels are welcome.\n\n---\nThis project is sponsored by [zetta.io](https://www.zetta.io)\n\n[![zetta.io](https://raw.githubusercontent.com/ZettaIO/cachet-client/master/.github/logo.png)](https://www.zetta.io)\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/zettaio/cachet-client", "keywords": "cachet,client,api", "license": "", "maintainer": "Einar Forselv", "maintainer_email": "eforselv@gmail.com", "name": "cachet-client", "package_url": "https://pypi.org/project/cachet-client/", "platform": "", "project_url": "https://pypi.org/project/cachet-client/", "project_urls": { "Homepage": "https://github.com/zettaio/cachet-client" }, "release_url": "https://pypi.org/project/cachet-client/4.0.1/", "requires_dist": [ "requests (>=2.21.0)" ], "requires_python": ">=3.5", "summary": "A python 3 client for the Cachet API", "version": "4.0.1", "yanked": false, "yanked_reason": null }, "last_serial": 9075427, "releases": { "0.9.0": [ { "comment_text": "", "digests": { "md5": "534136e5f033f30636e68cc42eae54af", "sha256": "8f712b6cc9bf114adc240d945b3fb340c5b277acd581bcb57aa4fcec50047cf2" }, "downloads": -1, "filename": "cachet_client-0.9.0-py3-none-any.whl", "has_sig": false, "md5_digest": "534136e5f033f30636e68cc42eae54af", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 19212, "upload_time": "2019-06-21T01:18:35", "upload_time_iso_8601": "2019-06-21T01:18:35.050803Z", "url": "https://files.pythonhosted.org/packages/10/c6/51bdf84ca4555861be6159db9173f370880e1e2cf2596250a4e0704f4a91/cachet_client-0.9.0-py3-none-any.whl", "yanked": false, "yanked_reason": null } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "31ca755f851afd8532d77ab9c67d380a", "sha256": "3264b9e2150b882fe6f98d7f9f85237e24b1637d76c074825623276c245be65f" }, "downloads": -1, "filename": "cachet_client-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "31ca755f851afd8532d77ab9c67d380a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 21044, "upload_time": "2019-06-25T14:45:21", "upload_time_iso_8601": "2019-06-25T14:45:21.533137Z", "url": "https://files.pythonhosted.org/packages/98/d7/c8174ab29265b43d0eb73338fbbb53022d7ba6737cbc2b229dfee08019d2/cachet_client-1.0.0-py3-none-any.whl", "yanked": false, "yanked_reason": null } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "1212b4affe647f3a7169b6da000557cd", "sha256": "f10514708b1cfacb6d388a0b89698450ae5d5dda08ce5f5ccb00fcf6bf8e7dc9" }, "downloads": -1, "filename": "cachet_client-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "1212b4affe647f3a7169b6da000557cd", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 21259, "upload_time": "2019-09-24T10:55:53", "upload_time_iso_8601": "2019-09-24T10:55:53.220875Z", "url": "https://files.pythonhosted.org/packages/05/c1/3b92b67ebebc46cfa866474a0e04605f17a8c0ebeb7c23fa0fe1e376ee8d/cachet_client-1.1.0-py3-none-any.whl", "yanked": false, "yanked_reason": null } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "fd853568ddc3a65bc2fa80c19a69534d", "sha256": "21149bdf2fc87c56df6e261d0572ac2bdfb4e4918f1909d6b78b2346a62bb004" }, "downloads": -1, "filename": "cachet_client-1.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "fd853568ddc3a65bc2fa80c19a69534d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 21456, "upload_time": "2019-09-26T14:08:05", "upload_time_iso_8601": "2019-09-26T14:08:05.433628Z", "url": "https://files.pythonhosted.org/packages/26/54/b9b2c4c7ef58db9c4f3ae651841d2a5c0bf93a004a865a1319a2819a36f2/cachet_client-1.2.0-py3-none-any.whl", "yanked": false, "yanked_reason": null } ], "1.3.0": [ { "comment_text": "", "digests": { "md5": "2b8d828eca5e23951ad2b4f4cf2cec3b", "sha256": "f0f62a614bde6a9728ab1884cc6b6977f70061ff70eec694ecf9357c047ba35a" }, "downloads": -1, "filename": "cachet_client-1.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "2b8d828eca5e23951ad2b4f4cf2cec3b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 21584, "upload_time": "2019-10-02T14:39:35", "upload_time_iso_8601": "2019-10-02T14:39:35.729254Z", "url": "https://files.pythonhosted.org/packages/1d/57/6974443e72287bc9e3134ef316db508d8526e1dd65cf8e8578e2dd06254b/cachet_client-1.3.0-py3-none-any.whl", "yanked": false, "yanked_reason": null } ], "2.0.0": [ { "comment_text": "", "digests": { "md5": "c3770cb0850ff38f83f9e0cb6df3c208", "sha256": "494fb9d51efbec99a2030ff57dae16053a6db022c6fd8a955c51dff1430355b4" }, "downloads": -1, "filename": "cachet_client-2.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "c3770cb0850ff38f83f9e0cb6df3c208", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 21650, "upload_time": "2019-10-31T01:57:13", "upload_time_iso_8601": "2019-10-31T01:57:13.132782Z", "url": "https://files.pythonhosted.org/packages/e2/88/9a3c441878bc389d1e99dabdccb63610f5bf9e5be1a398bdaadf05a1f8bf/cachet_client-2.0.0-py3-none-any.whl", "yanked": false, "yanked_reason": null } ], "2.0.1": [ { "comment_text": "", "digests": { "md5": "46f9793e57fff134f5f6bda9c70c7cf7", "sha256": "6e5da9ad60859fb8a45b4a7b2a632d5e733d93956a5d62d859d34f3300f8da75" }, "downloads": -1, "filename": "cachet_client-2.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "46f9793e57fff134f5f6bda9c70c7cf7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 21651, "upload_time": "2019-11-07T15:56:33", "upload_time_iso_8601": "2019-11-07T15:56:33.362779Z", "url": "https://files.pythonhosted.org/packages/42/c6/e94430282acf50a5ca199ce1ae603f1166a8e7333d1f3b3da32f8fd8237b/cachet_client-2.0.1-py3-none-any.whl", "yanked": false, "yanked_reason": null } ], "3.0.0": [ { "comment_text": "", "digests": { "md5": "a88cedb9b66b0abe74882e8388291eab", "sha256": "9bcd1f77e4cf6652b86d6b622dbe024fa04cc6c7937275895d674393ac825f9d" }, "downloads": -1, "filename": "cachet_client-3.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "a88cedb9b66b0abe74882e8388291eab", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 23277, "upload_time": "2020-02-20T01:39:52", "upload_time_iso_8601": "2020-02-20T01:39:52.294728Z", "url": "https://files.pythonhosted.org/packages/b1/39/a9e3057321c776c8c4d514af976507339fc21d9fc8504efe73cd818437aa/cachet_client-3.0.0-py3-none-any.whl", "yanked": false, "yanked_reason": null } ], "3.1.0": [ { "comment_text": "", "digests": { "md5": "79c81c961d08bd1d06d5b118e8760d95", "sha256": "ace679d643f3b30ca1b5d5ad34dc5f71ec70ee7d9c1a4304de735f34114b926b" }, "downloads": -1, "filename": "cachet_client-3.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "79c81c961d08bd1d06d5b118e8760d95", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 24193, "upload_time": "2020-09-08T15:16:55", "upload_time_iso_8601": "2020-09-08T15:16:55.274009Z", "url": "https://files.pythonhosted.org/packages/eb/2c/e7816eeff99849ccf9ad653c2474dc6c7e8d2081bfe058e08eaffde5ba09/cachet_client-3.1.0-py3-none-any.whl", "yanked": false, "yanked_reason": null } ], "3.1.1": [ { "comment_text": "", "digests": { "md5": "71b1cc09be4c31de4322a8d6a72a4a2f", "sha256": "b0099639d7c483a10e2e355d1a6ee0be23a46deccd431040554f863c153d1ea2" }, "downloads": -1, "filename": "cachet_client-3.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "71b1cc09be4c31de4322a8d6a72a4a2f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 24189, "upload_time": "2020-09-11T13:56:54", "upload_time_iso_8601": "2020-09-11T13:56:54.939003Z", "url": "https://files.pythonhosted.org/packages/35/9c/2b9db20c8a4cce6e3b5ff1acef438ce7db39bda58a5ded8ed12a9c43baa0/cachet_client-3.1.1-py3-none-any.whl", "yanked": false, "yanked_reason": null } ], "4.0.0": [ { "comment_text": "", "digests": { "md5": "b4116a158df7c5aeff0abf7d4c9e8bff", "sha256": "022232ed33662140d461150bc4acbb6c9a27bb8d3140d0431b0b6ed72277e5b6" }, "downloads": -1, "filename": "cachet_client-4.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "b4116a158df7c5aeff0abf7d4c9e8bff", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 25580, "upload_time": "2021-01-07T08:47:17", "upload_time_iso_8601": "2021-01-07T08:47:17.925400Z", "url": "https://files.pythonhosted.org/packages/e1/83/baac8185afec1462ac1309012abfa3f8fb8f199abfd799e07bbcadd0433b/cachet_client-4.0.0-py3-none-any.whl", "yanked": false, "yanked_reason": null } ], "4.0.1": [ { "comment_text": "", "digests": { "md5": "1e3144259495de82fa39153392e8ea4b", "sha256": "c5b37b70147530470d7fba8381003c8dac7a3dc3eedb3e92c75572fc5f94d2b2" }, "downloads": -1, "filename": "cachet_client-4.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "1e3144259495de82fa39153392e8ea4b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 25578, "upload_time": "2021-01-07T08:59:14", "upload_time_iso_8601": "2021-01-07T08:59:14.897315Z", "url": "https://files.pythonhosted.org/packages/e5/93/ac693c9d5a01ba07695afdfe7d56210d2654fcecff6d730aa98cdc998282/cachet_client-4.0.1-py3-none-any.whl", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1e3144259495de82fa39153392e8ea4b", "sha256": "c5b37b70147530470d7fba8381003c8dac7a3dc3eedb3e92c75572fc5f94d2b2" }, "downloads": -1, "filename": "cachet_client-4.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "1e3144259495de82fa39153392e8ea4b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 25578, "upload_time": "2021-01-07T08:59:14", "upload_time_iso_8601": "2021-01-07T08:59:14.897315Z", "url": "https://files.pythonhosted.org/packages/e5/93/ac693c9d5a01ba07695afdfe7d56210d2654fcecff6d730aa98cdc998282/cachet_client-4.0.1-py3-none-any.whl", "yanked": false, "yanked_reason": null } ], "vulnerabilities": [] }