{ "info": { "author": "garyelephant", "author_email": "garygaowork@gmail.com", "bugtrack_url": null, "classifiers": [], "description": ".. contents::\n :depth: 3\n..\n\npygrok |Build Status|\n=====================\n\n|Join the chat at https://gitter.im/garyelephant/pygrok|\n\nA Python library to parse strings and extract information from\nstructured/unstructured data\n\nWhat can I use Grok for?\n------------------------\n\n- parsing and matching patterns in a string(log, message etc.)\n- relieving from complex regular expressions.\n- extracting information from structured/unstructured data\n\nInstallation\n------------\n\n.. code:: Bash\n\n $ pip install pygrok\n\nor download, uncompress and install pygrok from\n`here `__:\n\n.. code:: Bash\n\n $ tar zxvf pygrok-xx.tar.gz\n $ cd pygrok_dir\n $ sudo python setup.py install\n\nGetting Started\n---------------\n\n.. code:: Python\n\n >>> import pygrok\n >>> text = 'gary is male, 25 years old and weighs 68.5 kilograms'\n >>> pattern = '%{WORD:name} is %{WORD:gender}, %{NUMBER:age} years old and weighs %{NUMBER:weight} kilograms'\n >>> print pygrok.grok_match(text, pattern)\n {'gender': 'male', 'age': '25', 'name': 'gary', 'weight': '68.5'}\n\nPretty Cool ! Some of the pattern you can use are listed here:\n\n::\n\n `WORD` means \\b\\w+\\b in regular expression.\n `NUMBER` means (?:%{BASE10NUM})\n `BASE10NUM` means (?[+-]?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+)))\n\n other patterns such as `IP`, `HOSTNAME`, `URIPATH`, `DATE`, `TIMESTAMP_ISO8601`, `COMMONAPACHELOG`..\n\nSee All patterns `here <./pygrok/patterns>`__\n\nMore details\n------------\n\nBeause python re module does not support regular expression syntax\natomic grouping(?>),so pygrok requires\n`regex `__ to be\ninstalled.\n\npygrok is inspired by `Grok `__\ndeveloped by Jordan Sissel. This is not a wrapper of Jordan Sissel's\nGrok and totally implemented by me.\n\nGrok is a simple software that allows you to easily parse strings, logs\nand other files. With grok, you can turn unstructured log and event data\ninto structured data.Pygrok does the same thing.\n\nI recommend you to have a look at `logstash filter\ngrok `__,\nit explains how Grok-like thing work.\n\npattern files come from `logstash filter grok's pattern\nfiles `__\n\nContribute\n----------\n\n- You are encouraged to\n `fork `__, improve the\n code, then make a pull request.\n- `Issue tracker `__\n\nGet Help\n--------\n\n::\n\n mail:garygaowork@gmail.com\n twitter:@garyelephant\n\nContributors\n------------\n\nThanks to `all\ncontributors `__\n\n.. |Build Status| image:: https://travis-ci.org/garyelephant/pygrok.svg?branch=master\n :target: https://travis-ci.org/garyelephant/pygrok\n.. |Join the chat at https://gitter.im/garyelephant/pygrok| image:: https://badges.gitter.im/Join%20Chat.svg\n :target: https://gitter.im/garyelephant/pygrok?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/garyelephant/pygrok/tarball/v0.7.4", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/garyelephant/pygrok", "keywords": "python grok,regex", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "pygroker", "package_url": "https://pypi.org/project/pygroker/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pygroker/", "project_urls": { "Download": "https://github.com/garyelephant/pygrok/tarball/v0.7.4", "Homepage": "https://github.com/garyelephant/pygrok" }, "release_url": "https://pypi.org/project/pygroker/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "Temporary package for https://github.com/garyelephant/pygrok/pull/3", "version": "0.1.1" }, "last_serial": 2280139, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "d02b285a88ddd26e3f53a781e1d28c1e", "sha256": "2e6a5d4266e633671dda5b72e3d41ad4af9aaa5d826ac66b70961f89afde90f2" }, "downloads": -1, "filename": "pygroker-0.1.0.tar.gz", "has_sig": false, "md5_digest": "d02b285a88ddd26e3f53a781e1d28c1e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20349, "upload_time": "2016-08-14T02:19:13", "url": "https://files.pythonhosted.org/packages/3a/91/9542344d7035f4b9932653fb2682b6ef813c1a6455dd4a5edbc55a2312f4/pygroker-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "9dd9e796da3814c468725a50d212116f", "sha256": "90fb4995e0a6490bb429ff6b4b576095366977a1f9b6752eb303255203b9be6d" }, "downloads": -1, "filename": "pygroker-0.1.1.tar.gz", "has_sig": false, "md5_digest": "9dd9e796da3814c468725a50d212116f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20343, "upload_time": "2016-08-14T03:06:23", "url": "https://files.pythonhosted.org/packages/b9/5c/2acbe37a13b7ed30c02a7b3aea9e16cee2d77fcf4083573d8b430463a152/pygroker-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9dd9e796da3814c468725a50d212116f", "sha256": "90fb4995e0a6490bb429ff6b4b576095366977a1f9b6752eb303255203b9be6d" }, "downloads": -1, "filename": "pygroker-0.1.1.tar.gz", "has_sig": false, "md5_digest": "9dd9e796da3814c468725a50d212116f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20343, "upload_time": "2016-08-14T03:06:23", "url": "https://files.pythonhosted.org/packages/b9/5c/2acbe37a13b7ed30c02a7b3aea9e16cee2d77fcf4083573d8b430463a152/pygroker-0.1.1.tar.gz" } ] }