{ "info": { "author": "Matthew McManus", "author_email": "matt@rexmark.co", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "\n|header image|\n\n|build badge| |pypi badge| |MIT license|\n\nDonbest.py is an easy-to-use Python wrapper for the `Don Best Sports Data API. `_\n\nInstallation\n------------\n\nDonbest.py is available for download through the Python Package Index (PyPi). You can install it right away using pip or easy_install.\n\n.. code:: bash\n\n pip install donbest\n\nUsage\n-----\n\nTo get started, you're going to need to get your Don Best API token from the `token generator `_ on the Don Best website. Once you've got that, you're ready to go. In order to be able to generate a token you need to have an account with Don Best. You can get an account by contacting `Don Best `_. \n\n.. code:: pycon\n\n >>> import donbest\n >>> db = donbest.Donbest(api_token)\n\nOnce you've done this, you can now use the ``db`` object to make calls to the Don Best API. Here are some examples:\n\nGet Odds for Upcoming NBA games\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n.. code:: pycon\n\n >>> events = don.schedule_inplay()\n >>> nba_events = [event for event in events if event.league.name == \"NBA\"]\n >>> for event in nba_events:\n >>> print(event.get_live_odds())\n [, away_rot=507, home_rot=508, time=2018-05-23 15:20:21, period_id=1, period=FG, type=previous, sportsbook=347, ps=, money=, total=, team_total=, display_away=-1, display_home=219%BD, no_line=None>,\n ....]\n\nEvent Schedule\n~~~~~~~~~~~~~~\n\nIn-play schedule:\n\nReturns a list of the upcoming scheduled competitions and propositions for the next several days. Does not return competitions that have already been played prior to the current day.\n\n.. code:: pycon\n\n >>> schedule = db.schedule_inplay()\n >>> event = schedule[0]\n >>> event\n , participants=[, ], league=>, location=, live=True, event_state_id=10>\n\n # Available Event attributes:\n event.id\n event.season\n event.date\n event.opentime\n event.name\n event.event_type\n event.event_state\n event.time_changed\n event.neutral\n event.game_number\n event.group\n event.group.id\n event.group.name\n event.group.type\n event.group.type_id\n event.live\n\n ## See Team section to view what attributes are \n ## available on the items returned in the list of\n ## participants\n event.participants\n\n ## See League section for what attributes\n ## are available on League objects\n event.league\n\n ## See Location section for what attributes\n ## may be available on Location objects\n event.location\n\n # Available methods:\n event.get_live_odds()\n event.get_opening_odds()\n event.get_closing_odds()\n event.get_score()\n\n\nFull schedule:\n\nEither of the commands below return the full schedule of upcoming events including competitions and propositions months in the future.\n\n.. code:: pycon\n\n >>> db.schedule()\n >>> db.current_schedue()\n [,\n ,\n ........................]\n\nScores\n~~~~~~\n\nReturns a list containing the state of the live competition, current scores and period summary. Don Best ensures that their period scores are correct without using 3rd party providers which means that the scores are live and accurate.\n\nLive scores:\n\n.. code:: pycon\n\n >>> scores = db.score()\n >>> score = scores[0]\n , , ]>\n\n # Available Score attributes:\n ## The Score id is the id of the event it relates to...they are the same value\n score.id\n score.league_id\n score.away_rot\n score.home_rot\n score.away_score\n score.home_score\n score.description\n score.time\n score.period\n score.period_id\n score.away_score_ext\n score.home_score_ext\n\n for period in score.period_summary:\n period.name\n period.description\n period.time_changed\n period.id\n for score in period.scores:\n score[\"rot\"]\n score[\"value\"]\n\nLines\n~~~~~\n\nReturns a list of opening odds, live odds, and closing odds for competitions and propositions by league. *League id is a required parameter for all of the Lines endpoints*\n\nOpening Odds (NBA):\n\n.. code:: pycon\n\n >>> nba_lines = db.open(league_id=3)\n >>> line = nba_lines[0]\n , away_rot=505, home_rot=506, time=2018-05-22 21:11:47+00:00, period_id=1, period=FG, type=previous, sportsbook=347, ps=, money=, total=, team_total=, display_away=226%BD, display_home=-8%BD>\n\n # Available Line attributes:\n line.event\n line.away_rot\n line.home_rot\n line.time\n line.period_id\n line.period\n line.type\n line.sportsbook\n line.no_line\n line.display_home\n line.display_away\n line.ps\n line.ps.away_spread\n line.ps.home_spread\n line.ps.away_price\n line.ps.home_price\n line.money\n line.money.away_money\n line.money.home_money\n line.money.draw_money\n line.total\n line.total.total\n line.total.over_price\n line.total.under_price\n line.team_total\n line.team_total.away_total\n line.team_total.away_over_price\n line.team_total.away_under_price\n line.team_total.home_total\n line.team_total.home_over_price\n line.team_total.home_under_price\n\nLive Odds and Closing Odds (NBA):\n\n.. code:: pycon\n\n >>> db.odds(league_id=3)\n >>> db.close(league_id=3)\n\nTeams\n~~~~~~~~~~~~~\n\nReturns a list of Teams covered by Don Best Sports */v2/team*\n\n.. code:: pycon\n\n >>> teams = db.team()\n >>> team = teams[0]\n >, rotation=None, side=None>>\n\n # Available Team attributes:\n team.id\n team.name\n team.abbreviation\n team.full_name\n team.information\n team.league\n team.rotation\n team.side\n\nLeagues\n~~~~~~~~~~~~~\n\nReturns a list of Leagues covered by Don Best Sports */v2/league*\n\n.. code:: pycon\n\n >>> leagues = db.league()\n >>> league = leagues[0]\n \n\n # Available League attributes\n league.id\n league.name\n league.abbreviation\n league.information\n league.sport\n\nSportsbooks\n~~~~~~~~~~~~~\n\nReturns a list of Sports Books covered by Don Best Sports */v2/sportsbook*\n\n.. code:: pycon\n\n >>> sportsbooks = db.sportsbook()\n >>> sportsbook = sportsbooks[0]\n \n\n # Available Sportsbook attributes:\n sportsbook.id\n sportsbook.name\n sportsbook.abbreviation\n\nSports\n~~~~~~~~~~~~~\n\nReturns a list of Sports covered by Don Best Sports */v2/sport*\n\n.. code:: pycon\n\n >>> sports = db.sport()\n >>> sport = sports[1]\n \n\n # Available Sports attributes:\n sport.id\n sport.name\n sport.abbreviation\n sport.information\n\nLocations\n~~~~~~~~~~~~~\n\nReturns a list of Stadium and Arenas for all competitions in the schedule feed. */v2/location*\n\n.. code:: pycon\n\n >>> locations = db.location()\n >>> location = locations[0]\n >\n\n # Available Location attributes:\n location.id\n location.name\n location.description\n location.abbreviation\n location.stadium_type\n location.surface_type\n location.seating_capacity\n location.elevation\n location.city\n location.city.id\n location.city.name\n location.city.country\n location.city.postalCode\n location.city.state\n\nMiscellaneous\n~~~~~~~~~~~~~\n\nBy default, donbest.py will return parsed python objects. If you\u2019d like the raw XML response for a request, just pass in ``parse_response=False``.\n\n.. code:: pycon\n\n >>> response = db.schedule_inplay(parse_response=False)\n >>> response\n b'\\nschedule_inplay2018-05-22T13:16:32+0....\n\nIn most cases, the values of the object attributes are returned as the type you would expect (e.g. dates are returned as native python datetime objects). The main scenario in which this differs is for the unique 'id' of each object. All unique ids are returned as strings. Here is the quote from the Don Best API documentation that suggests this approach.\n\n Note: The Don Best Sports API exposes identifiers for uniquely identifiable objects such as Events, Teams and Sports\n Books. These IDs should always be treated as opaque strings, rather than integers of any specific type. The format of\n the IDs can change over time, so relying on the current format may cause you problems in the future\n\nDonbest.py maps 1-1 to the Don Best Sports API (e.g., db.one.two.three() will\nsend a request to \u201chttp://xml.donbest.com/v2/one/two/three\u201d). However, the library does not currently support the *event_state* or *market_list* endpoint. It also does not support the Don Best Streaming Message API since that requires your IP to be whitelisted, which makes it harder to test.\n\nFor more information on all methods and usage, please read the `Don Best Sports API documentation. `_\n\n\nLicense |MIT License|\n----------------------\n\nMIT License. See `LICENSE `__ for details.\n\nTODO\n-----------------\n* Add support for the `/v2/event_state/` endpoint\n* Add support for the Streaming API\n* Add option to have all objects return as properly formatted nested dictionaries\n\n.. |header image| image:: https://s3.amazonaws.com/random-images-for-github/donbest.png\n.. |MIT license| image:: https://img.shields.io/badge/License-MIT-yellow.svg\n :target: https://opensource.org/licenses/MIT\n.. |build badge| image:: https://travis-ci.org/mamcmanus/donbest.py.svg?branch=master\n :target: https://travis-ci.org/mamcmanus/donbest.py\n.. |pypi badge| image:: https://img.shields.io/pypi/v/donbest.svg \n :target: https://pypi.org/project/donbest/\n\n\n", "description_content_type": "text/x-rst", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/mamcmanus/donbest.py", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "donbest", "package_url": "https://pypi.org/project/donbest/", "platform": "", "project_url": "https://pypi.org/project/donbest/", "project_urls": { "Homepage": "https://github.com/mamcmanus/donbest.py" }, "release_url": "https://pypi.org/project/donbest/1.0.2/", "requires_dist": [ "requests" ], "requires_python": ">=3", "summary": "An easy-to-use python wrapper for the Don Best Sports API", "version": "1.0.2" }, "last_serial": 3951280, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "184d7311a691d5f4fb85a14299a45864", "sha256": "3c6d47cea2ce3c4761d562c1a4389820836bde7702d55322a77673eab314ad14" }, "downloads": -1, "filename": "donbest-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "184d7311a691d5f4fb85a14299a45864", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 10850, "upload_time": "2018-05-23T02:28:47", "url": "https://files.pythonhosted.org/packages/c0/4d/607801e5d76a747ef3a4b625b28adcfe9b34b3bea342337e2acca77f48bb/donbest-0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "71eb12a4bcfa577b1f1d985bce68eab2", "sha256": "c1d890586bd898f3734c640547967eb77c9f4c094285bc3a2c7bd2969dd98d42" }, "downloads": -1, "filename": "donbest-0.1.tar.gz", "has_sig": false, "md5_digest": "71eb12a4bcfa577b1f1d985bce68eab2", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 14134, "upload_time": "2018-05-23T02:28:48", "url": "https://files.pythonhosted.org/packages/b1/b5/3b7b5a768398482b8af426bb2c12786b3bd13460b0f62d4a0aa66e905b6f/donbest-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "9c55cdd3d64bb213443dcfe6d55a144c", "sha256": "bdb0bcf49de2c1d0beb398b6051c7fbdfe87b0cb4d37fa5f42f6b3f0072e003d" }, "downloads": -1, "filename": "donbest-0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "9c55cdd3d64bb213443dcfe6d55a144c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 11140, "upload_time": "2018-05-23T18:12:37", "url": "https://files.pythonhosted.org/packages/d1/8a/45731b41a3c4a8cb4c9341252ea7c76968836a1442e7c750c6d02229cc60/donbest-0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0b768f4876f0561785893906995db2ba", "sha256": "0b18feedaee7e236b465173dd0431eee30880c04a133a09c8c70ec09f7e2d5f0" }, "downloads": -1, "filename": "donbest-0.2.tar.gz", "has_sig": false, "md5_digest": "0b768f4876f0561785893906995db2ba", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 14737, "upload_time": "2018-05-23T18:12:38", "url": "https://files.pythonhosted.org/packages/37/b2/062704d48b8a756d5d7b76579945a8a86385bbae097d8aa3167d713750f3/donbest-0.2.tar.gz" } ], "1.0": [ { "comment_text": "", "digests": { "md5": "528d9b47d87c8c6805494ad6ee41456c", "sha256": "01355e675efe047e279b4434254e3fd8d17042d630d46ca5a2fd6f684df5226d" }, "downloads": -1, "filename": "donbest-1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "528d9b47d87c8c6805494ad6ee41456c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 11130, "upload_time": "2018-05-25T17:39:36", "url": "https://files.pythonhosted.org/packages/f8/39/95128c818ecee7d64c53e990b07f9934b73ebdfb0f4475bd85eb3ca3879e/donbest-1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c2cc6282702704744eddb24d64377402", "sha256": "e556ca0cbbbd3a5857fb739cacf42b8f98894e7d289687198e2aea015912ac3e" }, "downloads": -1, "filename": "donbest-1.0.tar.gz", "has_sig": false, "md5_digest": "c2cc6282702704744eddb24d64377402", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 14707, "upload_time": "2018-05-25T17:39:38", "url": "https://files.pythonhosted.org/packages/42/ef/aa0dc77f455b873423ec508dc7b60936b08f48270ac1a5e1a4d59c595d08/donbest-1.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "ab1aea2085c91b158b5b5c7c744e966e", "sha256": "9cc8e581a4e65c35c09fbb136c288d61b03b0aa24ab51592dea845b74c726eea" }, "downloads": -1, "filename": "donbest-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "ab1aea2085c91b158b5b5c7c744e966e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 11172, "upload_time": "2018-06-04T13:26:44", "url": "https://files.pythonhosted.org/packages/ff/97/7f1f203962c9357ee6bd3c9f76411b5bcad61d140a0c645934d66a5f0978/donbest-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b21ea43bddf43a1d54e337479b58af22", "sha256": "c96fe2f8c2ece8a46f6b4a267c981e0317b031b60720cb9d494868620fa909b2" }, "downloads": -1, "filename": "donbest-1.0.1.tar.gz", "has_sig": false, "md5_digest": "b21ea43bddf43a1d54e337479b58af22", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 14735, "upload_time": "2018-06-04T13:26:45", "url": "https://files.pythonhosted.org/packages/94/8b/0623922b2d659685ab80d31ddd03b1b10c51dc71d1becd990939a66971e5/donbest-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "b4e4be0feb1e1696f74db39b10d662a9", "sha256": "f8e3ca80b1e1b04f816c44cb7368fd9bd1722a28ddfbf929c61c341fa741e2e5" }, "downloads": -1, "filename": "donbest-1.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "b4e4be0feb1e1696f74db39b10d662a9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 11158, "upload_time": "2018-06-11T18:12:23", "url": "https://files.pythonhosted.org/packages/f7/05/d55a4c73335514397de09ce5d9401f382ab6cbbbf81bbad2053783e4c964/donbest-1.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "edcc30ab095ea6f7d0012fb263067c60", "sha256": "32d58041e0ac2d4a14416c3e35adab0268970a26d607d5dc1b4cf7350320caa7" }, "downloads": -1, "filename": "donbest-1.0.2.tar.gz", "has_sig": false, "md5_digest": "edcc30ab095ea6f7d0012fb263067c60", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 14726, "upload_time": "2018-06-11T18:12:24", "url": "https://files.pythonhosted.org/packages/48/c7/5846e1b0fe8f3a4080daa5f34846327f7d4f55994c15cc9004c134dd775c/donbest-1.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b4e4be0feb1e1696f74db39b10d662a9", "sha256": "f8e3ca80b1e1b04f816c44cb7368fd9bd1722a28ddfbf929c61c341fa741e2e5" }, "downloads": -1, "filename": "donbest-1.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "b4e4be0feb1e1696f74db39b10d662a9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 11158, "upload_time": "2018-06-11T18:12:23", "url": "https://files.pythonhosted.org/packages/f7/05/d55a4c73335514397de09ce5d9401f382ab6cbbbf81bbad2053783e4c964/donbest-1.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "edcc30ab095ea6f7d0012fb263067c60", "sha256": "32d58041e0ac2d4a14416c3e35adab0268970a26d607d5dc1b4cf7350320caa7" }, "downloads": -1, "filename": "donbest-1.0.2.tar.gz", "has_sig": false, "md5_digest": "edcc30ab095ea6f7d0012fb263067c60", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 14726, "upload_time": "2018-06-11T18:12:24", "url": "https://files.pythonhosted.org/packages/48/c7/5846e1b0fe8f3a4080daa5f34846327f7d4f55994c15cc9004c134dd775c/donbest-1.0.2.tar.gz" } ] }