Skip to main content

Python DB-API Adaptor for Leaguepedia

Project description

python-leaguepedia-db

Python DB-API Adaptor for Leaguepedia

Installation

pip install python-leaguepedia-db

Usage

>>> import leaguepediadb
>>> connection = leaguepediadb.connect()
>>> cursor = connection.cursor()
>>> cursor.execute(
...     'SELECT SP.Team AS Team, SP.Role AS Role, SP.Link AS Link '
...     'FROM ScoreboardPlayers SP '
...     'WHERE SP.OverviewPage = ? '
...     'GROUP BY SP.Link '
...     'ORDER BY SP.DateTime_UTC DESC',
...     ('LCK/2022 Season/Spring Season',)
... )
>>> cursor.fetchone()  # {'Team': 'DRX', 'Role': 'Bot', 'Link': 'Taeyoon'}
>>> for row in cursor.fetchall():
...     print(row)
...
# {'Team': 'Fredit BRION', 'Role': 'Bot', 'Link': 'Gamin'}
# {'Team': 'Fredit BRION', 'Role': 'Top', 'Link': 'Soboro'}
# {'Team': 'Fredit BRION', 'Role': 'Mid', 'Link': 'Feisty'}
# {'Team': 'Fredit BRION', 'Role': 'Support', 'Link': 'Loopy'}
...

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

python-leaguepedia-db-0.1.1b1.tar.gz (16.9 kB view hashes)

Uploaded Source

Built Distribution

python_leaguepedia_db-0.1.1b1-py3-none-any.whl (16.8 kB view hashes)

Uploaded Python 3

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