Skip to main content

An unofficial Python library for scraping/accessing data from OP.GG

Project description

OPGG.py

An unofficial Python library for accessing OPGG data.

Prerequisites

Note: Will likely work on versions slightly older or newer

Installation

Automatic

This library is available as a pip package and can be installed via the following command:

py -m pip install opgg.py

Manual

Dependencies

Alternatively, you can use the provided requirements.txt to install the required libraries by running the following command:

py -m pip install -r requirements.txt

Usage / Basic Example

Importing the library

from opgg.opgg import OPGG
from opgg.params import Region


def main():
    opgg = OPGG()

    results = opgg.search("HandOfTheCouncil", Region.NA)
    [print(result) for result in results]


if __name__ == "__main__":
    main()

Output

Important Note: The information returned below is a summary view with the most important parts of each object shown "at a glance". Many of the objects have several additional properties that can be accessed by referencing the object in code.

[NA  ] HandoftheCouncil #NA1     | Level: 556  [Summoner ID: t7NuBl5eATWiqoZMu2MzZbAX1S9IDyp4Kzut5Z_4QT3-tWs]

Development

Setting Up Development Environment

Step 1. Clone the repository:

git clone https://github.com/ShoobyDoo/OPGG.py.git
cd OPGG.py

Step 2. Install production dependencies:

pip install -r requirements.txt

Code Quality

Run linting with ruff:

ruff check opgg/

Auto-fix linting issues:

ruff check --fix opgg/

Check code formatting:

ruff format --check opgg/

Auto-format code:

ruff format opgg/

Ensure code formatting is run prior to opening a pull request.

Join the Discussion

Here's a link to the Support Discord

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

opgg_py-3.1.0.tar.gz (48.6 kB view details)

Uploaded Source

Built Distribution

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

opgg_py-3.1.0-py3-none-any.whl (50.5 kB view details)

Uploaded Python 3

File details

Details for the file opgg_py-3.1.0.tar.gz.

File metadata

  • Download URL: opgg_py-3.1.0.tar.gz
  • Upload date:
  • Size: 48.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for opgg_py-3.1.0.tar.gz
Algorithm Hash digest
SHA256 30109535621a05254eac31e732d00a150816d552c33c210d208430a110b4ee9a
MD5 d52552d2193a00cb81f4c043371ab28d
BLAKE2b-256 83144853a905bfe0f5f93af747a059612d231a149d715dfa78f891e362515a01

See more details on using hashes here.

File details

Details for the file opgg_py-3.1.0-py3-none-any.whl.

File metadata

  • Download URL: opgg_py-3.1.0-py3-none-any.whl
  • Upload date:
  • Size: 50.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for opgg_py-3.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aa070e6aff5d17c409da9b6080cd3d5d92373420d0b917a2a348371a4ad1541d
MD5 a2c4d4c1effaf9019e0516ddfcc785bf
BLAKE2b-256 62e8e24cbecc0b04e84e3d06c73ba3ddb26de4b1e1a144c06f65902aa9e27ceb

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