Giter Site home page Giter Site logo

mysportsfeeds-python's Introduction

MySportsFeeds Wrapper - Python

alt

Python wrapper for MySportsFeeds API

Instructions

Clone repo

$ git clone https://github.com/jmc856/mysportsfeeds-python.git

Set API credentials

$ cd mysportsfeeds-python
$ nano config/config.ini

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

mysportsfeeds-python's People

Contributors

jmc856 avatar bdeetz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.