NaijaBet-Api


NameNaijaBet-Api JSON
Version 0.2.17 PyPI version JSON
download
home_pagehttps://github.com/jayteealao/Naijabet_Api
SummaryA wrapper around the API of Nigerias major betting sites
upload_time2023-11-20 09:48:41
maintainer
docs_urlNone
authorgraphitenerd
requires_python
license
keywords
VCS
bugtrack_url
requirements aiohttp arrow async-timeout build certifi chardet charset-normalizer idna jmespath multidict pep517 python-dateutil requests six tomli urllib3 yarl
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # NaijaBet-Api

[![publish-pypi](https://github.com/jayteealao/NaijaBet_Api/actions/workflows/py-build.yml/badge.svg?branch=release)](https://github.com/jayteealao/NaijaBet_Api/actions/workflows/py-build.yml)

A python library that provides access to the odds data of Nigeria's major betting sites.

It provides access to Bet9ja, Betking and Nairabet's 1X2 and doublechance soccer odds.

## Basic Usage

Import the requested bookmaker:

```python
from NaijaBet_Api.bookmakers import bet9ja, betking, nairabet
```

Access specific bookmaker

```python
from NaijaBet_Api.bookmakers import bet9ja

b9 = bet9ja.Bet9ja()
```

Obtain League data:  
*note: in order to access a specific league you need to provide the league as an argument via the **Betid Enum Class***

```python
from NaijaBet_Api.bookmakers import bet9ja
from NaijaBet_Api.id import Betid

b9 = bet9ja.Bet9ja()
b9.get_league(Betid.PREMIERLEAGUE)
```

Obtain all league data:

```python
from NaijaBet_Api.bookmakers import bet9ja
from NaijaBet_Api.id import Betid

b9 = bet9ja.Bet9ja()
b9.get_all()
```

The get_all and get_league methods return a list of dicts  
example:

```json
[{'away': 1.92,
  'draw': 3.75,
  'draw_or_away': 1.28,
  'home': 4.0,
  'home_or_away': 1.3,
  'home_or_draw': 1.89,
  'league': 'Premier League',
  'league_id': 135975,
  'match': 'Brentford FC - Arsenal FC',
  'match_id': 4467373,
  'time': 1628881200000},
 {'away': 5.6,
  'draw': 4.8,
  'draw_or_away': 2.47,
  'home': 1.54,
  'home_or_away': 1.21,
  'home_or_draw': 1.18,
  'league': 'Premier League',
  'league_id': 135975,
  'match': 'Manchester United FC - Leeds United',
  'match_id': 4467299,
  'time': 1628940600000},]
```

## TODO

- [ ] Add Sportybet
- [ ] Add all soccer leagues
- [ ] Add access to available bookmaker odds for specific matches

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/jayteealao/Naijabet_Api",
    "name": "NaijaBet-Api",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "graphitenerd",
    "author_email": "jayteealao@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/92/d9/246563a666e73af50552043abc6e2bc53cf8ec609fe4e6a78bca3fea5621/NaijaBet_Api-0.2.17.tar.gz",
    "platform": null,
    "description": "# NaijaBet-Api\n\n[![publish-pypi](https://github.com/jayteealao/NaijaBet_Api/actions/workflows/py-build.yml/badge.svg?branch=release)](https://github.com/jayteealao/NaijaBet_Api/actions/workflows/py-build.yml)\n\nA python library that provides access to the odds data of Nigeria's major betting sites.\n\nIt provides access to Bet9ja, Betking and Nairabet's 1X2 and doublechance soccer odds.\n\n## Basic Usage\n\nImport the requested bookmaker:\n\n```python\nfrom NaijaBet_Api.bookmakers import bet9ja, betking, nairabet\n```\n\nAccess specific bookmaker\n\n```python\nfrom NaijaBet_Api.bookmakers import bet9ja\n\nb9 = bet9ja.Bet9ja()\n```\n\nObtain League data:  \n*note: in order to access a specific league you need to provide the league as an argument via the **Betid Enum Class***\n\n```python\nfrom NaijaBet_Api.bookmakers import bet9ja\nfrom NaijaBet_Api.id import Betid\n\nb9 = bet9ja.Bet9ja()\nb9.get_league(Betid.PREMIERLEAGUE)\n```\n\nObtain all league data:\n\n```python\nfrom NaijaBet_Api.bookmakers import bet9ja\nfrom NaijaBet_Api.id import Betid\n\nb9 = bet9ja.Bet9ja()\nb9.get_all()\n```\n\nThe get_all and get_league methods return a list of dicts  \nexample:\n\n```json\n[{'away': 1.92,\n  'draw': 3.75,\n  'draw_or_away': 1.28,\n  'home': 4.0,\n  'home_or_away': 1.3,\n  'home_or_draw': 1.89,\n  'league': 'Premier League',\n  'league_id': 135975,\n  'match': 'Brentford FC - Arsenal FC',\n  'match_id': 4467373,\n  'time': 1628881200000},\n {'away': 5.6,\n  'draw': 4.8,\n  'draw_or_away': 2.47,\n  'home': 1.54,\n  'home_or_away': 1.21,\n  'home_or_draw': 1.18,\n  'league': 'Premier League',\n  'league_id': 135975,\n  'match': 'Manchester United FC - Leeds United',\n  'match_id': 4467299,\n  'time': 1628940600000},]\n```\n\n## TODO\n\n- [ ] Add Sportybet\n- [ ] Add all soccer leagues\n- [ ] Add access to available bookmaker odds for specific matches\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A wrapper around the API of Nigerias major betting sites",
    "version": "0.2.17",
    "project_urls": {
        "Bug Tracker": "https://github.com/jayteealao/Naijabet_Api/issues",
        "Homepage": "https://github.com/jayteealao/Naijabet_Api"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6f4977850e9fef75ae49b94a39a610849d89dd6d01cb6569257a37ce6382af38",
                "md5": "8bcddfb4930d3eef5ef2a86dc366b2c9",
                "sha256": "c4681cd196c32ec78384529a6fb80108bcf72688a3c35ce9b1d4a48f0d080e37"
            },
            "downloads": -1,
            "filename": "NaijaBet_Api-0.2.17-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8bcddfb4930d3eef5ef2a86dc366b2c9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 23330,
            "upload_time": "2023-11-20T09:48:40",
            "upload_time_iso_8601": "2023-11-20T09:48:40.309329Z",
            "url": "https://files.pythonhosted.org/packages/6f/49/77850e9fef75ae49b94a39a610849d89dd6d01cb6569257a37ce6382af38/NaijaBet_Api-0.2.17-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "92d9246563a666e73af50552043abc6e2bc53cf8ec609fe4e6a78bca3fea5621",
                "md5": "9365538f9cdd760d868573758d926294",
                "sha256": "68eca2c19103c40caa96b2991dd16554d4627082a3b28d5e8bada4dd900422f7"
            },
            "downloads": -1,
            "filename": "NaijaBet_Api-0.2.17.tar.gz",
            "has_sig": false,
            "md5_digest": "9365538f9cdd760d868573758d926294",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 15585,
            "upload_time": "2023-11-20T09:48:41",
            "upload_time_iso_8601": "2023-11-20T09:48:41.844145Z",
            "url": "https://files.pythonhosted.org/packages/92/d9/246563a666e73af50552043abc6e2bc53cf8ec609fe4e6a78bca3fea5621/NaijaBet_Api-0.2.17.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-20 09:48:41",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jayteealao",
    "github_project": "Naijabet_Api",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "aiohttp",
            "specs": [
                [
                    "==",
                    "3.7.4.post0"
                ]
            ]
        },
        {
            "name": "arrow",
            "specs": [
                [
                    "==",
                    "1.1.1"
                ]
            ]
        },
        {
            "name": "async-timeout",
            "specs": [
                [
                    "==",
                    "3.0.1"
                ]
            ]
        },
        {
            "name": "build",
            "specs": [
                [
                    "==",
                    "0.6.0.post1"
                ]
            ]
        },
        {
            "name": "certifi",
            "specs": [
                [
                    "==",
                    "2021.5.30"
                ]
            ]
        },
        {
            "name": "chardet",
            "specs": [
                [
                    "==",
                    "4.0.0"
                ]
            ]
        },
        {
            "name": "charset-normalizer",
            "specs": [
                [
                    "==",
                    "2.0.4"
                ]
            ]
        },
        {
            "name": "idna",
            "specs": [
                [
                    "==",
                    "3.2"
                ]
            ]
        },
        {
            "name": "jmespath",
            "specs": [
                [
                    "==",
                    "0.10.0"
                ]
            ]
        },
        {
            "name": "multidict",
            "specs": [
                [
                    "==",
                    "5.1.0"
                ]
            ]
        },
        {
            "name": "pep517",
            "specs": [
                [
                    "==",
                    "0.11.0"
                ]
            ]
        },
        {
            "name": "python-dateutil",
            "specs": [
                [
                    "==",
                    "2.8.2"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": [
                [
                    "==",
                    "2.26.0"
                ]
            ]
        },
        {
            "name": "six",
            "specs": [
                [
                    "==",
                    "1.16.0"
                ]
            ]
        },
        {
            "name": "tomli",
            "specs": [
                [
                    "==",
                    "1.2.1"
                ]
            ]
        },
        {
            "name": "urllib3",
            "specs": [
                [
                    "==",
                    "1.26.6"
                ]
            ]
        },
        {
            "name": "yarl",
            "specs": [
                [
                    "==",
                    "1.6.3"
                ]
            ]
        }
    ],
    "lcname": "naijabet-api"
}
        
Elapsed time: 0.29840s