procyclingstats


Nameprocyclingstats JSON
Version 0.1.10 PyPI version JSON
download
home_pagehttps://github.com/themm1/procyclingstats
SummaryA Python API wrapper for procyclingstats.com
upload_time2024-03-28 18:08:34
maintainerNone
docs_urlNone
authorMartin Madzin
requires_pythonNone
licenseMIT
keywords cycling cycling-stats procyclingstats scraper html-parsing sports-analytics
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            procyclingstats
===============

Procyclingstats is a Python package for scraping `procyclingstats.com`_,
which is a website with cycling stats. It's recommended to get familiar with
the website before using this package.

Installation
------------

Using pip:

.. code-block:: text

    $ pip install procyclingstats

Manual (for development):

.. code-block:: text

    $ git clone https://github.com/themm1/procyclingstats.git
    $ pip install -r procyclingstats/requirements_dev.txt

Basic usage
-----------

Basic Rider class usage:

>>> from procyclingstats import Rider
>>> rider = Rider("rider/tadej-pogacar")
>>> rider.birthdate()
"1998-9-21"
>>> rider.parse()
{
    'birthdate': '1998-9-21',
    'height': 1.76,
    'name': 'Tadej  Pogačar',
    'nationality': 'SI',
    ...
}

Interface consists from scraping classes which are currently ``Race``,
``RaceStartlist``, ``RaceClimbs``, ``Ranking``, ``Rider``, ``RiderResults``,
``Stage`` and ``Team``. Usage of all scraping classes is almost the same and
the only difference among them are parsing methods as is for example
``birthdate`` in Rider class usage example.

Unexpected behaviour and parsing errors
---------------------------------------

Since the project is a web scraper which parses HTML, it's difficult to make
it reliable and it's common to encounter some HTML parsing problems. After
getting some kind of unexpected behaviour or parsing errors, it's recommended
to update the package on your system using
``pip install procyclingstats --upgrade``. If the problem proceeds, see the
GitHub issues_ page and if the issue hasn't been opened yet, don't hesitate to
open one!

Links
-----

- GitHub_
- PyPI_
- Documentation_

.. _GitHub: https://github.com/themm1/procyclingstats
.. _PyPI: https://pypi.org/project/procyclingstats
.. _Documentation: https://procyclingstats.readthedocs.io/en/latest
.. _procyclingstats.com: https://www.procyclingstats.com
.. _selectolax: https://github.com/rushter/selectolax
.. _issues: https://github.com/themm1/procyclingstats/issues
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/themm1/procyclingstats",
    "name": "procyclingstats",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "cycling cycling-stats procyclingstats scraper html-parsing sports-analytics",
    "author": "Martin Madzin",
    "author_email": "madzin.m@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/5c/a3/c3919aab41f6e8f226464cc34f6a042f8e8fe1695396b87d33ac155ba773/procyclingstats-0.1.10.tar.gz",
    "platform": null,
    "description": "procyclingstats\n===============\n\nProcyclingstats is a Python package for scraping `procyclingstats.com`_,\nwhich is a website with cycling stats. It's recommended to get familiar with\nthe website before using this package.\n\nInstallation\n------------\n\nUsing pip:\n\n.. code-block:: text\n\n    $ pip install procyclingstats\n\nManual (for development):\n\n.. code-block:: text\n\n    $ git clone https://github.com/themm1/procyclingstats.git\n    $ pip install -r procyclingstats/requirements_dev.txt\n\nBasic usage\n-----------\n\nBasic Rider class usage:\n\n>>> from procyclingstats import Rider\n>>> rider = Rider(\"rider/tadej-pogacar\")\n>>> rider.birthdate()\n\"1998-9-21\"\n>>> rider.parse()\n{\n    'birthdate': '1998-9-21',\n    'height': 1.76,\n    'name': 'Tadej  Poga\u010dar',\n    'nationality': 'SI',\n    ...\n}\n\nInterface consists from scraping classes which are currently ``Race``,\n``RaceStartlist``, ``RaceClimbs``, ``Ranking``, ``Rider``, ``RiderResults``,\n``Stage`` and ``Team``. Usage of all scraping classes is almost the same and\nthe only difference among them are parsing methods as is for example\n``birthdate`` in Rider class usage example.\n\nUnexpected behaviour and parsing errors\n---------------------------------------\n\nSince the project is a web scraper which parses HTML, it's difficult to make\nit reliable and it's common to encounter some HTML parsing problems. After\ngetting some kind of unexpected behaviour or parsing errors, it's recommended\nto update the package on your system using\n``pip install procyclingstats --upgrade``. If the problem proceeds, see the\nGitHub issues_ page and if the issue hasn't been opened yet, don't hesitate to\nopen one!\n\nLinks\n-----\n\n- GitHub_\n- PyPI_\n- Documentation_\n\n.. _GitHub: https://github.com/themm1/procyclingstats\n.. _PyPI: https://pypi.org/project/procyclingstats\n.. _Documentation: https://procyclingstats.readthedocs.io/en/latest\n.. _procyclingstats.com: https://www.procyclingstats.com\n.. _selectolax: https://github.com/rushter/selectolax\n.. _issues: https://github.com/themm1/procyclingstats/issues",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A Python API wrapper for procyclingstats.com",
    "version": "0.1.10",
    "project_urls": {
        "Homepage": "https://github.com/themm1/procyclingstats"
    },
    "split_keywords": [
        "cycling",
        "cycling-stats",
        "procyclingstats",
        "scraper",
        "html-parsing",
        "sports-analytics"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5ca3c3919aab41f6e8f226464cc34f6a042f8e8fe1695396b87d33ac155ba773",
                "md5": "148578a6bb66ae99348e798a4af8b816",
                "sha256": "3ec0247d10f26e3794e5ba45ccb01e6b788aa9da63308cc7655968eafe7c6888"
            },
            "downloads": -1,
            "filename": "procyclingstats-0.1.10.tar.gz",
            "has_sig": false,
            "md5_digest": "148578a6bb66ae99348e798a4af8b816",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 27025,
            "upload_time": "2024-03-28T18:08:34",
            "upload_time_iso_8601": "2024-03-28T18:08:34.979351Z",
            "url": "https://files.pythonhosted.org/packages/5c/a3/c3919aab41f6e8f226464cc34f6a042f8e8fe1695396b87d33ac155ba773/procyclingstats-0.1.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-28 18:08:34",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "themm1",
    "github_project": "procyclingstats",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "procyclingstats"
}
        
Elapsed time: 0.24615s