DEV Community

Hrishikesh Terdalkar
Hrishikesh Terdalkar

Posted on

 

pyopendota: Python Package for OPENDOTA API

GitHub logo hrishikeshrt / pyopendota

Python wrapper for <OPENDOTA/> API

<OPENDOTA/> API

https://img.shields.io/pypi/v/pyopendota?color=success Documentation Status Python Version Support GitHub Issues GitHub Followers Twitter Followers

A python interface for <OPENDOTA/> API

The OpenDota class provided with the package serves as a python interface for the original OpenDota API in the form of a thin wrapper The class assumes some familiarity with the OpenDota API.

All method calls return serializable python objects, as return by the API in most cases a dict or a list. Response data is stored as JSON in a local directory (Default: ~/dota2), to prevent the load on OpenDota API.

Features

  • Transparent wrapper for majority of the API calls
  • Ability to authenticate using API key
  • In-built and cusomizable limit to protect against frequent API calls
  • Local file-based storage for frequent requests
  • Basic CLI using fire

Usage

Use <OPENDOTA/> API in a project

import opendota

# Initialize the API-connection object
client = opendota.OpenDota()
Enter fullscreen mode Exit fullscreen mode

Get Common Entities

client.get_matches(
Enter fullscreen mode Exit fullscreen mode

About OpenDota API

The OpenDota API provides Dota 2 related data including advanced match data extracted from match replays. OpenDota API Documentation: https://docs.opendota.com/

About pyopendota

The OpenDota class provided with the package serves as a python interface for the original OpenDota API in the form of a thin wrapper. The class assumes some familiarity with the OpenDota API.

All method calls return serializable python objects, as return by the API, in most cases a dict or a list. Response data is stored as JSON in a local directory (Default: ~/dota2), to prevent the load on OpenDota API.

Features

  • Transparent wrapper for majority of the API calls
  • Ability to authenticate using API key
  • In-built and cusomizable limit to protect against frequent API calls
  • Local file-based storage for frequent requests

Extra

Apart from the direct API calls, it also lets one "Search by name" for pro players, teams, leagues etc.

Top comments (0)

18 Useful Github Repositories Every Developer Should Bookmark

18 Useful GitHub repositories every developer should bookmark: everything from learning resources and roadmaps to best practices, system designs, and tools.