pylonparser


Namepylonparser JSON
Version 0.5.1 PyPI version JSON
download
home_pagehttps://github.com/traxxo/pylonparser
SummaryA tool to parse football game stats.
upload_time2024-06-04 18:21:01
maintainerNone
docs_urlNone
authorYour Name
requires_python<4.0,>=3.10
licenseMIT
keywords parser football stats nfl pro-football-by-reference
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # PylonParser

This package is used to obtain Pro Football Reference and Basketball Reference using web scraping tables, for example to perform data analysis or data science. All rights belong to the respective sites and the package should not be used to load their servers. Please read the corresponding specifications in their robots.txt files.

## Installation

```sh
pip install pylonparser
```

Usage
Provide instructions on how to use your project. Include code examples if possible.
```sh
url = "https://www.basketball-reference.com/boxscores/202405220MIN.html"

basketball_match = BasketballMatch(url)
df = pd.DataFrame(basketball_match.basic_away)
print(df.head())

❯
          id             player     mp    fg   fga  fg_pct  fg3  fg3a  fg3_pct   ft  fta  ft_pct  orb  drb  trb  ast  stl  blk  tov   pf   pts plus_minus reason
0  washipj01    P.J. Washington  40:50   4.0  10.0   0.400  2.0   8.0     0.25  3.0  3.0   1.000  0.0  7.0  7.0  0.0  0.0  2.0  3.0  4.0  13.0        +12    NaN
1  doncilu01        Luka Dončić  40:45  12.0  26.0   0.462  3.0  10.0     0.30  6.0  7.0   0.857  0.0  6.0  6.0  8.0  3.0  1.0  4.0  2.0  33.0         -9    NaN
2  irvinky01       Kyrie Irving  40:09  12.0  23.0   0.522  0.0   3.0     0.00  6.0  6.0   1.000  1.0  4.0  5.0  4.0  0.0  1.0  2.0  3.0  30.0         +5    NaN
3  jonesde02  Derrick Jones Jr.  34:55   4.0   9.0   0.444  0.0   2.0     0.00  0.0  0.0   0.000  2.0  2.0  4.0  2.0  0.0  0.0  0.0  1.0   8.0         -8    NaN
4  gaffoda01     Daniel Gafford  21:07   5.0   9.0   0.556  0.0   0.0     0.00  0.0  0.0   0.000  4.0  5.0  9.0  0.0  0.0  1.0  2.0  2.0  10.0        -15    NaN

```
Testing
This project uses pytest for testing. To run the tests, use:

Contributing
Contributions are welcome! Please read the contributing guidelines first.

License
This project is licensed under the MIT License. See the LICENSE file for details.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/traxxo/pylonparser",
    "name": "pylonparser",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.10",
    "maintainer_email": null,
    "keywords": "parser, football, stats, nfl, pro-football-by-reference",
    "author": "Your Name",
    "author_email": "your.email@example.com",
    "download_url": "https://files.pythonhosted.org/packages/19/f3/354d8a5b8f2acd74370da899f53f30e1380abd5fce391d52548069a94a88/pylonparser-0.5.1.tar.gz",
    "platform": null,
    "description": "# PylonParser\n\nThis package is used to obtain Pro Football Reference and Basketball Reference using web scraping tables, for example to perform data analysis or data science. All rights belong to the respective sites and the package should not be used to load their servers. Please read the corresponding specifications in their robots.txt files.\n\n## Installation\n\n```sh\npip install pylonparser\n```\n\nUsage\nProvide instructions on how to use your project. Include code examples if possible.\n```sh\nurl = \"https://www.basketball-reference.com/boxscores/202405220MIN.html\"\n\nbasketball_match = BasketballMatch(url)\ndf = pd.DataFrame(basketball_match.basic_away)\nprint(df.head())\n\n\u276f\n          id             player     mp    fg   fga  fg_pct  fg3  fg3a  fg3_pct   ft  fta  ft_pct  orb  drb  trb  ast  stl  blk  tov   pf   pts plus_minus reason\n0  washipj01    P.J. Washington  40:50   4.0  10.0   0.400  2.0   8.0     0.25  3.0  3.0   1.000  0.0  7.0  7.0  0.0  0.0  2.0  3.0  4.0  13.0        +12    NaN\n1  doncilu01        Luka Don\u010di\u0107  40:45  12.0  26.0   0.462  3.0  10.0     0.30  6.0  7.0   0.857  0.0  6.0  6.0  8.0  3.0  1.0  4.0  2.0  33.0         -9    NaN\n2  irvinky01       Kyrie Irving  40:09  12.0  23.0   0.522  0.0   3.0     0.00  6.0  6.0   1.000  1.0  4.0  5.0  4.0  0.0  1.0  2.0  3.0  30.0         +5    NaN\n3  jonesde02  Derrick Jones Jr.  34:55   4.0   9.0   0.444  0.0   2.0     0.00  0.0  0.0   0.000  2.0  2.0  4.0  2.0  0.0  0.0  0.0  1.0   8.0         -8    NaN\n4  gaffoda01     Daniel Gafford  21:07   5.0   9.0   0.556  0.0   0.0     0.00  0.0  0.0   0.000  4.0  5.0  9.0  0.0  0.0  1.0  2.0  2.0  10.0        -15    NaN\n\n```\nTesting\nThis project uses pytest for testing. To run the tests, use:\n\nContributing\nContributions are welcome! Please read the contributing guidelines first.\n\nLicense\nThis project is licensed under the MIT License. See the LICENSE file for details.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A tool to parse football game stats.",
    "version": "0.5.1",
    "project_urls": {
        "Documentation": "https://github.com/traxxo/pylonparser/wiki",
        "Homepage": "https://github.com/traxxo/pylonparser",
        "Repository": "https://github.com/traxxo/pylonparser"
    },
    "split_keywords": [
        "parser",
        " football",
        " stats",
        " nfl",
        " pro-football-by-reference"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "201ca79bdc50f914219b0226c16c122d5cc8c70f32fd2f6884d038ace6057e50",
                "md5": "c6bb1f1d4dc183ee727fcce22abcecc4",
                "sha256": "d7610393d1ce142ea0d229053bfa92179a4bfd19eba1e49e92d364d4a88b5f19"
            },
            "downloads": -1,
            "filename": "pylonparser-0.5.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c6bb1f1d4dc183ee727fcce22abcecc4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 6428,
            "upload_time": "2024-06-04T18:21:00",
            "upload_time_iso_8601": "2024-06-04T18:21:00.183356Z",
            "url": "https://files.pythonhosted.org/packages/20/1c/a79bdc50f914219b0226c16c122d5cc8c70f32fd2f6884d038ace6057e50/pylonparser-0.5.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "19f3354d8a5b8f2acd74370da899f53f30e1380abd5fce391d52548069a94a88",
                "md5": "73983b5bf3fb4b4b7e9ccb8126d20cb2",
                "sha256": "d0f6ff232e70d3142a3c761e9769240d12dc6697dc6b31ccbc2488cd5c16eb34"
            },
            "downloads": -1,
            "filename": "pylonparser-0.5.1.tar.gz",
            "has_sig": false,
            "md5_digest": "73983b5bf3fb4b4b7e9ccb8126d20cb2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 5281,
            "upload_time": "2024-06-04T18:21:01",
            "upload_time_iso_8601": "2024-06-04T18:21:01.291464Z",
            "url": "https://files.pythonhosted.org/packages/19/f3/354d8a5b8f2acd74370da899f53f30e1380abd5fce391d52548069a94a88/pylonparser-0.5.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-04 18:21:01",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "traxxo",
    "github_project": "pylonparser",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pylonparser"
}
        
Elapsed time: 0.25078s