{ "info": { "author": "Solly Ross", "author_email": "sross@redhat.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Topic :: Software Development" ], "description": "Python Datagrepper Client\r\n=========================\r\n\r\nThis library acts as a wrapper around the wonderful\r\n[requests](https://python-requests.org) library for accessing\r\n[Datagrepper](https://apps.fedoraproject.org/datagrepper/).\r\n\r\nRequirements\r\n------------\r\n\r\n- Python 3.3+\r\n- [requests](https://python-requests.org)\r\n\r\nUsage\r\n-----\r\n\r\nThe API is designed around being chainable. To start, create a new `Grepper`:\r\n\r\n >>> from datanozzle import Grepper\r\n >>> g = Grepper()\r\n >>>\r\n\r\nThen, you can build up queries by chaining methods (each new method returns a new\r\nquery object, so you can reuse partially built queries):\r\n\r\n >>> q1 = g.by_user('sross').ascending\r\n >>> q2 = q1.by_topic('org.fedoraproject.prod.fedbadges.person.rank.advance')\r\n >>>\r\n\r\nQueries are not executed until they are evaluated by iterating over them (the library will\r\nautomatically continue to fetch new pages of information). Each record is returned as an `Entry`,\r\nwhich has several persistent fields (which are accessible as properties), and additional data\r\navailable in a dict-like manner:\r\n\r\n >>> entry = next(iter(q2.take(pages=1)))\r\n >>> entry.topic\r\n 'org.fedoraproject.prod.fedbadges.person.rank.advance'\r\n >>> entry.timestamp\r\n datetime.datetime(2015, 1, 16, 15, 2, 5)\r\n >>> entry['person']['nickname']\r\n 'sross'\r\n >>>\r\n\r\nMost queries can support multiple values. You can either pass multiple values, like\r\n`g.by_user('sross', 'someuser')` or chain, like `g.by_user('sross').by_user('someuser')`.\r\nTo get a query with a parameter reset, call `reset(parameter_name)`, like `g.reset('user')`.\r\n\r\n\r\nQueries\r\n-------\r\n\r\n- `by_user(*users)`: filter by FAS username\r\n- `without_user(*users)`: inverse of `by_user`\r\n- `by_package(*packages)`: filter by package name\r\n- `without_package(*packages)`: inverse of `by_package`\r\n- `by_category(*categories)`: filter by category (the third or fourth part of the topic)\r\n- `without_category(*categories)`: inverse of `by_category`\r\n- `by_topic(*topics)`: filter by topic\r\n- `without_topic(*topics)`: inverse of `by_topic`\r\n- `containing(substring)`: filter by keyword in the message\r\n- `paginate(rows)`: set the number of rows per page\r\n- `with_meta(*meta_type)`: return additional meta-information with the results\r\n- `grouped` (*property*): group similar results together\r\n- `ascending` (*property*): sort results in ascending order\r\n- `descending` (*property*): sort results in descending order\r\n- `take(pages)`: only return results from the first *pages* pages\r\n- `skip(pages)`: skip the first *pages* pages\r\n- `starting_at(start)`: return results from after the given date/time\r\n- `ending_at(end)`: return results from before the given date/time\r\n- `delta_seconds(delta)`: modify start/end times by *delta* seconds\r\n\r\nData Properties\r\n---------------\r\n\r\n- `certificate`: a string containing the certificate\r\n- `signature`: a string containing the signature\r\n- `meta`: a dict containing additional meta-information\r\n- `index`: the message index\r\n- `timestamp`: a `datetime` containing the timestamp for the object\r\n- `topic`: the topic of the message", "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/directxman12/py-datagrepper", "keywords": "datagrepper", "license": "GPLv2+", "maintainer": "", "maintainer_email": "", "name": "datanozzle", "package_url": "https://pypi.org/project/datanozzle/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/datanozzle/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/directxman12/py-datagrepper" }, "release_url": "https://pypi.org/project/datanozzle/0.9.0/", "requires_dist": null, "requires_python": null, "summary": "A Python client for Datagrepper", "version": "0.9.0" }, "last_serial": 1590437, "releases": { "0.9.0": [ { "comment_text": "", "digests": { "md5": "8e7f7e9bc2b924cf13057073e24efbc6", "sha256": "d24ae11d24b47b626da9316537a737898191fd275183cc4f5c2209b7365f669a" }, "downloads": -1, "filename": "datanozzle-0.9.0.tgz", "has_sig": false, "md5_digest": "8e7f7e9bc2b924cf13057073e24efbc6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10122, "upload_time": "2015-06-05T22:28:14", "url": "https://files.pythonhosted.org/packages/a3/63/956ac15c7564d4a01fdfe692beb50700f763c00f44abb83616cdb3c59568/datanozzle-0.9.0.tgz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8e7f7e9bc2b924cf13057073e24efbc6", "sha256": "d24ae11d24b47b626da9316537a737898191fd275183cc4f5c2209b7365f669a" }, "downloads": -1, "filename": "datanozzle-0.9.0.tgz", "has_sig": false, "md5_digest": "8e7f7e9bc2b924cf13057073e24efbc6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10122, "upload_time": "2015-06-05T22:28:14", "url": "https://files.pythonhosted.org/packages/a3/63/956ac15c7564d4a01fdfe692beb50700f763c00f44abb83616cdb3c59568/datanozzle-0.9.0.tgz" } ] }