• Stars
    star
    147
  • Rank 243,882 (Top 5 %)
  • Language
    Python
  • License
    MIT License
  • Created about 5 years ago
  • Updated 10 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An asynchronous Python package for https://understat.com/.

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 [email protected].
  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/.

More Repositories

1

fpl

An asynchronous Python wrapper for the Fantasy Premier League API.
Python
281
star
2

template

A Next.js 13 application with authentication and payments, built with PlanetScale, Drizzle ORM, Lucia, Tailwind and LemonSqueezy
TypeScript
207
star
3

FPLbot

A bot made for /r/FantasyPL
Python
65
star
4

boilerplate

Fullstack SaaS boilerplate!
TypeScript
51
star
5

nx-expo-nextjs-tamagui

Nx, Tamagui, Solito, Expo & Next.js example template
TypeScript
28
star
6

pokemon

A Next.js 13 application built using the new router, server components and server actions, as well as NextAuth.js, Drizzle ORM and Turso in an Nx monorepo
TypeScript
27
star
7

utopian.rocks

A web application showing additional information about Utopian.io.
CSS
21
star
8

nx-expo-nextjs

Nx monorepo with Next.js and Expo set up using Solito
TypeScript
9
star
9

steempy-tutorials

Repository for @steempytutorials' tutorial code
Python
8
star
10

football

A Python wrapper around the football-data API.
Python
7
star
11

utopian-spreadsheet

Dirty code for managing the spreadsheet.
Python
4
star
12

nextjs-graphql-starter

A monorepo Next.js starter with basic authentication. Includes TypeScript, GraphQL (Apollo), PostgreSQL, Styled Components and more...
TypeScript
3
star
13

fpl-plus-old

A browser extension for the Fantasy Premier League.
JavaScript
3
star
14

utopian-cli

A command-line interface for Utopian.io.
Python
3
star
15

nx-t3-app

TypeScript
1
star
16

amosbastian.com

Personal website built with Next.js!
TypeScript
1
star
17

PMTC-python

Post-Match Thread Creator
Python
1
star
18

search_engine

JavaScript
1
star