{ "info": { "author": "See AUTHORS", "author_email": "maarten@adimian.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: MIT License", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4" ], "description": "Example usage\n==============\n::\n\n import time\n from kabutopy.client import Client\n\n # make a client instance with the base url of the kabuto service\n client = Client(\"http://localhost:5000\")\n\n # registering a user\n client.register(\"user\", \"password\", \"email@email.com\")\n\n # loging in with a user, the client keeps track of the cookies\n client.login(\"user\", \"password\")\n\n # creating an image\n # name: string\n # dockerfile: raw string / open file / path to a file\n # repo_url: string\n # nocache: boolean\n image = client.create_image(\"my_image\", dockerfile=\"some file\", repo_url=None, nocache=False)\n\n # requesting the image status and image id will poll the server\n # if the id is still empty, or is the status is PENDING\n # it will update id, state and output if the state is SUCCESS\n # it will update state, error and output if the state is FAIL\n\n while image.status == 'PENDING':\n sleep(1)\n\n # creating a pipeline\n # name: string\n pipeline = client.create_pipeline(\"my_pipeline\")\n\n # creating a job\n # command: string\n # image: Image / int / string that is castable to int\n # attachment: open file / path to a file (a list of these things also works when multiple files need to be uploaded)\n # pipeline: Pipeline / int / string that is castable to int\n job = client.create_job(command, image, attachments, pipeline)\n\n # getting logs\n # job: Job / int / string that is castable to int\n # job_id: int / string that is castable to int\n # you are able to get the logs trough the client\n logs = client.get_job_logs(job)\n\n # trough the job itself\n # job_id: int / string that is castable to int\n logs = job.get_logs()\n\n # getting results\n # job: Job / int / string that is castable to int\n # trough the client\n # will return None if the job has not yet started, is still running or has failed\n result = client.get_job_results(job)\n\n # trough the job itself\n result = job.get_results()\n\n\nClasses and Methods\n===================\n\nClient:\n-------\n\n - register(user, password, email)\n - login(user, password)\n - create_image(name, dockerfile=None, repo_url=None, nocache=False) returns Image\n - create_pipeline(name) returns Pipeline\n - create_job(command, image, attachments, pipeline) returns Job\n - submit_pipeline(pipeline)\n - get_job_logs(job, log_id=None) returns Log\n - get_job_results(job, pipeline=None) returns None or ByteIO\n - load_image(self, eid) returns loaded Image\n - load_pipeline(self, eid) returns loaded Pipeline\n - load_job(self, eid, pipeline) returns loaded Job\n\nImage:\n------\n\n - classmethod:load(eid) returns loaded image\n\nPipeline:\n---------\n\n - submit()\n - classmethod:load(eid) returns loaded pipeline\n\nJob:\n----\n\n - get_logs(log_id=None) returns Log\n - get_results() returns None or ByteIO\n - classmethod:load(eid, pipeline) returns loaded job\n\nLog:\n----\n\n - readlines(raw=True) returns lines or (line_id, line) if raw is False\n - refresh()", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://hg.adimian.com/products/kabutopy", "keywords": null, "license": "MIT/Expat", "maintainer": null, "maintainer_email": null, "name": "kabutopy", "package_url": "https://pypi.org/project/kabutopy/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/kabutopy/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://hg.adimian.com/products/kabutopy" }, "release_url": "https://pypi.org/project/kabutopy/1.0.0/", "requires_dist": null, "requires_python": null, "summary": "client for the kabuto service", "version": "1.0.0" }, "last_serial": 1666942, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "745c35f0ec253d7d7477715f4dc6c799", "sha256": "519695f030bc57bfe5f4a6f0d7768dfb41ac81f0027d43d14264fef4854e11a4" }, "downloads": -1, "filename": "kabutopy-1.0.0.tar.gz", "has_sig": false, "md5_digest": "745c35f0ec253d7d7477715f4dc6c799", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6384, "upload_time": "2015-08-06T13:57:59", "url": "https://files.pythonhosted.org/packages/e5/8f/9f8a55077cea0af18c3f2939616d35c17e460cc10a450d3f8ccdb1f7ac63/kabutopy-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "745c35f0ec253d7d7477715f4dc6c799", "sha256": "519695f030bc57bfe5f4a6f0d7768dfb41ac81f0027d43d14264fef4854e11a4" }, "downloads": -1, "filename": "kabutopy-1.0.0.tar.gz", "has_sig": false, "md5_digest": "745c35f0ec253d7d7477715f4dc6c799", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6384, "upload_time": "2015-08-06T13:57:59", "url": "https://files.pythonhosted.org/packages/e5/8f/9f8a55077cea0af18c3f2939616d35c17e460cc10a450d3f8ccdb1f7ac63/kabutopy-1.0.0.tar.gz" } ] }