{ "info": { "author": "Elad Kehat", "author_email": "eladkehat@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.7", "Topic :: Software Development", "Topic :: Utilities", "Typing :: Typed" ], "description": "# Astromech - AWS Service Utilities for Lambda Functions\n\nAstromech is a collection of utilities that I found myself copying all over my lambda functions and serverless\nprojects. For the sake of DRYing up my code, I collected them in a single library.\n\n## Service Clients\nAstromech implements lazy-initialization for Boto3 service clients:\n\nFor each service, there is a global client variable that gets reused between invocations of the labmda function\ncontainer. Code that want access to the client achieves this by using a `client()` function that initializes it\nif necessary.\n\nCode example:\n```python\nfrom astromech import s3, dynamodb\n\ns3.client().get_object(Bucket=..., Key=...)\ndynamodb.table().get_item(Key=...)\n```\n\n## LocalStack Support Made Easy\nThe service client initialization functions, look for the environment variable `LOCALSTACK_[SERVICE]_URL`\n(for example, `LOCALSTACK_S3_URL`).\nIf it finds one, then it uses its value as the `endpoint_url` for the Boto3 client function.\n\nAll you have to do to run tests with [LocalStack](https://localstack.cloud) is to set these variables in your local\nenvironment. No changes to the code are necessary.\nNaturally, this works with any other downloadable version of AWS services, like\n[DynamoDB local](https://hub.docker.com/r/amazon/dynamodb-local).\n\n\n## Utility Functions\nThere are a few utility functions in each service. These usually save 2-3 lines of boilerplate code. Not a lot,\nbut for very common functionality that is repeated all across the code base, it becomes worthwhile.\n\nFor example, to check if an object exists on S3, you have to send a `head_object` request and catch the exception\nif it doesn't exist. With `astromech.s3` you just call `exists(bucket, key)`, much like you would do with a local\nfile.\n\n\n## Why \"Astromech\"?\nIn the Star Wars universe, astromech is a type of utility droid, the most famous of which (whom?) is R2-D2.\n\nRead more on [Wookiepedia](https://starwars.fandom.com/wiki/Astromech_droid).\n\n![R2-series astromech droids](https://vignette.wikia.nocookie.net/starwars/images/1/1d/Threeartoos.jpg/revision/latest?cb=20060115025836&format=original)\n\n\n", "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/eladkehat/astromech", "keywords": "serverless aws labmda utilities utils", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "astromech", "package_url": "https://pypi.org/project/astromech/", "platform": "", "project_url": "https://pypi.org/project/astromech/", "project_urls": { "Homepage": "https://github.com/eladkehat/astromech" }, "release_url": "https://pypi.org/project/astromech/0.5.0/", "requires_dist": [ "boto3 (~=1.7)" ], "requires_python": ">=3.7", "summary": "AWS service utilities for Lambda functions", "version": "0.5.0" }, "last_serial": 5247181, "releases": { "0.3.0": [ { "comment_text": "", "digests": { "md5": "131ccbbe30174a044b0b8c8a2174abf4", "sha256": "84e44ee076e918ac127a386cb1f6d8563b5489ecad063e477f3136525087c5e8" }, "downloads": -1, "filename": "astromech-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "131ccbbe30174a044b0b8c8a2174abf4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7", "size": 9949, "upload_time": "2019-04-22T07:57:31", "url": "https://files.pythonhosted.org/packages/b0/e9/8a8515383aadf2ed6e1c1f2a988960957b2246b3297dd37744975d1447ec/astromech-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7d58254300636cea30f5cf8b202ceaae", "sha256": "3da47b7506735279c262c7dbe5a65520655807f64a43e4ab26274e5dde01e68e" }, "downloads": -1, "filename": "astromech-0.3.0.tar.gz", "has_sig": false, "md5_digest": "7d58254300636cea30f5cf8b202ceaae", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 11259, "upload_time": "2019-04-22T07:57:39", "url": "https://files.pythonhosted.org/packages/4e/3d/3493654c7fbd40eb55f5bb11150a8a33ed92c5cc2f72b5667a34e6b7914d/astromech-0.3.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "58416647dc5a11b10439a133ffedfca9", "sha256": "433ad450cddb1da83f1d54e90c7f5c129703c618d93d5b774834b12bb8eca455" }, "downloads": -1, "filename": "astromech-0.4.0-py3-none-any.whl", "has_sig": false, "md5_digest": "58416647dc5a11b10439a133ffedfca9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7", "size": 10046, "upload_time": "2019-04-23T18:40:49", "url": "https://files.pythonhosted.org/packages/58/c5/ceeeba629244c8be6b5189e571809bfcb6391a14cf42642029f9e68c8bc4/astromech-0.4.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4ffc90bacd6dabf378a1fcb80ebceb63", "sha256": "54f006b8183dfb1e453f5f60f2028d1e67939e1e76f987722380f854f804938e" }, "downloads": -1, "filename": "astromech-0.4.0.tar.gz", "has_sig": false, "md5_digest": "4ffc90bacd6dabf378a1fcb80ebceb63", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 11436, "upload_time": "2019-04-23T18:40:50", "url": "https://files.pythonhosted.org/packages/43/ee/b5d8319e47bbc4d517fe53631ed9ce8dee08862707dfef0679e0f0993e12/astromech-0.4.0.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "b6a86dde7d50fdecd92d635c0dc24d76", "sha256": "84c651c0268eda0f12186a1fecd7c79b1ddb4a188baddeaafd451f975e2c11ef" }, "downloads": -1, "filename": "astromech-0.5.0-py3-none-any.whl", "has_sig": false, "md5_digest": "b6a86dde7d50fdecd92d635c0dc24d76", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7", "size": 10914, "upload_time": "2019-05-09T12:24:52", "url": "https://files.pythonhosted.org/packages/b6/5a/d46850199408d1435daea6e6f6afe31324e772b423e098459e5d6a01eedc/astromech-0.5.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "929ed9b6a32b2fa3295d7546456831f7", "sha256": "504ed50c4375a109f88c45b79cb86ce00d66572c2c37a258143523dcee8f3c42" }, "downloads": -1, "filename": "astromech-0.5.0.tar.gz", "has_sig": false, "md5_digest": "929ed9b6a32b2fa3295d7546456831f7", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 12281, "upload_time": "2019-05-09T12:24:54", "url": "https://files.pythonhosted.org/packages/bf/74/3b67e9e85949ffd93ba95a0bac0e6cc8ff86f39f16ca82baf7c519f7bed6/astromech-0.5.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b6a86dde7d50fdecd92d635c0dc24d76", "sha256": "84c651c0268eda0f12186a1fecd7c79b1ddb4a188baddeaafd451f975e2c11ef" }, "downloads": -1, "filename": "astromech-0.5.0-py3-none-any.whl", "has_sig": false, "md5_digest": "b6a86dde7d50fdecd92d635c0dc24d76", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7", "size": 10914, "upload_time": "2019-05-09T12:24:52", "url": "https://files.pythonhosted.org/packages/b6/5a/d46850199408d1435daea6e6f6afe31324e772b423e098459e5d6a01eedc/astromech-0.5.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "929ed9b6a32b2fa3295d7546456831f7", "sha256": "504ed50c4375a109f88c45b79cb86ce00d66572c2c37a258143523dcee8f3c42" }, "downloads": -1, "filename": "astromech-0.5.0.tar.gz", "has_sig": false, "md5_digest": "929ed9b6a32b2fa3295d7546456831f7", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 12281, "upload_time": "2019-05-09T12:24:54", "url": "https://files.pythonhosted.org/packages/bf/74/3b67e9e85949ffd93ba95a0bac0e6cc8ff86f39f16ca82baf7c519f7bed6/astromech-0.5.0.tar.gz" } ] }