{ "info": { "author": "Joseph Procopio", "author_email": "josephp27@live.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# E2Yaml\nAn environment variable to yaml converter. \n\nDue to security reasons at my job, we cannot upload contents of Yaml files that have sensitive data. Variables are injected into a virtual environment as environment variables via a Jenkins job. However, when testing locally, sometimes we need those variables. E2Yaml addresses that problem.\n\n```\nSPRING_DATA_MONGODB_DATABASE: TESTDB\nSPRING_DATA_MONGODB_ENCRYPTION: disabled\nSPRING_DATA_MONGODB_ENCRYPTION-KEY: FakePassWord!\nSPRING_DATA_MONGODB_PASSWORD: !54353Ffesf34\nSPRING_DATA_MONGODB_REPLICASET: FAKE-DB-531\n```\nConverts to:\n```\nspring:\n data:\n mongodb:\n database: TESTDB\n encryption: disabled\n encryption-key: \"FakePassWord!\"\n password: \"!54353Ffesf34\"\n replicaSet: FAKE-DB-531\n```\n And we can see this from the command line by runnning driver.py:\n \n ```\n \u2570\u2500$ python3 driver.py\nPARSING: \tSPRING_DATA_MONGODB_DATABASE: TESTDB\tOK\nPARSING: \tSPRING_DATA_MONGODB_ENCRYPTION: disabled\tOK\nPARSING: \tSPRING_DATA_MONGODB_ENCRYPTION-KEY: FakePassWord!\tOK\nPARSING: \tSPRING_DATA_MONGODB_PASSWORD: !54353Ffesf34\tOK\nPARSING: \tSPRING_DATA_MONGODB_REPLICASET: FAKE-DB-531\tOK\n ```\n## Installing\n```\npip3 install E2Yaml\n```\n\n## Importing\n```\nimport E2Yaml as ey\n```\n\n## Loading\n```\n# example program loading from clipboard and outputting to clipboard\nyml = ey.from_clipboard(log=True)\n\n# converting a file\nyml = ey.load_file('test_input.env', log=True)\n\n# adding one line at a time\nyml = EyConverter().add_line(\"SOME_TEXT=true\")\n```\nNote: you can disable logging by not including the second parameter *log=True*\n\n## Preserving Words\nEnvironment variables are delimited by '_' to indicate nesting in YAML and sometimes these characters are also used to define a variable. You can choose to preserve the letters by calling this function\n```\nyml.preserve_words('auditLog',\n 'logInsertsEnabled',\n 'kafkaEnabled',\n 'tibcoPublishes',\n 'tibcoSubscriptions',\n 'queue_connection_factory',\n 'inbound_queue',\n 'outbound_queue',\n 'retry_queue',\n 'pkt_dead_letter_queue',\n 'idle_concurrent',\n 'max_concurrent',\n 'connection_timeout',\n 'connection_attempts',\n 'reconnection_timeout',\n 'reconnection_attempts',\n 'replicaSet')\n```\nNote: environment variables are usually upper case and camel case is lost in translation. To preserve this, you can add the variable above as well.\n\n## Ignoring Lines\nIf you're loading in from a file or from your clipboard, you can ignore specific lines containing an attribute.\n```\nyml.ignore_lines_containing('JAVA_OPTS', 'CONVEYOR')\n```\n\n## Converting\nFirst, you need to call the function *convert_to_dictionary()*, which returns itself, allowing chaining. Then, setting the proper output to clipboard, stdout, or a file.\n```\n# in this case we are writing to the clipboard.\nyml.convert_to_dictionary().to_clipboard()\n\n# print to stdout\nyml.convert_to_dictionary().show()\n\n# print to file\nyml.convert_to_dictionary().write_file('filename.yml'))\n```\n\n## Examples\ndriver.py is an example program to write to read from the clipboard and writes back for easy copying and pasting", "description_content_type": "text/markdown", "docs_url": null, "download_url": "https://github.com/josephp27/E2Yaml/archive/0.4.2.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/josephp27/E2Yaml", "keywords": "Yaml,Converter,Environment,Variables", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "E2Yaml", "package_url": "https://pypi.org/project/E2Yaml/", "platform": "", "project_url": "https://pypi.org/project/E2Yaml/", "project_urls": { "Download": "https://github.com/josephp27/E2Yaml/archive/0.4.2.tar.gz", "Homepage": "https://github.com/josephp27/E2Yaml" }, "release_url": "https://pypi.org/project/E2Yaml/0.4.2/", "requires_dist": null, "requires_python": "", "summary": "An Environment Variable to Yaml Converter", "version": "0.4.2", "yanked": false, "yanked_reason": null }, "last_serial": 6010437, "releases": { "0.3": [ { "comment_text": "", "digests": { "md5": "59d70fd16555c82b1ac973e19a320abb", "sha256": "354dc3fe08332c28e1121a1735f2ba3e46e661712b55b454e606b3a3a818f73e" }, "downloads": -1, "filename": "E2Yaml-0.3.tar.gz", "has_sig": false, "md5_digest": "59d70fd16555c82b1ac973e19a320abb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2487, "upload_time": "2019-10-16T16:41:59", "upload_time_iso_8601": "2019-10-16T16:41:59.401032Z", "url": "https://files.pythonhosted.org/packages/e7/fd/ffabbea2bed64900771cc57f14fc059f86218c61356d221157c735101967/E2Yaml-0.3.tar.gz", "yanked": false, "yanked_reason": null } ], "0.4": [ { "comment_text": "", "digests": { "md5": "929e7adf099bed3cb09c0a60fbd942d1", "sha256": "bf80da5a314c45576408d5e66a46585b2d31bd4cb9614a0fe6c74c840687dc93" }, "downloads": -1, "filename": "E2Yaml-0.4.tar.gz", "has_sig": false, "md5_digest": "929e7adf099bed3cb09c0a60fbd942d1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2584, "upload_time": "2019-10-22T03:43:49", "upload_time_iso_8601": "2019-10-22T03:43:49.466001Z", "url": "https://files.pythonhosted.org/packages/eb/b6/952622c35831a17449bd4cd76ad8a7481f2a6520ccdafd8de27dabba810a/E2Yaml-0.4.tar.gz", "yanked": false, "yanked_reason": null } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "12b5b2ef392d697b3758e980f59c0f41", "sha256": "81dc93e4c6f8a2fcc63090b0a4be3a2fa1a2a07b01d218d9f0a23f69932c7a54" }, "downloads": -1, "filename": "E2Yaml-0.4.1.tar.gz", "has_sig": false, "md5_digest": "12b5b2ef392d697b3758e980f59c0f41", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4649, "upload_time": "2019-10-22T04:06:19", "upload_time_iso_8601": "2019-10-22T04:06:19.726300Z", "url": "https://files.pythonhosted.org/packages/ac/0b/65bd6763691eabc80760ffba0e61d4027ee487d12318019a21c7baa84944/E2Yaml-0.4.1.tar.gz", "yanked": false, "yanked_reason": null } ], "0.4.2": [ { "comment_text": "", "digests": { "md5": "e1ebf88a47923f0971c3e3952a010611", "sha256": "10cd7a8e6bb59e356f719dbca743c70d1f3cb4ca370459357ad6fee7e96bbda5" }, "downloads": -1, "filename": "E2Yaml-0.4.2.tar.gz", "has_sig": false, "md5_digest": "e1ebf88a47923f0971c3e3952a010611", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4680, "upload_time": "2019-10-22T04:12:27", "upload_time_iso_8601": "2019-10-22T04:12:27.578316Z", "url": "https://files.pythonhosted.org/packages/5a/1f/6c773a9f688d46b2b027542819425ab16cac711219903f4997d2e5dbacc8/E2Yaml-0.4.2.tar.gz", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e1ebf88a47923f0971c3e3952a010611", "sha256": "10cd7a8e6bb59e356f719dbca743c70d1f3cb4ca370459357ad6fee7e96bbda5" }, "downloads": -1, "filename": "E2Yaml-0.4.2.tar.gz", "has_sig": false, "md5_digest": "e1ebf88a47923f0971c3e3952a010611", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4680, "upload_time": "2019-10-22T04:12:27", "upload_time_iso_8601": "2019-10-22T04:12:27.578316Z", "url": "https://files.pythonhosted.org/packages/5a/1f/6c773a9f688d46b2b027542819425ab16cac711219903f4997d2e5dbacc8/E2Yaml-0.4.2.tar.gz", "yanked": false, "yanked_reason": null } ], "vulnerabilities": [] }