Skip to main content

Script for creating a sqlite3 db from Yahoo NHL fantasy league data using yfpy.

Project description

yfpy-nhl-sqlite

Create a SQLite database from your Yahoo NHL fantasy league data in minutes.

View the schema to see what data is stored.

Installation

The supported installation method is with pipx. Install with pipx install yfpy-nhl-sqlite.

Authentication

Authentication is required with the Yahoo API to retrieve private league data. To obtain a Yahoo consumer key and consumer secret, you must set up a Yahoo Developer Network App. See the Setup section of the yfpy docs for details.

Once you have obtained a consumer key and secret, yfpy-nhl-sqlite provides two ways to authenticate:

  1. Provide --yahoo-consumer-key and --yahoo-consumer-secret as command-line arguments.
  2. Create an .env file in the directory yfpy-nhl-sqlite will be invoked with the variables YAHOO_CONSUMER_KEY and YAHOO_CONSUMER_SECRET set.

Usage

Run the script with the following command, substituting in your Yahoo league's id:

yfpy-nhl-sqlite LEAGUE_ID

A SQLite database will be created in the directory the script is invoked from. Your Yahoo league's id can be found in league settings in the Yahoo fantasy web or mobile app.

Limitations

  • Any changes to the NHL and Yahoo APIs will likely cause breaking changes to this library.
  • Not all data is ported that is available through the Yahoo API. If you'd like some data to be included that is missing, open an issue.
  • The schema has only been tested with head-to-head private leagues. Other league types may work but are not officially supported, though there is desire to support them in the future.

Acknowledgements

This package is just a small script that wraps the yfpy library. Thanks to uberfastman for the great work there.

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

yfpy_nhl_sqlite-1.0.0.tar.gz (2.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yfpy_nhl_sqlite-1.0.0-py3-none-any.whl (24.6 kB view details)

Uploaded Python 3

File details

Details for the file yfpy_nhl_sqlite-1.0.0.tar.gz.

File metadata

  • Download URL: yfpy_nhl_sqlite-1.0.0.tar.gz
  • Upload date:
  • Size: 2.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for yfpy_nhl_sqlite-1.0.0.tar.gz
Algorithm Hash digest
SHA256 16a6331f84fb9d1420bf86387b4a580989ff2616387bfd928023373aed8162d9
MD5 abd3c351320a3eae512edcee03191fd3
BLAKE2b-256 95ef2b6ad124054e7c95dd9b55ee86fa427c0056dca7fe1309e43edae4059c41

See more details on using hashes here.

File details

Details for the file yfpy_nhl_sqlite-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for yfpy_nhl_sqlite-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 808afc3e3b6505b71ea62e39278fbf7a8e2fafac20c039b737649fb9770bdbc4
MD5 6dc82ca379efe7557d2fb4bfad9e1983
BLAKE2b-256 32f798012c8d39d227084ad653d03abeaf606fb92add86a80821d90938552344

See more details on using hashes here.

Supported by

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