A python interface for <OPENDOTA/> API
Project description
<OPENDOTA/> API
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.
Free software: MIT license
Documentation: https://pyopendota.readthedocs.io.
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
Usage
To use <OPENDOTA/> API in a project:
import opendota # Initialize the API-connection object client = opendota.OpenDota() # Get common entities client.get_matches('match-id') client.get_player('player-id') client.get_team('team-id') # Search Functionality players = client.search_player('Dendi') teams = client.search_team('Alliance') heroes = client.search_hero('Crystal') leagues = client.search_league('International') # OpenDota API supports arbitrary PostgreSQL query # Database Schema client.get_schema() # Lists all tables client.get_schema('matches') # Lists schema for a specific table # Arbitrary PostgreSQL Query client.explorer("select * from matches where limit 1")
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/
Credits
This package uses data provided by The OpenDota API.
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
History
0.1.0 (2021-07-20)
First release on PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pyopendota-0.1.4-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 777e0e6c01925c2cdbeaf77355e9fc8d429fe7f825057fd1279e4b03fb91a48f |
|
MD5 | f5e5b5ef2d8dbce41781aeef729b35cb |
|
BLAKE2b-256 | 5add1338625f33083b54e9e1f09bdd92f05998c9af766c5e5f38834783c9b4a1 |