{ "info": { "author": "Luca Valentini", "author_email": "luca@paddle.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.7" ], "description": "![build](https://action-badges.now.sh/PaddleHQ/python-aws-ssm)\n[![codecov](https://codecov.io/gh/PaddleHQ/python-aws-ssm/branch/master/graph/badge.svg)](https://codecov.io/gh/PaddleHQ/python-aws-ssm)\n[![license](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![codestyle](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)\n\n# python-aws-ssm\nPython package that interfaces with [AWS System Manager](https://www.amazonaws.cn/en/systems-manager/).\n\n## Why to use python-aws-ssm and not the boto3 SSM client?\nThis package is wrapping boto3 SSM client and hides the complexity dealing with the not so Python friendly AWS SDK.\nPerfect use case for this package is when secure parameters for an application are stored to\n[AWS Parameter Store](https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-parameter-store.html)\nusing a path hierarchy. During application startup you can use this package to fetch them and use them in your application.\n\n## Warning\n\nThe SSM service is rate-limited by default. We strongly suggest using\nretrieving SSM keys by path, e.g. via `ParameterStore.get_parameters_by_path()`.\nThis requires grouping keys by a useful path but reduces the chance of\nyour own services being rate-limited in turn.\n\n## Install\n```bash\npip install python-aws-ssm\n```\n\n## Examples\n\n#### Basic Usage\n\n```python\nfrom python_aws_ssm.parameters import ParameterStore\n\n# Assuming you have the parameters in the following format:\n# my-service/dev/param-1 -> with value `a`\n# my-service/dev/param-2 -> with value `b`\nparameter_store = ParameterStore()\n# Requesting the base path\nparameters = parameter_store.get_parameters_by_path(\"/my-service/dev/\")\n# And getting a specific value\nvalue = parameters.get(\"param-1\")\n# value should be `a`\n```\n\n#### Recursive and nested options\n\n```python\nfrom python_aws_ssm.parameters import ParameterStore\n\n# Assuming you have the parameters in the following format:\n# my-service/dev/param-1 -> with value `a`\n# my-service/dev/param-2 -> with value `b`\nparameter_store = ParameterStore()\n# Requesting the base path\nparameters = parameter_store.get_parameters_by_path(\n \"/my-service/\", recursive=True, nested=True\n)\n# And getting a specific value\ndev_parameters = parameters.get(\"dev\")\n# value should be {\"param-1\": \"a\", \"param-2\": \"b\"}\n```\n\n#### Get parameters by name\n\n```python\nfrom python_aws_ssm.parameters import ParameterStore\n\n# Assuming you have the parameters in the following format:\n# my-service/dev/param-1 -> with value `a`\n# common/dev/param-2 -> with value `b`\nparameter_store = ParameterStore()\n# Requesting the base path\nparameters = parameter_store.get_parameters(\n [\"/my-service/dev/param-1\", \"/common/dev/param-2\"]\n)\n# And getting a specific value\ndev_parameters = parameters.get(\"/common/dev/param-2\")\n# value should be `b`\n```\n\n#### With custom client\n\n```python\nfrom python_aws_ssm.parameters import ParameterStore\nimport boto3\n\n# Initialise an SSM client to specify the source of the credentials.\n# e.g. locally a profile would be more likely; an AWS Lambda would most\n# likely not override the credentials source.\nssm_client = boto3.Session(profile_name='dev').client('ssm')\nparameter_store = ParameterStore(ssm_client)\n\nparameters = parameter_store.get_parameters([\"/service/path/\"])\n```\n\n## Development\n\nIf you are missing any features or have found a bug, please open a PR or a new Github issue.\n\n\n#### Setup\nThis project uses Poetry to manage the dependencies and the virtual environment.\nFollow the instructions from Poetry website (https://poetry.eustace.io/docs/#installation) to configure your local environment.\n\nAfter completing the Poetry setup, the virtual environment can be created running:\n```shell\nmake setup\n```\n\n#### Tests\nTests are run by Pytest\n```shell\nmake test\n```\n\n#### Code style\n- Mypy is used for type annotations (https://github.com/python/mypy)\n- Black formatter (https://github.com/psf/black) is used to keep the coding style consistent.\n- Isort (https://github.com/timothycrosley/isort) is used to sort the imports.\nTo format the codebase just run:\n```shell\nmake format\n```\nand to check it before pushing:\n```shell\nmake lint\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/PaddleHQ/python-aws-ssm", "keywords": "python,aws,ssm", "license": "Apache-2.0", "maintainer": "Luca Valentini", "maintainer_email": "luca@paddle.com", "name": "python-aws-ssm", "package_url": "https://pypi.org/project/python-aws-ssm/", "platform": "", "project_url": "https://pypi.org/project/python-aws-ssm/", "project_urls": { "Homepage": "https://github.com/PaddleHQ/python-aws-ssm", "Repository": "https://github.com/PaddleHQ/python-aws-ssm" }, "release_url": "https://pypi.org/project/python-aws-ssm/0.1.2/", "requires_dist": [ "boto3 (>=1.9,<2.0)" ], "requires_python": ">=3.7,<4.0", "summary": "Python package that interfaces with AWS System Manager", "version": "0.1.2" }, "last_serial": 5736155, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "1c9e9264024911b1979d0c68f745d803", "sha256": "541259e350fe950ff31f104fcc714da795b7bdce5cad0599f181d2761e8395bb" }, "downloads": -1, "filename": "python_aws_ssm-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "1c9e9264024911b1979d0c68f745d803", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7,<4.0", "size": 12471, "upload_time": "2019-08-21T08:56:17", "url": "https://files.pythonhosted.org/packages/ce/cb/93614764fb1b2642ac52bdf2bddd3c19a86681cba2178190223f69e22e0a/python_aws_ssm-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2ea6d72170142d70727d26b2ca1694b0", "sha256": "2c3e1033c755ea5bbfe24bcb8fbc28585eff7865247b4e35c9ae8b26ca3a9d95" }, "downloads": -1, "filename": "python-aws-ssm-0.1.1.tar.gz", "has_sig": false, "md5_digest": "2ea6d72170142d70727d26b2ca1694b0", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7,<4.0", "size": 8551, "upload_time": "2019-08-21T08:56:15", "url": "https://files.pythonhosted.org/packages/63/16/1892e75d6a8370868ba43f87f671da7cfdfc451bec9eefd33ebc56ef20f7/python-aws-ssm-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "8a370e1611b20a46a2d626fbed58c177", "sha256": "ef70b24e24ebb54ff8bfd80b1b2e1de13aaa4bea3884baa46ae00296d4df827a" }, "downloads": -1, "filename": "python_aws_ssm-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "8a370e1611b20a46a2d626fbed58c177", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7,<4.0", "size": 12474, "upload_time": "2019-08-27T10:59:31", "url": "https://files.pythonhosted.org/packages/88/dd/7d8af6e8860fb2a9f95a0b4665ae396e87f6d74bc71c4514961182c7e076/python_aws_ssm-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f69335948dbd7c3408cc818ebc232898", "sha256": "5999bf3b9d30fb45294cedcfa8aa9023b5dd6d75aaf218eadb9efa78a06bb023" }, "downloads": -1, "filename": "python-aws-ssm-0.1.2.tar.gz", "has_sig": false, "md5_digest": "f69335948dbd7c3408cc818ebc232898", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7,<4.0", "size": 8542, "upload_time": "2019-08-27T10:59:29", "url": "https://files.pythonhosted.org/packages/34/3a/32f9843b8fdca3104c93e607d0a5adb5ca0d53fe17f11370b521c4b1abe9/python-aws-ssm-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8a370e1611b20a46a2d626fbed58c177", "sha256": "ef70b24e24ebb54ff8bfd80b1b2e1de13aaa4bea3884baa46ae00296d4df827a" }, "downloads": -1, "filename": "python_aws_ssm-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "8a370e1611b20a46a2d626fbed58c177", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7,<4.0", "size": 12474, "upload_time": "2019-08-27T10:59:31", "url": "https://files.pythonhosted.org/packages/88/dd/7d8af6e8860fb2a9f95a0b4665ae396e87f6d74bc71c4514961182c7e076/python_aws_ssm-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f69335948dbd7c3408cc818ebc232898", "sha256": "5999bf3b9d30fb45294cedcfa8aa9023b5dd6d75aaf218eadb9efa78a06bb023" }, "downloads": -1, "filename": "python-aws-ssm-0.1.2.tar.gz", "has_sig": false, "md5_digest": "f69335948dbd7c3408cc818ebc232898", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7,<4.0", "size": 8542, "upload_time": "2019-08-27T10:59:29", "url": "https://files.pythonhosted.org/packages/34/3a/32f9843b8fdca3104c93e607d0a5adb5ca0d53fe17f11370b521c4b1abe9/python-aws-ssm-0.1.2.tar.gz" } ] }