{ "info": { "author": "Dusan Klinec (ph4r05)", "author_email": "ph4r05@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5" ], "description": "JBoss CLI output parser\n=======================\n\nThis simple python library is a JBoss output lexer & parser based on `PLY `__\n(yet another implementation of lex and yacc for Python).\n\nJBoss CLI server has output that closely resembles JSON, but it is not 100% JSON so it is difficult\nto parse it with ordinary tools. With this library you can process JBoss output and parse it as JSON.\n\nExample\n\n.. code:: python\n\n from jbossply.jbossparser import JbossParser\n test3 = \"\"\"{\n \"outcome\" => \"success\",\n \"result\" => {\n \"rule-1\" => {\n \"flags\" => \"L,QSA,R\",\n \"pattern\" => \"^/$\",\n \"substitution\" => \"/ejbca\",\n \"condition\" => undefined\n },\n \"rule-3\" => {\n \"flags\" => \"L,QSA,R\",\n \"pattern\" => \"^/pki/?$\",\n \"substitution\" => \"/ejbca/adminweb\",\n \"condition\" => undefined\n }\n }\n }\n \"\"\"\n\n parser = JbossParser()\n print(parser.parse(test3))\n\nWhich gives output\n\n::\n\n {u'outcome': u'success', u'result': {u'rule-3': {u'pattern': u'^/pki/?$', u'flags': u'L,QSA,R', u'condition': None, u'substitution': u'/ejbca/adminweb'}, u'rule-1': {u'pattern': u'^/$', u'flags': u'L,QSA,R', u'condition': None, u'substitution': u'/ejbca'}}}\n\n\nYou may want to cache parser tables, then create `JbossParser` like this:\n\n.. code:: python\n\n parser = JbossParser(write_tables=True, outputdir='/tmp/table-dir')\n\n\nCommand line usage\n------------------\n\nAfter installed with pip you may use also the command line helper `jboss2json`.\n\n::\n\n $ cat jboss-output.txt | jboss2json\n {\"outcome\": \"success\", \"result\": {\"rule-3\": {\"pattern\": \"^/pki/?$\", \"flags\": \"L,QSA,R\", \"condition\": null, \"substitution\": \"/ejbca/adminweb\"}, \"rule-1\": {\"pattern\": \"^/$\", \"flags\": \"L,QSA,R\", \"condition\": null, \"substitution\": \"/ejbca\"}}}\n\n\nInstallation\n------------\n\nYou can install this package using pip:\n\n::\n\n pip install jbossply\n\n\n\nCredits\n-------\n\nThe code is based on @vsajip repository `json-ply `__", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/EnigmaBridge/jbossply", "keywords": null, "license": "MIT License\n\nCopyright (c) 2016 Enigma bridge\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.", "maintainer": null, "maintainer_email": null, "name": "jbossply", "package_url": "https://pypi.org/project/jbossply/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/jbossply/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/EnigmaBridge/jbossply" }, "release_url": "https://pypi.org/project/jbossply/0.0.3/", "requires_dist": null, "requires_python": null, "summary": "JBoss CLI output parser", "version": "0.0.3" }, "last_serial": 2654474, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "7cb52a31649da6bb8107d178f54ffddc", "sha256": "90aaafb68f96c6af6c62a351d6618df40f45dc82caa74f52ef8cdf08df18f46f" }, "downloads": -1, "filename": "jbossply-0.0.1.tar.gz", "has_sig": false, "md5_digest": "7cb52a31649da6bb8107d178f54ffddc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7161, "upload_time": "2017-02-17T18:02:35", "url": "https://files.pythonhosted.org/packages/e9/39/c3b4ae011f4011022f329037103825e2afb3e3e9d1d7bb933b354aead56b/jbossply-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "158bef65b22a6c37deed6097bbe4479b", "sha256": "9a4f5e77e5b7de9150b7ae476a3eb16a69024e504b8e5fd89d6fa22a54413a22" }, "downloads": -1, "filename": "jbossply-0.0.2.tar.gz", "has_sig": false, "md5_digest": "158bef65b22a6c37deed6097bbe4479b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7173, "upload_time": "2017-02-17T18:05:37", "url": "https://files.pythonhosted.org/packages/f9/a6/61b6cfcf90af5499e64198419bf99ce8774c039a5462da87b314a6aa5752/jbossply-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "22400ed19c627d5e72b0dde2eaebd096", "sha256": "3acf657b873c9e82ed64443c5577747cdbed046d94817246b61ce98e82e34454" }, "downloads": -1, "filename": "jbossply-0.0.3.tar.gz", "has_sig": false, "md5_digest": "22400ed19c627d5e72b0dde2eaebd096", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7185, "upload_time": "2017-02-20T10:04:06", "url": "https://files.pythonhosted.org/packages/c9/9b/ba217eb94a56e62128a86293573cec5da8677b156a76b5566e27ea762d65/jbossply-0.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "22400ed19c627d5e72b0dde2eaebd096", "sha256": "3acf657b873c9e82ed64443c5577747cdbed046d94817246b61ce98e82e34454" }, "downloads": -1, "filename": "jbossply-0.0.3.tar.gz", "has_sig": false, "md5_digest": "22400ed19c627d5e72b0dde2eaebd096", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7185, "upload_time": "2017-02-20T10:04:06", "url": "https://files.pythonhosted.org/packages/c9/9b/ba217eb94a56e62128a86293573cec5da8677b156a76b5566e27ea762d65/jbossply-0.0.3.tar.gz" } ] }