Skip to content
This repository has been archived by the owner on Jan 9, 2022. It is now read-only.

mmoran0032/wcf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Not actively maintained here. See Gitlab for details.

wcf -- World Curling Federation Database Interface

Note: this package is not officially endorsed or supported by the WCF

Pull tournament and game data from the World Curling Federation's results site, using requests. Requires an active and stable internet connection.

This package was originally created to supplement my needs of pulling the data while I was waiting for official API access. It also includes accessing the results database through official means.

API

Official access to the WCF's results database must be obtained prior to using the official API to access the information. Access follows standard REST conventions. Create a credentials.json file as follows:

{
    "Username": "user",
    "Password": "something+else"
}

The file can either be placed in the same directory, or you can pass the path to the file to WCF.API() as an argument. The data is returned as a formatted JSON response, as each use case of the data could require different portions of the response. Since development was directed by what I needed, not the entire API is implemented.

Usage is as follows:

import wcf

conn = wcf.API().connect()
# alternatively:
# conn = wcf.API('credentials/wcf.json')
# conn.connect()
draws = conn.get_draws_by_tournament(555)

Testing

Testing requires that you have a credentials file located in this directory. The test suite can be run with:

py.test --cov=wcf

About

Interface to the WCF's results database

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages