{"id":37081798,"url":"https://github.com/hkyplyr/yfantasy-api","last_synced_at":"2026-01-14T09:57:44.806Z","repository":{"id":51371918,"uuid":"300497489","full_name":"hkyplyr/yfantasy-api","owner":"hkyplyr","description":"Python API client that can be used to make calls to the Yahoo! Fantasy Sports API. Developed specifically for NHL, but should support the NFL, MLB, and NBA as well.","archived":false,"fork":false,"pushed_at":"2025-04-15T22:20:36.000Z","size":194,"stargazers_count":12,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-11-29T03:25:29.362Z","etag":null,"topics":["baseball","basketball","fantasy-football","fantasy-hockey","fantasy-sports","football","hockey"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/yfantasy-api/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hkyplyr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-02T04:12:15.000Z","updated_at":"2025-09-03T15:34:00.000Z","dependencies_parsed_at":"2024-05-09T04:42:57.164Z","dependency_job_id":null,"html_url":"https://github.com/hkyplyr/yfantasy-api","commit_stats":{"total_commits":14,"total_committers":1,"mean_commits":14.0,"dds":0.0,"last_synced_commit":"fc9d7dfb9d7a9a9e3408e44f07758fafb13db3ff"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/hkyplyr/yfantasy-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hkyplyr%2Fyfantasy-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hkyplyr%2Fyfantasy-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hkyplyr%2Fyfantasy-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hkyplyr%2Fyfantasy-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hkyplyr","download_url":"https://codeload.github.com/hkyplyr/yfantasy-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hkyplyr%2Fyfantasy-api/sbom","scorecard":{"id":466332,"data":{"date":"2025-08-11","repo":{"name":"github.com/hkyplyr/yfantasy-api","commit":"707076c547d0bbc6cf55ca4a46ad193fd48e8052"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.1,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/15 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/python-package.yml:1","Warn: no topLevel permission defined: .github/workflows/python-publish.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-package.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/hkyplyr/yfantasy-api/python-package.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-package.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/hkyplyr/yfantasy-api/python-package.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-publish.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/hkyplyr/yfantasy-api/python-publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-publish.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/hkyplyr/yfantasy-api/python-publish.yml/main?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/python-package.yml:25","Warn: pipCommand not pinned by hash: .github/workflows/python-package.yml:26","Warn: pipCommand not pinned by hash: .github/workflows/python-package.yml:29","Warn: pipCommand not pinned by hash: .github/workflows/python-package.yml:36","Warn: pipCommand not pinned by hash: .github/workflows/python-publish.yml:33","Warn: pipCommand not pinned by hash: .github/workflows/python-publish.yml:34","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   6 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 12 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":6,"reason":"4 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-9hjg-9r4m-mvj7","Warn: Project is vulnerable to: PYSEC-2025-49 / GHSA-5rjg-fvgr-3xxf","Warn: Project is vulnerable to: GHSA-48p4-8xcf-vxj5","Warn: Project is vulnerable to: GHSA-pq67-6m6q-mj2v"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T12:36:13.133Z","repository_id":51371918,"created_at":"2025-08-19T12:36:13.133Z","updated_at":"2025-08-19T12:36:13.133Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28416272,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T08:38:59.149Z","status":"ssl_error","status_checked_at":"2026-01-14T08:38:43.588Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["baseball","basketball","fantasy-football","fantasy-hockey","fantasy-sports","football","hockey"],"created_at":"2026-01-14T09:57:44.004Z","updated_at":"2026-01-14T09:57:44.792Z","avatar_url":"https://github.com/hkyplyr.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Yahoo Fantasy API\n\u003e A simply Python client that can be used to make calls to the Yahoo! Fantasy Sports API.\n\n![Python package](https://github.com/hkyplyr/yfantasy-api/workflows/Python%20package/badge.svg)\n\nThis library provides a fluent API to build and make calls to the Yahoo! Fantasy Sports API. It was developed specifically for NHL use initially, but should be generic enough to support MLB, NBA, and NFL as well.\n\n## Installation\n``` sh\npip install yfantasy_api\n```\n\n## Usage examples\n### Obtain team information, including the roster with player stats for March 31st 2021\n``` python\n# The request url created is: /team/nhl.l.12345.t.1/roster/players/stats;type=date;date=2021-03-31\nfrom yfantasy_api import YahooFantasyApi\n\nleague_id = 12345  # This should be the id of the league you are querying\ngame_id = 'nhl'    # This should be the id of the game you are querying\nteam_id = 1        # This should be the id of the team you are querying\n\napi = YahooFantasyApi(league_id, game_id)\nteam = api \\\n    .team(team_id) \\\n    .roster() \\\n    .stats(date='2021-03-31') \\\n    .get()\n\nfor player in team.players:\n    print(player.full_name, player.points)\n\n# Output:\n# Brock Nelson 0.00\n# Joel Eriksson Ek 0.05\n# Nazem Kadri 4.00\n# Alex Ovechkin 0.00\n# Jake Guentzel 0.00\n# ...truncated for brevity...\n```\n\n### Obtain draft_results, including player information for each pick.\n``` python\n# The request url created is: /league/nhl.l.12345/draft_results/players\nfrom yfantasy_api import YahooFantasyApi\n\nleague_id = 12345  # This should be the id of the league you are querying\ngame_id = 'nhl'    # This should be the id of the game you are querying\nteam_id = 1        # This should be the id of the team you are querying\n\napi = YahooFantasyApi(league_id, game_id)\nleague = api \\\n    .league() \\\n    .draft_results() \\\n    .players() \\\n    .get()\n\nfor draft_result in league.draft_results:\n    print(f'{draft_result.round} - {draft_result.pick} - {draft_result.player.full_name}')\n\n# Output:\n# 1 - 1 - Connor McDavid\n# 1 - 2 - Alex Ovechkin\n# 1 - 3 - Patrick Kane\n# 1 - 4 - Steven Stamkos\n# 1 - 5 - Sidney Crosby\n# ...truncated for brevity...\n```\nFor working examples of the above scenarios, see [examples.py](examples.py)\n\n## Development setup\nI suggest you use some form of virtual environment to avoid clashing dependencies, but that is obviously your call. My suggested virtual environment is [virtualenvwrapper](https://virtualenvwrapper.readthedocs.io/en/latest/).\n``` sh\ngit clone git@github.com:hkyplyr/yfantasy-api.git\n...\ncd yfantasy_api\n...\npip install -r requirements.txt\n```\n\n## Release History\nTODO\n\n## Meta\nTravis Paquette - [@hkyplyr](https://twitter.com/hkyplyr) - tpaqu15@gmail.com  \nDistributed under the MIT license. See [`LICENSE`](LICENSE) for more information.\n## How to Contribute\n1. Clone repo and create a new branch: $ git checkout -b short_feature_name.\n2. Make changes and test\n3. Submit a Pull Request","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhkyplyr%2Fyfantasy-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhkyplyr%2Fyfantasy-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhkyplyr%2Fyfantasy-api/lists"}