{ "info": { "author": "Alex Myasoedov", "author_email": "msoedov@gmail.com", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "Hayaku - lightweight Python utility to generate Dockerfile and distribute tiny python apps without including sources\n\n[![Build Status](https://travis-ci.org/msoedov/hayaku.svg?branch=master)](https://travis-ci.org/msoedov/hayaku)\n\n## Instalation\n\n```shell\npip install hayaku\n```\n\n## Why?\nDisclaimer this repo being made just for fun in certain circumstances and have non opinionated approach for doing things.\nThe purpose of this is to wrap your existing tooling written in python into containers and then ship/distribute it without complicated\nworkflow around git repo's.\n\n\n## Approach\n0. Autodetect of required pip packages which needs to be installed\n1. Encode py sources with base64/zip/bzip\n2. Put encoded data into of generated `Dockerfile` ENV (According to POSIX we can put up to 256Mb into env variable)\n\n```shell\nENV PY_LIB \"{body}\"\n\n```\n\n3. Extract it during docker build\n\n```shell\nRUN python -c \"import os,base64;b=os.getenv('PY_LIB');b=base64.b64decode(b);print(b.decode('utf-8'))\" | tee app.py\n```\n\n4. So the final generated Dockerfile will looks like this\n\n```shell\nhayaku app.py\n\nFROM python:3.6\n\nMAINTAINER Erlich Bachman\n\nWORKDIR /app\n\nRUN pip install requests\n\nENV PY_LIB \"aW1wb3J0IGJhc2U2NAppbXBvcnQgb3MKZnJvbSB....\"\nRUN python -c \"import os,base64;b=os.getenv('PY_LIB');b=base64.b64decode(b);print(b.decode('utf-8'))\" | tee app.py\n\nCMD python app.py\n```\n\nwhich you can ship as a file, build and push image to private docker registry, etc...\n\n## Seriosly ?\n It's up to you. It worked for my limited usecase and I hope it might be helpfull for somebody else. As it said in disclamer: this repo being made just for fun in certain circumstances and have non opinionated approach for doing such things.", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "hayaku", "package_url": "https://pypi.org/project/hayaku/", "platform": "", "project_url": "https://pypi.org/project/hayaku/", "project_urls": null, "release_url": "https://pypi.org/project/hayaku/0.1.2/", "requires_dist": null, "requires_python": "", "summary": "Hayaku - tooling for generating dockerfile", "version": "0.1.2" }, "last_serial": 3009150, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "fbaaadd88ad1fdd95e186e8992201d3d", "sha256": "f886821e1b0416014b939f6ed99736b9cd03f94bb5f93f14b180497b198419ac" }, "downloads": -1, "filename": "hayaku-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "fbaaadd88ad1fdd95e186e8992201d3d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4736, "upload_time": "2017-07-08T22:23:21", "url": "https://files.pythonhosted.org/packages/e5/f5/52135958268b6498f5471c15aa264d54a080206e3a3ed37ea76f323a0d47/hayaku-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0b25156d98a723f1789211e4fffe1ee3", "sha256": "24e16ebb66105f6e0eb6ed9004091b238cf0a2e65c4860da9edc70c74b631411" }, "downloads": -1, "filename": "hayaku-0.1.1.tar.gz", "has_sig": false, "md5_digest": "0b25156d98a723f1789211e4fffe1ee3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2582, "upload_time": "2017-07-08T22:23:22", "url": "https://files.pythonhosted.org/packages/b1/4f/30462c5be680ddce72c75e11b0600cc6e3abbe0b2123d71cfcb2489a61e6/hayaku-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "2e24a7f88e7428a28ab1edcfd1dfa87f", "sha256": "e746d63b5a5d3904767ae4fad90b012fcc8f996a550452e9d5fb5c9c4592e661" }, "downloads": -1, "filename": "hayaku-0.1.2.tar.gz", "has_sig": false, "md5_digest": "2e24a7f88e7428a28ab1edcfd1dfa87f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2584, "upload_time": "2017-07-08T22:42:17", "url": "https://files.pythonhosted.org/packages/62/17/6011908ddf35abc1d1b23e827a7e67f0726d9745761851010c9d0f03a861/hayaku-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2e24a7f88e7428a28ab1edcfd1dfa87f", "sha256": "e746d63b5a5d3904767ae4fad90b012fcc8f996a550452e9d5fb5c9c4592e661" }, "downloads": -1, "filename": "hayaku-0.1.2.tar.gz", "has_sig": false, "md5_digest": "2e24a7f88e7428a28ab1edcfd1dfa87f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2584, "upload_time": "2017-07-08T22:42:17", "url": "https://files.pythonhosted.org/packages/62/17/6011908ddf35abc1d1b23e827a7e67f0726d9745761851010c9d0f03a861/hayaku-0.1.2.tar.gz" } ] }