{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [], "description": "Confetti\n=========\nConfectionary confetti to confine those confounded configurations confidently\n---------\n\n## Install in your application\n```bash\n$ pip install git+ssh://git@github.com/AmberEngine/confectionary-confetti.git#egg=confectionary-confetti\n```\n\n## Create a boto3 session. If you don't create a session, one will be created for you using your AWS user configuration or role.\n\n### The session keyword argument overrides the default session.\n```python\n from confetti import Confetti\n \n session = boto3.session.Session()\n confetti = Confetti(session=session)\n \n print(confetti.path)\n```\n### Output\n```\n/Development/Confetti\n```\n\n## Choose a key. Your key will the root of the namespacing path of your application's parameters and will be used as an alias for a KMS key to encrypt and decrypt your parameters. If you don't choose a key, the default value is 'Development'.\n\n### Set CONFETTI_KEY environment variable. The CONFETTI_KEY environment overrides the default.\n```bash\n$ export CONFETTI_KEY=YourKey\n```\n```python\n from confetti import Confetti\n \n confetti = Confetti()\n \n print(confetti.path)\n```\n### Output\n```\n/YourKey/Confetti\n```\n\n### The confetti_key keyword argument overrides the CONFETTI_KEY environment variable.\n```python\n from confetti import Confetti\n \n confetti = Confetti(confetti_key='YourKey')\n \n print(confetti.path)\n```\n### Output\n```\n/YourKey/Confetti\n```\n\n## Choose a path. Your path will be appended to the namespacing path of your application's parameters, i.e. //. e.g. /YourKey/Your/Path. If you don't choose a path, the default value is the name of the Confetti class.\n\n### Override the Confetti class and use MyApp as the default.\n```python\n from confetti import Confetti\n \n class MyApp(Confetti):\n pass\n \n confetti = MyApp()\n \n print(confetti.path)\n```\n### Output\n```\n/Development/MyApp\n```\n\n### Set CONFETTI_PATH environment variable. The CONFETTI_PATH environment overrides the default.\n```bash\n$ export CONFETTI_PATH=Your/Path\n```\n```python\n from confetti import Confetti\n \n confetti = Confetti()\n \n print(confetti.path)\n```\n### Output\n```\n/Development/Your/Path\n```\n\n### The confetti_path keyword argument overrides the CONFETTI_PATH environment variable.\n```python\n from confetti import Confetti\n \n confetti = Confetti(confetti_path='Your/Path')\n \n print(confetti.path)\n```\n### Output\n```\n/Development/Your/Path\n```\n\n## Retrieve and use your parameters in your application. Note that it is assumed that your SecureString parameters are to be retrieved with decryption. You can override the parameters to SSM.Client.get_parameters_by_path via keyword arguments with the exception of 'Path'.\n```python\n from confetti import Confetti\n\n confetti = Confetti(confetti_key=\"Production\", confetti_path=\"MyApp\")\n parameters = confetti.get_parameters()\n\n # Print the value of a specific parameter\n print(parameters.APP_URL)\n\n # Print your parameters\n print(parameters)\n```\n\n## Store parameters from a JSON file.\n\n### Create a JSON file with your new parameters\n```json\n[{\n \"Name\": \"APP_URL\",\n \"Value\": \"http://www.mrcoolice.com/app\",\n \"Type\": \"String\"\n}, {\n \"Name\": \"APP_KEY\",\n \"Value\": \"abcde12345\",\n \"Type\": \"SecureString\"\n}, {\n \"Name\": \"THINGS\",\n \"Value\": \"thing1, thing2\",\n \"Type\": \"StringList\"\n}]\n```\n\n## Export your current parameters to a JSON file so you can modify them. Note that it is assumed that your SecureString parameters are to be retrieved with decryption. You can override the parameters to SSM.Client.get_parameters_by_path via keyword arguments with the exception of 'Path'.\n```python\n from confetti import Confetti\n\n # Create your app's config\n confetti = Confetti(confetti_key=\"Production\", confetti_path=\"MyApp\")\n\n # Export to JSON from AWS SSM parameter store\n confetti.export_parameters(\"parameters.json\")\n```\n\n### Review and modify your parameters.\n```json\n[{\n \"Name\": \"APP_URL\",\n \"Value\": \"http://www.mrcoolice.com/app\",\n \"Type\": \"String\",\n \"Overwrite\": true\n}, {\n \"Name\": \"APP_KEY\",\n \"Value\": \"abcde12345\",\n \"Type\": \"SecureString\",\n \"Overwrite\": true\n}, {\n \"Name\": \"THINGS\",\n \"Value\": \"thing1, thing2\",\n \"Type\": \"StringList\",\n \"Overwrite\": true\n}]\n```\n\n## Set your parameters for your application. Do this only once and your parameters will be stored in your AWS SSM Parameter Store.\n```python\n from confetti import Confetti\n\n # Create your app's config\n confetti = Confetti(confetti_key=\"Production\", confetti_path=\"MyApp\")\n\n # Import parameters from JSON to AWS SSM parameter store\n confetti.import_parameters(\"parameters.json\")\n```\n\nsee also: [AWS Systems Manager Parameter Store](https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-paramstore.html) and [SSM.Client.put_parameter](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ssm.html#SSM.Client.put_parameter)", "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/AmberEngine/confectionary-confetti", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "confectionary-confetti", "package_url": "https://pypi.org/project/confectionary-confetti/", "platform": "", "project_url": "https://pypi.org/project/confectionary-confetti/", "project_urls": { "Homepage": "https://github.com/AmberEngine/confectionary-confetti" }, "release_url": "https://pypi.org/project/confectionary-confetti/0.0.1/", "requires_dist": null, "requires_python": "", "summary": "AWS SSM parameter store utility.", "version": "0.0.1" }, "last_serial": 5208692, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "d24dc0e5f931d84632640ed7051aeffa", "sha256": "5796a53e3651ab2ece29b5520ab687455745ce28dde982347160750f0b21b336" }, "downloads": -1, "filename": "confectionary-confetti-0.0.1.tar.gz", "has_sig": false, "md5_digest": "d24dc0e5f931d84632640ed7051aeffa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4484, "upload_time": "2019-04-30T15:20:53", "url": "https://files.pythonhosted.org/packages/73/9d/6976257b5299af27a28eec47cbe4ae4689747630c247b46b453e5f4304b5/confectionary-confetti-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d24dc0e5f931d84632640ed7051aeffa", "sha256": "5796a53e3651ab2ece29b5520ab687455745ce28dde982347160750f0b21b336" }, "downloads": -1, "filename": "confectionary-confetti-0.0.1.tar.gz", "has_sig": false, "md5_digest": "d24dc0e5f931d84632640ed7051aeffa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4484, "upload_time": "2019-04-30T15:20:53", "url": "https://files.pythonhosted.org/packages/73/9d/6976257b5299af27a28eec47cbe4ae4689747630c247b46b453e5f4304b5/confectionary-confetti-0.0.1.tar.gz" } ] }