Skip to main content

A Python wrapper for https://understat.com/

Project description

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

  1. Fork the repository on GitHub.
  2. 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.
  3. Either create your feature and then write tests for it, or do this the other way around.
  4. Run all tests again with with pytest tests/ to confirm that everything still passes, including your newly added test(s).
  5. Create a pull request for the main repository's master branch.

Documentation

Documentation and examples for understat can be found at http://understat.readthedocs.io/en/latest/.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

understat-0.1.14.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

understat-0.1.14-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file understat-0.1.14.tar.gz.

File metadata

  • Download URL: understat-0.1.14.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for understat-0.1.14.tar.gz
Algorithm Hash digest
SHA256 1476c104ddb81a120722714544e1c18d284992c03d15bea3fbfaf5f6869ab6b8
MD5 bb48d45054011da36a7afa081b46aec2
BLAKE2b-256 e3f2f248fffbe378f07b23c4b23a348feb96eadd1ea98aaee3afba01d5f99cdb

See more details on using hashes here.

File details

Details for the file understat-0.1.14-py3-none-any.whl.

File metadata

  • Download URL: understat-0.1.14-py3-none-any.whl
  • Upload date:
  • Size: 10.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for understat-0.1.14-py3-none-any.whl
Algorithm Hash digest
SHA256 b374db504a077d76ac03c85c0cc1ccb485335d8e2f06da343baef489451b107f
MD5 4a7b87c5cbea8c37b8d61cd0298ff610
BLAKE2b-256 e8997c5fbd9eab1771b3916ce5c6c5be8a00c980022d08fd320f8a7553187395

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page