{ "info": { "author": "Amazing Blues", "author_email": "bluesedenyu@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy" ], "description": "# pyhapool\n\nA handy, customizable python library that provides high availability(including failover etc.) for multiple node connections.\n\n## Install\n\n```python\npip install hapool\n```\n\n## QuickStart\n\nFor example, we need to connect to multiple kubernetes apiserver.\n```python\nfrom pyhapool import HAEndpointPool\nfrom kubernetes.client import ApiClient\n\n# got configuration list which contain multiple apiservers\nconfiguration_list = [...]\nha_pool = HAEndpointPool.from_list(configuration_list)\n\n\nclass HAApiClient(ApiClient):\n\n def call_api(self, *args, **kwargs):\n while ha_pool.data:\n with ha_pool.get_endpoint() as configuration:\n self.configuration = configuration\n return super().call_api(*args, **kwargs)\n```\n\nIf any apiserver became unavailable (may raise some exceptions), `ha_pool` would switch to next endpoint until any available one been chosen(work like upstream in `nginx`).\n\n----\n\nmore documentation is coming.", "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/IMBlues/pyhapool", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "hapool", "package_url": "https://pypi.org/project/hapool/", "platform": "", "project_url": "https://pypi.org/project/hapool/", "project_urls": { "Homepage": "https://github.com/IMBlues/pyhapool" }, "release_url": "https://pypi.org/project/hapool/0.0.1/", "requires_dist": null, "requires_python": ">=3.6.0", "summary": "A handy, customizable python library that provides high availability for multiple node connections", "version": "0.0.1" }, "last_serial": 5242898, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "b4d1c67961853a3f76cd110dd452aa06", "sha256": "fa08da0598e9be1c239acbf6a7432444daa65d6713062dea8ab4d25ec9781b9a" }, "downloads": -1, "filename": "hapool-0.0.1.tar.gz", "has_sig": false, "md5_digest": "b4d1c67961853a3f76cd110dd452aa06", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 5950, "upload_time": "2019-05-08T13:41:46", "url": "https://files.pythonhosted.org/packages/dd/e4/37b61280ce97e97e3abe0b613cda31ad6184251ba3ffcabf13f48ea8408d/hapool-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b4d1c67961853a3f76cd110dd452aa06", "sha256": "fa08da0598e9be1c239acbf6a7432444daa65d6713062dea8ab4d25ec9781b9a" }, "downloads": -1, "filename": "hapool-0.0.1.tar.gz", "has_sig": false, "md5_digest": "b4d1c67961853a3f76cd110dd452aa06", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 5950, "upload_time": "2019-05-08T13:41:46", "url": "https://files.pythonhosted.org/packages/dd/e4/37b61280ce97e97e3abe0b613cda31ad6184251ba3ffcabf13f48ea8408d/hapool-0.0.1.tar.gz" } ] }