Skip to main content

A Python API wrapper for procyclingstats.com

Project description

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

Instalation

Using pip:

$ pip install procyclingstats

Manual (for development):

$ 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

procyclingstats-0.1.2.tar.gz (28.0 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page