{ "info": { "author": "Dashbird.io (Renato Byrro)", "author_email": "renato@dashbird.io", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.7" ], "description": "# X-Lambda Helper (Python version)\n\nA Python library to help handle warm-up requests generated by [X-Lambda](https://github.com/dashbird/xlambda).\n\n[X-Lambda](https://github.com/dashbird/xlambda) predicts [AWS Lambda](https://aws.amazon.com/lambda/) demand and keeps a fleet of containers warm to mitigate cold-start latency. Warm invocations sent by X-Lambda are received by a Lambda function, which needs to respond accordingly.\n\nThis **X-Lambda Helper** project helps to handle warm invocations in Python functions.\n\n## Requirements\n\n- [Python 3.6+](https://www.python.org/downloads/)\n- [AWS account](https://aws.amazon.com/account/)\n\n## Quick start\n\n1. Install X-Lambda Helper: `pip install xlambda_helper`.\n2. Decorate your [Lambda handler](https://docs.aws.amazon.com/lambda/latest/dg/python-programming-model-handler-types.html) following the example below:\n3. Deploy your code in AWS Lambda.\n\n### Usage example\n\n```python\nimport xlambda_helper\n\n\n@xlambda_helper.warm()\ndef handler(event, context):\n # Your original code goes here\n x_men = [\n {'Charles': 'Professor Xavier'},\n {'Logan': 'Wolverine'},\n {'Jean': 'Phoenix'},\n {'Scott': 'Cyclops'}\n ]\n\n return x_men\n```\n\n## About\n\nX-Lambda Helper will be executed every time your handler is invoked by AWS Lambda. It will check whether the invocation is a warming request coming from X-Lambda. If not, it will run your handler code normally. If yes, it will short-circuit to return a default answer and will not execute the handler function.\n\nWhen handling warm requests, X-Lambda Helper will automatically adjust your function behavior:\n\n- Check whether it was a cold start\n- Sleep for a period of time, if needed\n- Defer to your original handler function, if invocation is not a warm request", "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/dashbird/xlambda-helper-python/archive/0.0.3.tar.gz", "keywords": "x-lambda,xlambda,aws,aws lambda,cold start,warm,serverless,containers", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "xlambda-helper", "package_url": "https://pypi.org/project/xlambda-helper/", "platform": "", "project_url": "https://pypi.org/project/xlambda-helper/", "project_urls": { "Homepage": "https://github.com/dashbird/xlambda-helper-python/archive/0.0.3.tar.gz" }, "release_url": "https://pypi.org/project/xlambda-helper/0.0.31/", "requires_dist": null, "requires_python": "", "summary": "Helper library to handle warming requests from X-Lambda (more: https://bit.ly/xlambda).", "version": "0.0.31" }, "last_serial": 5479850, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "5e0d7e41a1da8fed7e46cfab2a343eb9", "sha256": "6f4d2c4eaa5a57dad4f97e75d6ad0b4497f2de87d18a177972de359e15c59095" }, "downloads": -1, "filename": "xlambda_helper-0.0.1.tar.gz", "has_sig": false, "md5_digest": "5e0d7e41a1da8fed7e46cfab2a343eb9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3380, "upload_time": "2019-07-01T02:08:22", "url": "https://files.pythonhosted.org/packages/15/c2/f7f34a831cadf080b68918a133dd836578987edd6212a7b952fc4295fa86/xlambda_helper-0.0.1.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "e853202cb905577d967d5d76e3962067", "sha256": "94640b5d1837247431ecaa3f5b3216371615cd552601a15870049e88b6cf0479" }, "downloads": -1, "filename": "xlambda_helper-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "e853202cb905577d967d5d76e3962067", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4806, "upload_time": "2019-07-03T06:13:25", "url": "https://files.pythonhosted.org/packages/8a/b7/25fa39237c160cff2c2d06515103aa980ea1534718f44c284e92aea2fbb5/xlambda_helper-0.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4dff47b3f672967023a0ab506816d5c9", "sha256": "13845880eaa268dea4ee704ccb5e404a10bdeeddc06a5d716da200be9d15be92" }, "downloads": -1, "filename": "xlambda_helper-0.0.3.tar.gz", "has_sig": false, "md5_digest": "4dff47b3f672967023a0ab506816d5c9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3409, "upload_time": "2019-07-03T06:13:27", "url": "https://files.pythonhosted.org/packages/c1/d1/688d1558ef21f8a6b0abaf1244f696880618e0cb447a325c90c0e54e12fe/xlambda_helper-0.0.3.tar.gz" } ], "0.0.31": [ { "comment_text": "", "digests": { "md5": "e94041260eb7182762010793b43c618f", "sha256": "657eb5bdbb7a4c37ee7d5c4481dd010a04a34d7e1030d1dc62d7c3612248184f" }, "downloads": -1, "filename": "xlambda_helper-0.0.31.tar.gz", "has_sig": false, "md5_digest": "e94041260eb7182762010793b43c618f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3412, "upload_time": "2019-07-03T06:51:49", "url": "https://files.pythonhosted.org/packages/55/d6/9ef1e618aa7e00895f567aa57cd241780b56da5fcbe81aab15710f555d5d/xlambda_helper-0.0.31.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e94041260eb7182762010793b43c618f", "sha256": "657eb5bdbb7a4c37ee7d5c4481dd010a04a34d7e1030d1dc62d7c3612248184f" }, "downloads": -1, "filename": "xlambda_helper-0.0.31.tar.gz", "has_sig": false, "md5_digest": "e94041260eb7182762010793b43c618f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3412, "upload_time": "2019-07-03T06:51:49", "url": "https://files.pythonhosted.org/packages/55/d6/9ef1e618aa7e00895f567aa57cd241780b56da5fcbe81aab15710f555d5d/xlambda_helper-0.0.31.tar.gz" } ] }