项目作者: whoophee

项目描述 :
Wrapper and parser for Dota 2 WebAPI
高级语言: Python
项目地址: git://github.com/whoophee/d2api.git
创建时间: 2018-10-04T19:24:01Z
项目社区:https://github.com/whoophee/d2api

开源协议:GNU General Public License v3.0

下载


d2api

Introduction

Python 3 wrapper and parser for interacting with Valve’s Dota 2 WebAPI.

Documentation Build Version Quality License
Documentation Build Status Version Codacy Badge License

This project is still growing, with additonal parsing, tests, documentation and examples.

Installation

Install from pip using:

  1. $ pip install d2api

Clone from github

Download the latest build and install using:

  1. $ git clone https://github.com/whoophee/d2api/
  2. $ cd d2api/
  3. $ python setup.py install

Getting Started

First of all, you need an API key from Steam. Once that’s done, you can initialize the wrapper in one of two ways.

Initialize using Environment Variable

Set the environment variable D2_API_KEY to the API key you just generated, and then initialize your wrapper using,

  1. api = d2api.APIWrapper()

Initialize inline

You can also initialize the wrapper inline using,

  1. # This takes priority over the environment variable
  2. api = d2api.APIWrapper(api_key = 'your api key')

You can find further use cases and examples here.

Documentation

Documentation is available at http://d2api.readthedocs.org/