{ "info": { "author": "Vaibhav Yenamandra", "author_email": "vaibhav-y@users.noreply.github.com", "bugtrack_url": null, "classifiers": [], "description": "`PY-STRAWPOLL `__\n============================================================\n\nPython wrapper for `Strawpoll's\nAPI `__. Provides\nmethods for reading from and writing to strawpoll via its JSON api.\n\nAbout\n-----\n\npy-strawpoll provides the following:\n\n``StrawpollAPIReader`` class containing methods:\n\n- ``from_json(string)``: Read a strawpoll into memory from its JSON\n representation\n- ``from_url(url)``: Read a strawpoll into memory from it's URL (uses\n API endpoint to fetch)\n- ``from_apiv2(poll_id)``: Read a strawpoll into memory via it's poll\n id (uses API endpoint to fetch)\n- ``total_votes()``\n- ``normalize()``: Normalize a poll to the [0, 1] range\n- ``votes_for(option_string)``: Get the raw count of votes for a\n specific option string\n- ``normalized_votes_for(option_string)``: Get the normalized votes for\n a specific option string\n- ``winner()``: Who won the poll?\n- ``loser()``: Least favoured option\n- ``to_clean_dict()``: Returns a python dictionary representation of\n the poll. Ignores any atributes that are null\n\nUsage\n-----\n\nInstallation\n~~~~~~~~~~~~\n\n- TODO: Create a PyPI package\n\nFetching a strawpoll\n~~~~~~~~~~~~~~~~~~~~\n\n.. code:: python\n\n from strawpoll import StrawpollAPIReader\n\n json_string = '{\n \"title\":\"What movie should we watch again?\",\n \"options\": [\n \"Sucker punch \",\n \"Pirates of carribian \",\n \"Prison logic\",\"Witchhunter\"\n ],\n \"multi\":false,\n \"permissive\": false,\n \"captcha\": true\n }'\n\n # Fetch a poll through its API id\n poll_a = StrawpollAPIReader.from_apiv2(1)\n\n # Fetch a poll through its URL\n poll_b = StrawpollAPIReader.from_url(\"https://strawpoll.me/1\")\n\n # Fetch a poll from its JSON dump\n poll_c = StrawpollAPIReader.from_json(json_string)\n\n # These should be the same\n if (poll_a == poll_b) and (poll_b == poll_c):\n print \"Mirror images!\"\n\n # Yada yada normalize your data\n print poll_a.normalize()\n\nPosting a strawpoll\n~~~~~~~~~~~~~~~~~~~\n\n- TODO: APIWriter still in the pipes\n\nChangelog\n---------\n\n`CHANGES.txt <./CHANGES.txt>`__", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://pypi.python.org/pypi/PyStrawpoll/", "keywords": null, "license": "LICENSE.txt", "maintainer": null, "maintainer_email": null, "name": "PyStrawpoll", "package_url": "https://pypi.org/project/PyStrawpoll/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/PyStrawpoll/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://pypi.python.org/pypi/PyStrawpoll/" }, "release_url": "https://pypi.org/project/PyStrawpoll/0.1.4/", "requires_dist": null, "requires_python": null, "summary": "Python API wrapper for strawpoll (https://github.com/vaibhav-y/py-strawpoll)", "version": "0.1.4" }, "last_serial": 1710135, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "7c32cb1abf32cab75381b272add1fb49", "sha256": "a150dae519537b12fc17940b8742ebfc5f515df6a3f6ec6c40f6a9db4e387bb7" }, "downloads": -1, "filename": "PyStrawpoll-0.1.0.zip", "has_sig": false, "md5_digest": "7c32cb1abf32cab75381b272add1fb49", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5493, "upload_time": "2015-09-06T06:01:38", "url": "https://files.pythonhosted.org/packages/b4/57/9387f3552faea65d2a558cdf7b29bf4e3a131a65ebc4718d1935f1724141/PyStrawpoll-0.1.0.zip" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "8ca98fceb0aa4fff0ddf59db01e739d7", "sha256": "aadce8278584dd51ad7fc98d4ea43184f2e94fed711a1fc177de3ee263bfddab" }, "downloads": -1, "filename": "PyStrawpoll-0.1.1.zip", "has_sig": false, "md5_digest": "8ca98fceb0aa4fff0ddf59db01e739d7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6646, "upload_time": "2015-09-06T06:22:36", "url": "https://files.pythonhosted.org/packages/bc/99/43fa42682e450e9a69671074c538a199d640bda4cd25c75a722660fa6eb2/PyStrawpoll-0.1.1.zip" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "f2863ee06a793b2926b08259dc1e97c8", "sha256": "66e2329d2046c30b1f2cf4bdd6df98683f6e6766879c1ba2a2a13317f0aa2d7b" }, "downloads": -1, "filename": "PyStrawpoll-0.1.2.zip", "has_sig": false, "md5_digest": "f2863ee06a793b2926b08259dc1e97c8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6687, "upload_time": "2015-09-06T06:26:20", "url": "https://files.pythonhosted.org/packages/54/9a/fba38fc0605d3286a824832ebfcf94fd6be1862a47dc6682ee40ca676fd1/PyStrawpoll-0.1.2.zip" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "90f61c94fd1545c666a4efa08b75e871", "sha256": "2751e0989976d785699c71d26358ff7da527a68ee5646d350b8ff95dc3e7ad31" }, "downloads": -1, "filename": "PyStrawpoll-0.1.3.zip", "has_sig": false, "md5_digest": "90f61c94fd1545c666a4efa08b75e871", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6705, "upload_time": "2015-09-06T06:28:00", "url": "https://files.pythonhosted.org/packages/6f/16/0e041bd055cfaf1f4ee4dfda8b63dd42ef32dcc729aca24c7366635cd3c0/PyStrawpoll-0.1.3.zip" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "002599cf1531057dddbe66c731a52810", "sha256": "95b4efb83aa6bef788f03deda84ca77ac89dd7791c26a66dd8f9993883a39748" }, "downloads": -1, "filename": "PyStrawpoll-0.1.4.zip", "has_sig": false, "md5_digest": "002599cf1531057dddbe66c731a52810", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6623, "upload_time": "2015-09-06T09:24:08", "url": "https://files.pythonhosted.org/packages/87/29/4d756deedb95227963317ac4252398c40016936efb804d66ee69751d850a/PyStrawpoll-0.1.4.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "002599cf1531057dddbe66c731a52810", "sha256": "95b4efb83aa6bef788f03deda84ca77ac89dd7791c26a66dd8f9993883a39748" }, "downloads": -1, "filename": "PyStrawpoll-0.1.4.zip", "has_sig": false, "md5_digest": "002599cf1531057dddbe66c731a52810", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6623, "upload_time": "2015-09-06T09:24:08", "url": "https://files.pythonhosted.org/packages/87/29/4d756deedb95227963317ac4252398c40016936efb804d66ee69751d850a/PyStrawpoll-0.1.4.zip" } ] }