
Research
Security News
The Landscape of Malicious Open Source Packages: 2025 Mid‑Year Threat Report
A look at the top trends in how threat actors are weaponizing open source packages to deliver malware and persist across the software supply chain.
A simply Python client that can be used to make calls to the Yahoo! Fantasy Sports API.
This 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.
pip install yfantasy_api
# The request url created is: /team/nhl.l.12345.t.1/roster/players/stats;type=date;date=2021-03-31
from yfantasy_api import YahooFantasyApi
league_id = 12345 # This should be the id of the league you are querying
game_id = 'nhl' # This should be the id of the game you are querying
team_id = 1 # This should be the id of the team you are querying
api = YahooFantasyApi(league_id, game_id)
team = api \
.team(team_id) \
.roster() \
.stats(date='2021-03-31') \
.get()
for player in team.players:
print(player.full_name, player.points)
# Output:
# Brock Nelson 0.00
# Joel Eriksson Ek 0.05
# Nazem Kadri 4.00
# Alex Ovechkin 0.00
# Jake Guentzel 0.00
# ...truncated for brevity...
# The request url created is: /league/nhl.l.12345/draft_results/players
from yfantasy_api import YahooFantasyApi
league_id = 12345 # This should be the id of the league you are querying
game_id = 'nhl' # This should be the id of the game you are querying
team_id = 1 # This should be the id of the team you are querying
api = YahooFantasyApi(league_id, game_id)
league = api \
.league() \
.draft_results() \
.players() \
.get()
for draft_result in league.draft_results:
print(f'{draft_result.round} - {draft_result.pick} - {draft_result.player.full_name}')
# Output:
# 1 - 1 - Connor McDavid
# 1 - 2 - Alex Ovechkin
# 1 - 3 - Patrick Kane
# 1 - 4 - Steven Stamkos
# 1 - 5 - Sidney Crosby
# ...truncated for brevity...
For working examples of the above scenarios, see examples.py
I suggest you use some form of virtual environment to avoid clashing dependencies, but that is obviously your call. My suggested virtual environment is virtualenvwrapper.
git clone git@github.com:hkyplyr/yfantasy-api.git
...
cd yfantasy_api
...
pip install -r requirements.txt
TODO
Travis Paquette - @hkyplyr - tpaqu15@gmail.com
Distributed under the MIT license. See LICENSE
for more information.
FAQs
Python package to access the Yahoo! Fantasy APIs
We found that yfantasy-api demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A look at the top trends in how threat actors are weaponizing open source packages to deliver malware and persist across the software supply chain.
Security News
ESLint now supports HTML linting with 48 new rules, expanding its language plugin system to cover more of the modern web development stack.
Security News
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.