A Python package for https://understat.com/.
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/.
Metadata
Release files for understat 0.1.14
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| understat-0.1.14.tar.gz | 10.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| understat-0.1.14-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.4 kB
Release files / understat-0.1.14.tar.gz
| Download URL | understat-0.1.14.tar.gz |
|---|---|
| Size | 10.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1476c104ddb81a120722714544e1c18d284992c03d15bea3fbfaf5f6869ab6b8
|
|
BLAKE2b-256 checksum How to use checksums |
e3f2f248fffbe378f07b23c4b23a348feb96eadd1ea98aaee3afba01d5f99cdb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Release files / understat-0.1.14-py3-none-any.whl
| Download URL | understat-0.1.14-py3-none-any.whl |
|---|---|
| Size | 10.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b374db504a077d76ac03c85c0cc1ccb485335d8e2f06da343baef489451b107f
|
|
BLAKE2b-256 checksum How to use checksums |
e8997c5fbd9eab1771b3916ce5c6c5be8a00c980022d08fd320f8a7553187395
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|