{ "info": { "author": "Rajiv Abraham", "author_email": "rajiv.abraham@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Build Tools" ], "description": "# Disclaimer\n* theScore does not use this in production. This library was built when AWS Lambda was stuck at 2.7 for a long time and we wanted to use Python 3. Two days after this idea succeeded, AWS announced support for 3.6 :). However, this may still be of use to those who want to use versions other than the official version\n\n# Marol\n\nRun any Python 3 version instead of the standard AWS Lambda Python version.\n\n## Python 3 version support\n\n* Tested on 3.6.1, 3.6.2, 3.6.3\n\n\n## Instructions\nYou pass in your handler file(e.g. `my_handler.py`) and it returns back:\n\n* `handler_python3.py`. `my_handler.py` is renamed to `handler_python3.py` and code is added to make it callable from a python2 handler\n* `handler.py`. This is the Python2 module that is called which delegates to the Python3 handler file\n* path to `marol_venv` folder. This is the folder which contains all the executables for the Python version that you chose.\n\nTo use Marol, your `my_handler.py` will have the following constraints:\n\n* The handler function should be named `handler`\n* The file cannot be called `handler.py`(This is reserved for the Python2 handler which will execute the Python3 handler\n* There should be no `main` statement in the handler file\n* One should not have functions with the following names:\n 1. `load`\n 2. `read_execution_uuid`\n\n\n## Installation\n### Pre-requisites\n* Ensure `docker` is installed and running on the machine where Marol is executed.\n\n### Mac OS X\n* Open the terminal and run `/Applications//Install Certificates.command` \n\n\n## Usage\n\nYour deployment scripts for lambda should specify `handler.py` and `handler` as the starting point for your Lambda function. This is the Python2 handler returned by Marol which calls your modified Python3 handler.\n\n\n```python\nimport marol\nmy_project_site_packages = ...\nmy_deploy_lambda_function(lambda_name,\n marol.get_lambda_files('~/mypath/mypy3handler.py', '3.6.1') + my_project_site_packages,\n 'lambda_s3_exec_role',\n 128,\n 300,\n lambda_description='Test for Python 3',\n handler_name=\"handler\",\n handler_file=\"handler.py\",\n region_name='us-east-1')\n\n```\n\n`get_lambda_files` will check `MAROL_HOME` if `marol_venv` exists for the particular version that you want. If it exists, you will get back that path. If it does not exist,`marol` will \n* download the python source\n* build the binaries using a [docker image](https://github.com/lambci/docker-lambda) which mirrors the AWS Lambda environment\n* create a basic `marol_venv` and store it at `MAROL_HOME/staging/`\n\n## Future Work\n* Some of the context attributes are not supported yet.\n* Ensure that the context object is updated for future changes\n\n## Notes\n* This adds an additional 2-5 seconds to execution time.\n* This only provides the core Python libraries. \n* Default Marol home is `/.marol`. \n* It will create `marol_venv` in `/.marol/staging/`\n\n\n## Notes for those thinking about security\n* This uses an unofficial [docker image](https://github.com/lambci/docker-lambda)", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/scoremedia/marol", "keywords": "aws-lambda python3", "license": "Apache 2.0", "maintainer": "", "maintainer_email": "", "name": "marol", "package_url": "https://pypi.org/project/marol/", "platform": "", "project_url": "https://pypi.org/project/marol/", "project_urls": { "Homepage": "https://github.com/scoremedia/marol" }, "release_url": "https://pypi.org/project/marol/0.0.4/", "requires_dist": null, "requires_python": ">=3.6", "summary": "Run Any Python 3 version on AWS Lambda", "version": "0.0.4" }, "last_serial": 3292827, "releases": { "0.0.4": [ { "comment_text": "", "digests": { "md5": "1e12ec98a64fe1093c3a2e87e07f3513", "sha256": "6bd4674d7b462d4cf4335c623258c759ac2553f71ad0c90ef60881d1e2bf6d81" }, "downloads": -1, "filename": "marol-0.0.4.tar.gz", "has_sig": false, "md5_digest": "1e12ec98a64fe1093c3a2e87e07f3513", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 5386, "upload_time": "2017-10-30T23:10:02", "url": "https://files.pythonhosted.org/packages/2a/c3/adda6a2297134fad9d766c50fcb51737a6f9dcc29f75e077b68a4d7fa449/marol-0.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1e12ec98a64fe1093c3a2e87e07f3513", "sha256": "6bd4674d7b462d4cf4335c623258c759ac2553f71ad0c90ef60881d1e2bf6d81" }, "downloads": -1, "filename": "marol-0.0.4.tar.gz", "has_sig": false, "md5_digest": "1e12ec98a64fe1093c3a2e87e07f3513", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 5386, "upload_time": "2017-10-30T23:10:02", "url": "https://files.pythonhosted.org/packages/2a/c3/adda6a2297134fad9d766c50fcb51737a6f9dcc29f75e077b68a4d7fa449/marol-0.0.4.tar.gz" } ] }