{ "info": { "author": "Alanexei", "author_email": "", "bugtrack_url": null, "classifiers": [], "description": "# OpenTDBpy\nAn API wrapper for interacting with the OpenTDB API.\n\n# Introduction\nIn order to being working with this API, you must create a client.\n```\nimport opentdbpy\n\nclient = opentdbpy.Client()\n```\n\n# Functionality\nThere are two main components when working with the client.\n```\nclient.get_categories()\nclient.get_category()\n```\nor\n```\nclient.get_questions()\n```\n\nWhen you make a call with `get_categories()`, the entries are cached for each time it is used.\nThe same applies when using `get_category()`.\n\n**Note**: The cache is cleared every hour.\n\nUsing `get_categories()` will return a list of `Category` objects.\nUsing `get_category()` can take 2 possible arguments. Which are the *id* and *name*.\nYou can pass either or, and even both. This will return a `Category` object containing useful information about the category. If there are no results, the return value will be *None*.\n\nWhen you wish to get questions from the api, use `get_questions()`.\n\nThere are four possible arguments you can pass. These include: *amount*, *category*, *type*, and *use_token*.\n\nBy default, using this function will not use your session token. Setting *use_token* to true will use it.\n\nThis will require you to either pass in a previous session token, or generate a new one with `get_token()`.\n\nThe *amount* takes an integer, which will return that number of questions.\nThe *category* takes either an integer or a string, you can pass in the category id or the name.\nThe *type* takes a string, which determines the question type.\n\n# Tokens\nIn OpenTDB, tokens are used to filter out questions you have already pulled.\n\nIf you wish to use a token, you can either manually create one and pass it into `Client`. Or, you can use `client.get_token()` to create a new one.\n\nIf your client has a session token and you wish to reset it's data, use `reset_token()`.\n\nIf you want to change your session token to a manual one on runtime, you can use `set_token()`. If you don't want to manually create a session token, run `get_token()` to pull a new one automatically.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/CobyPowers/OpenTDBpy", "keywords": "opentdb,api,trivia", "license": "", "maintainer": "", "maintainer_email": "", "name": "opentdbpy", "package_url": "https://pypi.org/project/opentdbpy/", "platform": "", "project_url": "https://pypi.org/project/opentdbpy/", "project_urls": { "Homepage": "https://github.com/CobyPowers/OpenTDBpy" }, "release_url": "https://pypi.org/project/opentdbpy/1.0.2/", "requires_dist": [ "requests", "requests-cache" ], "requires_python": "", "summary": "An API wrapper for interacting with the OpenTDB API.", "version": "1.0.2" }, "last_serial": 5762404, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "9433cc71b355fedf103b03d497916f7d", "sha256": "59d6fc8cd031395305b4d34e47732d16b98d82786005c4937113dc7f8b6a02fa" }, "downloads": -1, "filename": "opentdbpy-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "9433cc71b355fedf103b03d497916f7d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5915, "upload_time": "2019-08-24T17:34:52", "url": "https://files.pythonhosted.org/packages/6e/eb/4b45123d6a26871cdacd3fedb257a3df1ebae0e0d674ccdc27bd5ac6fad4/opentdbpy-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1762ea9a42d1cd8b470db27b47a75c2d", "sha256": "b196e073220e509471f95fbb69dbb8ff8a0dc671bf0ef6e2e1ce09dbeeb78918" }, "downloads": -1, "filename": "opentdbpy-1.0.0.tar.gz", "has_sig": false, "md5_digest": "1762ea9a42d1cd8b470db27b47a75c2d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4391, "upload_time": "2019-08-24T17:34:54", "url": "https://files.pythonhosted.org/packages/3d/9d/3d66d6dc59edcbd2096e1c7f8da3a42d21c951d24d7b2e9a12e259d7c538/opentdbpy-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "051a4c79963296b9e5c09da79212a32c", "sha256": "18d1ae7e74cd72f07eac9956e7d0bb4984bdc71e4ff6fe1af878086b3eb795c5" }, "downloads": -1, "filename": "opentdbpy-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "051a4c79963296b9e5c09da79212a32c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6219, "upload_time": "2019-08-24T19:07:58", "url": "https://files.pythonhosted.org/packages/0d/27/f0aa368c94e55506e2ccbad03750ec4392d01aac481e93e757841bf0485a/opentdbpy-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5de60be53ff42953f7ea5fbb4794fd29", "sha256": "9f0d8ce6a9462e8a41e5d4754c1348e7b518c264cd51af0dbbf2ad1f4db2965e" }, "downloads": -1, "filename": "opentdbpy-1.0.1.tar.gz", "has_sig": false, "md5_digest": "5de60be53ff42953f7ea5fbb4794fd29", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4698, "upload_time": "2019-08-24T19:07:59", "url": "https://files.pythonhosted.org/packages/14/d5/dda1bbbc0738f4066180bf6c57b0b92a8cc1540fafb947191c0a80bb9147/opentdbpy-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "474c348430d6daf68c52e5db663e0063", "sha256": "b64db2faa9444c890c0dd6b7803f524ca3a3a358bb555f763b61531dfbfb9fec" }, "downloads": -1, "filename": "opentdbpy-1.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "474c348430d6daf68c52e5db663e0063", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7059, "upload_time": "2019-08-30T21:57:09", "url": "https://files.pythonhosted.org/packages/0f/8a/e84de33fe7455b4f947be466e137a425db33287f5d209f43429901861f05/opentdbpy-1.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d939baf04961f0eb48d076dc120742cc", "sha256": "f4fb53b99082b1812a41e592fcc6b995b8bedd6e122d9ff63686c59646277c53" }, "downloads": -1, "filename": "opentdbpy-1.0.2.tar.gz", "has_sig": false, "md5_digest": "d939baf04961f0eb48d076dc120742cc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4743, "upload_time": "2019-08-30T21:57:10", "url": "https://files.pythonhosted.org/packages/e1/b4/178e34cc85c3f85116578a16096ace1277d84b6836f6e6da7c65a5dd4229/opentdbpy-1.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "474c348430d6daf68c52e5db663e0063", "sha256": "b64db2faa9444c890c0dd6b7803f524ca3a3a358bb555f763b61531dfbfb9fec" }, "downloads": -1, "filename": "opentdbpy-1.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "474c348430d6daf68c52e5db663e0063", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7059, "upload_time": "2019-08-30T21:57:09", "url": "https://files.pythonhosted.org/packages/0f/8a/e84de33fe7455b4f947be466e137a425db33287f5d209f43429901861f05/opentdbpy-1.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d939baf04961f0eb48d076dc120742cc", "sha256": "f4fb53b99082b1812a41e592fcc6b995b8bedd6e122d9ff63686c59646277c53" }, "downloads": -1, "filename": "opentdbpy-1.0.2.tar.gz", "has_sig": false, "md5_digest": "d939baf04961f0eb48d076dc120742cc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4743, "upload_time": "2019-08-30T21:57:10", "url": "https://files.pythonhosted.org/packages/e1/b4/178e34cc85c3f85116578a16096ace1277d84b6836f6e6da7c65a5dd4229/opentdbpy-1.0.2.tar.gz" } ] }