Skip to content

jmc856/mysportsfeeds-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MySportsFeeds Wrapper - Python

alt

Python wrapper for MySportsFeeds API

Setup

Set API credentials

If you haven't signed up for API access, do so here https://www.mysportsfeeds.com/index.php/register/

Change config.ini to include your username & login from MySportsFeeds.com

[Authentication]
username: <your_username>
password: <your_password>

Set storage location of API feeds (default is results/)

[FileStore]
location: <your results location>

Install requirements and run tests

$ make build

Usage

Create configuration object with API version as input parameter

config = MsfLib(version="1.0")

Test connection at any time with:

config.test_connection()

Create storage method

storage = FeedStorageMethod(config)

Create a feed

feed = Feed(config, sport="nhl", season="current", season_type="regular", date=datetime.now().strftime("%Y%m%d"), output_type="json")

Note: For default params, the season/sport/season_type will not always correctly align to a working feed. Although, season="current" or season="latest"should always pull a working feed.

feed.set_store(storage)

This will temporarily store results in feed.store.output. Depending on storage parameters selected, the data may be stored in <your results location>.

About

Python wrapper for MySportsFeed API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published