{ "info": { "author": "Michael Hausenblas", "author_email": "michael.hausenblas@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python" ], "description": "pyk: a simple, yet useful Kubernetes toolkit in Python\n======================================================\n\n|version| |downloads| |build status|\n\nThis is a simple, yet useful toolkit that supports you in writing\nmicroservices-style apps with Kubernetes.\n\nThe pyk toolkit is meant to be used by tools such as\n`kploy `__ or from your own app. It\nis manifest-oriented, that is, it expects the resource definitions in\nYAML files; currently pyk's API is as follows:\n\n- execute an arbitrary\n `operation `__\n and return the resource, if any:\n ``execute_operation(method='GET', ops_path='', payload='')``\n- return a description of a resource:\n ``describe_resource(resource_path)``\n- delete a resource: ``delete_resource(resource_path)``\n- create a Replication Controller (RC):\n ``create_rc(manifest_filename, namespace='default')``\n- scale a RC:\n ``scale_rc(manifest_filename, namespace='default', num_replicas=0)``\n- create a service:\n ``create_svc(manifest_filename, namespace='default')``\n\nDependencies\n------------\n\nAll of these are included in the `setup `__:\n\n- Python `Requests `__\n (note: I've tested with version ``2.6.2``)\n- Python `PyYAML `__ (note: I've tested\n with version ``3.11``)\n\nUsing pyk\n---------\n\nA simple usage pattern is, for example, to create a `Replication\nController `__:\n\n::\n\n import pprint\n from pyk import toolkit\n\n pyk_client = toolkit.KubeHTTPClient() # assumes local API Server at http://localhost:8080\n _, rc_url = pyk_client.create_rc(manifest_filename='manifest/nginx-webserver-rc.yaml')\n rc = pyk_client.describe_resource(rc_url)\n pprint.pprint(rc.json())\n\nTesting pyk\n-----------\n\nIn order to run the tests, use\n``test_pyk.py $KUBERNETES_API_SERVER_URL``, for example:\n\n::\n\n $ ./test_pyk.py http://52.33.181.164/service/kubernetes\n\nAbove runs all the tests. You can also specify a particular test, like\nso:\n\n::\n\n $ ./test_pyk.py http://52.33.181.164/service/kubernetes \"init app\"\n ================================================================================\n = Test case: init a simple app\n\n 2015-11-28T05:13:16 From manifest/nginx-webserver-rc.yaml I created the RC \"webserver-rc\" at /api/v1/namespaces/default/replicationcontrollers/webserver-rc\n 2015-11-28T05:13:17 From manifest/webserver-svc.yaml I created the service \"webserver-svc\" at /api/v1/namespaces/default/services/webserver-svc\n 2015-11-28T05:13:18 Found following endpoints:\n 2015-11-28T05:13:18 /api/v1/namespaces/default/endpoints/k8sm-scheduler ->\n {\n \"addresses\": [\n {\n \"ip\": \"10.0.3.45\"\n }\n ],\n \"ports\": [\n {\n \"port\": 25504,\n \"protocol\": \"TCP\"\n }\n ]\n }\n 2015-11-28T05:13:18 /api/v1/namespaces/default/endpoints/kubernetes ->\n {\n \"addresses\": [\n {\n \"ip\": \"10.0.3.45\"\n }\n ],\n \"ports\": [\n {\n \"port\": 25502,\n \"protocol\": \"TCP\"\n }\n ]\n }\n 2015-11-28T05:13:18 /api/v1/namespaces/default/endpoints/webserver-svc ->\n\n.. |version| image:: https://img.shields.io/pypi/v/pyk.svg\n :target: https://pypi.python.org/pypi/pyk/\n.. |downloads| image:: https://img.shields.io/pypi/dm/pyk.svg\n :target: https://pypi.python.org/pypi/pyk/\"\n.. |build status| image:: https://travis-ci.org/kubernauts/pyk.svg?branch=master\n :target: https://travis-ci.org/kubernauts/pyk", "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/kubernauts/pyk", "keywords": "Kubernetes,containers,appops", "license": "Apache", "maintainer": null, "maintainer_email": null, "name": "pyk", "package_url": "https://pypi.org/project/pyk/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pyk/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/kubernauts/pyk" }, "release_url": "https://pypi.org/project/pyk/0.3.2/", "requires_dist": null, "requires_python": null, "summary": "A simple, yet useful Kubernetes toolkit in Python", "version": "0.3.2" }, "last_serial": 1872232, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "15b604d48b905b4f300c0d99876c85c8", "sha256": "144429206bbc74c76e8f29164e8ac167cfc639eaa651698e6ace1084b33a5e05" }, "downloads": -1, "filename": "pyk-0.1.0.tar.gz", "has_sig": false, "md5_digest": "15b604d48b905b4f300c0d99876c85c8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4109, "upload_time": "2015-11-29T09:03:40", "url": "https://files.pythonhosted.org/packages/9c/c4/30a4ebaeed828329e3d4f44ccaf41c035d7dce57bb5e99fafc75b1ecf30a/pyk-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "9015b3924e34e16db501e6a16d22930d", "sha256": "24b3ef4ce67680ebc0218afcc2d25c37ac008e6a9e092bb6a5d7d578fa0f6a9e" }, "downloads": -1, "filename": "pyk-0.1.1.tar.gz", "has_sig": false, "md5_digest": "9015b3924e34e16db501e6a16d22930d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3140, "upload_time": "2015-11-29T09:14:26", "url": "https://files.pythonhosted.org/packages/05/89/6b25745eb8c635ea6b594959a55797d1e6d53605d357bfa0c429f8d3755a/pyk-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "080617b3b4462a1baafb13697e0c5335", "sha256": "7314471dec2946d052fd2c1e1d2f1a5d79e9e04b67c15bcfcc60961cb3ffb438" }, "downloads": -1, "filename": "pyk-0.1.2.tar.gz", "has_sig": false, "md5_digest": "080617b3b4462a1baafb13697e0c5335", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4385, "upload_time": "2015-11-29T11:00:41", "url": "https://files.pythonhosted.org/packages/b6/b5/cc3e48fe44b87c0cf29c245daadda4388e1c0ed4affcd733e7ee64b93d61/pyk-0.1.2.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "d3e77779133b3b955cb9f28d1d62b997", "sha256": "b5fd882ab5ec2fbba7531f6c81015ce20b3de6f10d6ba940d92c35bb0340e2d2" }, "downloads": -1, "filename": "pyk-0.2.0.tar.gz", "has_sig": false, "md5_digest": "d3e77779133b3b955cb9f28d1d62b997", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4392, "upload_time": "2015-11-29T12:35:32", "url": "https://files.pythonhosted.org/packages/28/ca/791750609f1ae7894edf2a81cb615d61652778b0414e8a8dbf489aa0ca91/pyk-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "1f74128a9d743735a1324ca77517e295", "sha256": "8b141f891629bd2be4bdabebbd971ea83627bbaf49ea65823a2e5733d432c29e" }, "downloads": -1, "filename": "pyk-0.3.0.tar.gz", "has_sig": false, "md5_digest": "1f74128a9d743735a1324ca77517e295", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4393, "upload_time": "2015-12-13T17:33:47", "url": "https://files.pythonhosted.org/packages/e9/35/96f13f51f7cc4d40f46d49699aad8112666b6f76f23a0ff48ec6aebc2c90/pyk-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "bc9064afa9f208cbdd809f414b3dfe95", "sha256": "5440063096fd0a157325fbb7eae78b071d7e86671403eda475674ca748f19a48" }, "downloads": -1, "filename": "pyk-0.3.1.tar.gz", "has_sig": false, "md5_digest": "bc9064afa9f208cbdd809f414b3dfe95", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4412, "upload_time": "2015-12-21T14:29:09", "url": "https://files.pythonhosted.org/packages/08/2b/c975b0b8e01e9852a2245407e6966885424fef930df4cfd3b6fb6c5fe790/pyk-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "33d4a9892afe1399e7b8089cd0de0ffb", "sha256": "edd7bb851081803a672b48a4f3336be33aa6b28ff2c0791966d4b4f125030826" }, "downloads": -1, "filename": "pyk-0.3.2.tar.gz", "has_sig": false, "md5_digest": "33d4a9892afe1399e7b8089cd0de0ffb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4417, "upload_time": "2015-12-21T15:03:44", "url": "https://files.pythonhosted.org/packages/76/f6/520fee871ede6f79e5f78f928c0a4b1ded2a6eed9b4a782751bdbd67a4dd/pyk-0.3.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "33d4a9892afe1399e7b8089cd0de0ffb", "sha256": "edd7bb851081803a672b48a4f3336be33aa6b28ff2c0791966d4b4f125030826" }, "downloads": -1, "filename": "pyk-0.3.2.tar.gz", "has_sig": false, "md5_digest": "33d4a9892afe1399e7b8089cd0de0ffb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4417, "upload_time": "2015-12-21T15:03:44", "url": "https://files.pythonhosted.org/packages/76/f6/520fee871ede6f79e5f78f928c0a4b1ded2a6eed9b4a782751bdbd67a4dd/pyk-0.3.2.tar.gz" } ] }