{ "info": { "author": "Ran Geva", "author_email": "ran@webhose.io", "bugtrack_url": null, "classifiers": [], "description": "webhose.io client for Python\n============================\nA simple way to access the [Webhose.io](https://webhose.io) API from your Python code\n```python\n\n import webhoseio\n\n webhoseio.config(token=YOUR_API_KEY)\n output = webhoseio.query(\"filterWebData\", {\"q\":\"github\"})\n print output['posts'][0]['text'] # Print the text of the first post\n print output['posts'][0]['published'] # Print the text of the first post publication date\n \n # Get the next batch of posts\n output = webhoseio.get_next()\n print output['posts'][0]['thread']['site'] # Print the site of the first post\n \n\n```\n\nAPI Key\n-------\n\nTo make use of the webhose.io API, you need to obtain a token that would be\nused on every request. To obtain an API key, create an account at\nhttps://webhose.io/auth/signup, and then go into\nhttps://webhose.io/dashboard to see your token.\n\n\nInstalling\n----------\nYou can install from source:\n\n``` bash\n\n $ git clone https://github.com/Webhose/webhoseio-python\n $ cd webhoseio-python\n $ python setup.py install\n \n ```\n Or use pip install:\n \n ``` bash\n $ sudo pip install webhoseio\n ```\n \n Use the API\n-----------\n\nTo get started, you need to import the library, and set your access token.\n(Replace YOUR_API_KEY with your actual API key).\n\n```python\n\n >>> import webhoseio\n >>> webhoseio.config(token=YOUR_API_KEY) \n```\n\n**API Endpoints**\n\nThe first parameter the query() function accepts is the API endpoint string. Available endpoints:\n* filterWebData - access to the news/blogs/forums/reviews API\n* productSearch - access to data about eCommerce products/services\n* darkWebAPI - access to the dark web (coming soon)\n\nNow you can make a request and inspect the results:\n\n```python\n\n >>> output = webhoseio.query(\"filterWebData\", {\"q\":\"github\"})\n >>> output['totalResults']\n 15565094\n len(output['posts'])\n 100\n >>> output['posts'][0]['language']\n u'english'\n >>> output['posts'][0]['title']\n u'Putting quotes around dictionary keys in JS'\n```\n\n\nFor your convenience, the ouput object is iterable, so you can loop over it\nand get all the results of this batch (up to 100). \n\n```python\n\n >>> total_words = 0\n >>> for post in output['posts']:\n ... total_words += len(post['text'].split(\" \"))\n ...\n >>> print(total_words)\n 8822\n``` \nFull documentation\n------------------\n\n* ``config(token)``\n\n * token - your API key\n\n* ``query(end_point_str, params)``\n\n * end_point_str: \n * filterWebData - access to the news/blogs/forums/reviews API\n * productSearch - access to data about eCommerce products/services\n * darkWebAPI - access to the dark web (coming soon)\n * params: A key value dictionary. The most common key is the \"q\" parameter that hold the filters Boolean query. [Read about the available filters](https://webhose.io/documentation).\n\n* ``get_next()`` - a method to fetch the next page of results.\n \n \nPolling\n-------\n\nIf you want to make repeated searches, performing an action whenever there are\nnew results, use code like this:\n\n``` python\n\n r = webhoseio.query(\"filterWebData\", {\"q\":\"skyrim\"})\n while True:\n for post in r['posts']:\n perform_action(post)\n time.sleep(300)\n r = webhoseio.get_next()\n``` \n\n", "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/Webhose/webhoseio-python", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "webhoseio", "package_url": "https://pypi.org/project/webhoseio/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/webhoseio/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/Webhose/webhoseio-python" }, "release_url": "https://pypi.org/project/webhoseio/0.5/", "requires_dist": null, "requires_python": null, "summary": "Simple client library for the webhose.io REST API", "version": "0.5" }, "last_serial": 2740719, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "2c6dbf05fb680db593366d53f75a5742", "sha256": "ddc5f056e7a3da48391d42aaf80c0b1cc165b1ea42cc4e57e35fba6a548bdeb1" }, "downloads": -1, "filename": "webhoseio-0.1-py2-none-any.whl", "has_sig": false, "md5_digest": "2c6dbf05fb680db593366d53f75a5742", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 5121, "upload_time": "2017-02-16T12:44:00", "url": "https://files.pythonhosted.org/packages/77/23/9ef3c125e106400f7876cb08150a37430ea8ff434530148d92d5905923dd/webhoseio-0.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4974672b378eccad5f78c212983169ab", "sha256": "afea77e83cbf3b33be5fcb3ab21e5d716de6faf7aa034921b35347e59a217081" }, "downloads": -1, "filename": "webhoseio-0.1.tar.gz", "has_sig": false, "md5_digest": "4974672b378eccad5f78c212983169ab", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2795, "upload_time": "2017-02-16T12:43:58", "url": "https://files.pythonhosted.org/packages/3c/f9/d353e90536dd4de3bd3198bb2f8af3ebda33778697f150b1f4ae08282ef1/webhoseio-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "72f8bd4d5996c2f512b956fb07364969", "sha256": "1a4a36b9736b627b369d5c06d81e8e8009b79b65e78db1ecebc426fdad1f549b" }, "downloads": -1, "filename": "webhoseio-0.2-py2-none-any.whl", "has_sig": false, "md5_digest": "72f8bd4d5996c2f512b956fb07364969", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 5188, "upload_time": "2017-02-23T11:00:07", "url": "https://files.pythonhosted.org/packages/ed/9b/dc89e2c94dc638feda5bb1cb5d019449def6729728138d160ab2ef4fd0a8/webhoseio-0.2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7e508c2e3893d4fab295d55c055e6d35", "sha256": "73f3d4d03b8e50cfb456bf6ceca226b3dccf787cee341d9f307aed4a0b117286" }, "downloads": -1, "filename": "webhoseio-0.2.tar.gz", "has_sig": false, "md5_digest": "7e508c2e3893d4fab295d55c055e6d35", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2842, "upload_time": "2017-02-23T11:00:04", "url": "https://files.pythonhosted.org/packages/32/ad/4bb27086e4f72a64e66faadf6b92d400f20ae3f60df001cbd5af2a4031d9/webhoseio-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "ab1382beb4945b311b7820ef0fa01658", "sha256": "7a3cf16a452b7e88ad87fb29f829f0338b7e6bd0adc3de6a2e3bc584ce6e91ee" }, "downloads": -1, "filename": "webhoseio-0.3-py2-none-any.whl", "has_sig": false, "md5_digest": "ab1382beb4945b311b7820ef0fa01658", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 5167, "upload_time": "2017-02-23T16:17:29", "url": "https://files.pythonhosted.org/packages/6c/29/b0c239feffaa326b7d821b23277f5d69893cee123f86fa3d2cb89ed387f9/webhoseio-0.3-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "472add040aad40c14df6f570a1b7145d", "sha256": "15fef8a1f0a37742a1692e7816017ef16aa18c1d5668b19ca3b9e2bf7dce3826" }, "downloads": -1, "filename": "webhoseio-0.3.tar.gz", "has_sig": false, "md5_digest": "472add040aad40c14df6f570a1b7145d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2808, "upload_time": "2017-02-23T16:17:27", "url": "https://files.pythonhosted.org/packages/cb/5a/369c4dd0944ec98c05c732c357a665c5311063120cd58daec939a085b639/webhoseio-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "edfb893a4c2d90f7e3908de7d777c372", "sha256": "caae18bfd4929fef3aa853c724bd337d1362f26975f51f5081ff801fc6e9c168" }, "downloads": -1, "filename": "webhoseio-0.4.tar.gz", "has_sig": false, "md5_digest": "edfb893a4c2d90f7e3908de7d777c372", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2833, "upload_time": "2017-03-16T09:50:56", "url": "https://files.pythonhosted.org/packages/45/81/08d4fa003a2d39af6fdaa39ad1d06fbd4be7698991e8612bed4b683cb650/webhoseio-0.4.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "e1950229e0023bf8ff7d0c01864d2ad7", "sha256": "a5ec55b84e46dc02b4f332bbdef84e80c0585042ea22bc8eb5ae6f803773aefe" }, "downloads": -1, "filename": "webhoseio-0.5.tar.gz", "has_sig": false, "md5_digest": "e1950229e0023bf8ff7d0c01864d2ad7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3514, "upload_time": "2017-03-30T08:50:33", "url": "https://files.pythonhosted.org/packages/7e/e0/e10cb473ed0cd9e2fe14fa85d3c338f6aff2a77d34d8613393292bce4901/webhoseio-0.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e1950229e0023bf8ff7d0c01864d2ad7", "sha256": "a5ec55b84e46dc02b4f332bbdef84e80c0585042ea22bc8eb5ae6f803773aefe" }, "downloads": -1, "filename": "webhoseio-0.5.tar.gz", "has_sig": false, "md5_digest": "e1950229e0023bf8ff7d0c01864d2ad7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3514, "upload_time": "2017-03-30T08:50:33", "url": "https://files.pythonhosted.org/packages/7e/e0/e10cb473ed0cd9e2fe14fa85d3c338f6aff2a77d34d8613393292bce4901/webhoseio-0.5.tar.gz" } ] }