Understat
An asynchronous Python package for https://understat.com/.
Install / Use
/learn @amosbastian/UnderstatREADME
Join the Discord server or submit an issue for help and / or suggestions!
Installing understat
The recommended way to install understat is via pip.
pip install understat
To install it directly from GitHub you can do the following:
git clone git://github.com/amosbastian/understat.git
You can also install a .tar file or .zip file
curl -OL https://github.com/amosbastian/understat/tarball/master
curl -OL https://github.com/amosbastian/understat/zipball/master # Windows
Once it has been downloaded you can easily install it using pip:
cd understat
pip install .
Usage
An example of using understat can be found below:
import asyncio
import json
import aiohttp
from understat import Understat
async def main():
async with aiohttp.ClientSession() as session:
understat = Understat(session)
data = await understat.get_league_players("epl", 2018, {"team_title": "Manchester United"})
print(json.dumps(data))
if __name__ == "__main__":
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
loop.run_until_complete(main())
Contributing
- Fork the repository on GitHub.
- Run the tests with
pytest tests/to confirm they all pass on your system. If the tests fail, then try and find out why this is happening. If you aren't able to do this yourself, then don't hesitate to either create an issue on GitHub, or send an email to amosbastian@gmail.com. - Either create your feature and then write tests for it, or do this the other way around.
- Run all tests again with with
pytest tests/to confirm that everything still passes, including your newly added test(s). - Create a pull request for the main repository's
masterbranch.
Documentation
Documentation and examples for understat can be found at http://understat.readthedocs.io/en/latest/.
Related Skills
YC-Killer
2.7kA library of enterprise-grade AI agents designed to democratize artificial intelligence and provide free, open-source alternatives to overvalued Y Combinator startups. If you are excited about democratizing AI access & AI agents, please star ⭐️ this repository and use the link in the readme to join our open source AI research team.
groundhog
398Groundhog's primary purpose is to teach people how Cursor and all these other coding agents work under the hood. If you understand how these coding assistants work from first principles, then you can drive these tools harder (or perhaps make your own!).
last30days-skill
18.3kAI agent skill that researches any topic across Reddit, X, YouTube, HN, Polymarket, and the web - then synthesizes a grounded summary
sec-edgar-agentkit
10AI agent toolkit for accessing and analyzing SEC EDGAR filing data. Build intelligent agents with LangChain, MCP-use, Gradio, Dify, and smolagents to analyze financial statements, insider trading, and company filings.
