Metadata-Version: 2.1
Name: python-opendota
Version: 2.0.0
Summary: Generated Python SDK for working with OpenDota API
Home-page: https://docs.opendota.com/
License: Apache-2.0
Keywords: OpenAPI,OpenAPI-Generator,OpenDota API
Author: OpenAPI Generator community
Author-email: team@openapitools.org
Maintainer: Dmitry Vasiliev
Maintainer-email: contact.vasiliev.dmitry@gmail.com
Requires-Python: >=3.6.2,<4
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Dist: python-dateutil (>=2.8.2,<3.0.0)
Requires-Dist: urllib3 (>=1.26.9,<2.0.0)
Project-URL: Documentation, https://github.com/swimmwatch/python-opendota#documentation-for-api-endpoints
Project-URL: Repository, https://github.com/swimmwatch/python-opendota
Description-Content-Type: text/markdown

# python-opendota
Generated Python SDK for working with [OpenDota API](https://docs.opendota.com/).

This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 18.0.0
- Package version: 2.0.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen

## Requirements.

Python >=3.6

## Installation & Usage
### pip install

You can install directly using:

```sh
pip install git+https://github.com/swimmwatch/python-opendota.git
```
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/swimmwatch/python-opendota.git`)

or:

```sh
pip install python-opendota
```

Then import the package:
```python
import python_opendota
```

### Poetry

Install via [Poetry](https://python-poetry.org/).

```sh
poetry add python-opendota
```

Then import the package:
```python
import python_opendota
```

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```python

import time
import python_opendota
from pprint import pprint
from python_opendota.api import benchmarks_api
from python_opendota.model.benchmarks_response import BenchmarksResponse
# Defining the host is optional and defaults to http://api.opendota.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = python_opendota.Configuration(
    host = "http://api.opendota.com/api"
)



# Enter a context with an instance of the API client
with python_opendota.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = benchmarks_api.BenchmarksApi(api_client)
    hero_id = "hero_id_example" # str | Hero ID

    try:
        # GET /benchmarks
        api_response = api_instance.benchmarks_get(hero_id)
        pprint(api_response)
    except python_opendota.ApiException as e:
        print("Exception when calling BenchmarksApi->benchmarks_get: %s\n" % e)
```

## Documentation for API Endpoints

All URIs are relative to *http://api.opendota.com/api*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*BenchmarksApi* | [**benchmarks_get**](docs/BenchmarksApi.md#benchmarks_get) | **GET** /benchmarks | GET /benchmarks
*ConstantsApi* | [**constants_get**](docs/ConstantsApi.md#constants_get) | **GET** /constants | GET /constants
*ConstantsApi* | [**constants_resource_get**](docs/ConstantsApi.md#constants_resource_get) | **GET** /constants/{resource} | GET /constants
*DistributionsApi* | [**distributions_get**](docs/DistributionsApi.md#distributions_get) | **GET** /distributions | GET /distributions
*ExplorerApi* | [**explorer_get**](docs/ExplorerApi.md#explorer_get) | **GET** /explorer | GET /explorer
*FindMatchesApi* | [**find_matches_get**](docs/FindMatchesApi.md#find_matches_get) | **GET** /findMatches | GET /
*HealthApi* | [**health_get**](docs/HealthApi.md#health_get) | **GET** /health | GET /health
*HeroStatsApi* | [**hero_stats_get**](docs/HeroStatsApi.md#hero_stats_get) | **GET** /heroStats | GET /heroStats
*HeroesApi* | [**heroes_get**](docs/HeroesApi.md#heroes_get) | **GET** /heroes | GET /heroes
*HeroesApi* | [**heroes_hero_id_durations_get**](docs/HeroesApi.md#heroes_hero_id_durations_get) | **GET** /heroes/{hero_id}/durations | GET /heroes/{hero_id}/durations
*HeroesApi* | [**heroes_hero_id_item_popularity_get**](docs/HeroesApi.md#heroes_hero_id_item_popularity_get) | **GET** /heroes/{hero_id}/itemPopularity | GET /heroes/{hero_id}/itemPopularity
*HeroesApi* | [**heroes_hero_id_matches_get**](docs/HeroesApi.md#heroes_hero_id_matches_get) | **GET** /heroes/{hero_id}/matches | GET /heroes/{hero_id}/matches
*HeroesApi* | [**heroes_hero_id_matchups_get**](docs/HeroesApi.md#heroes_hero_id_matchups_get) | **GET** /heroes/{hero_id}/matchups | GET /heroes/{hero_id}/matchups
*HeroesApi* | [**heroes_hero_id_players_get**](docs/HeroesApi.md#heroes_hero_id_players_get) | **GET** /heroes/{hero_id}/players | GET /heroes/{hero_id}/players
*LeaguesApi* | [**leagues_get**](docs/LeaguesApi.md#leagues_get) | **GET** /leagues | GET /leagues
*LeaguesApi* | [**leagues_league_id_get**](docs/LeaguesApi.md#leagues_league_id_get) | **GET** /leagues/{league_id} | GET /leagues/{league_id}
*LeaguesApi* | [**leagues_league_id_matches_get**](docs/LeaguesApi.md#leagues_league_id_matches_get) | **GET** /leagues/{league_id}/matches | GET /leagues/{league_id}/matches
*LeaguesApi* | [**leagues_league_id_teams_get**](docs/LeaguesApi.md#leagues_league_id_teams_get) | **GET** /leagues/{league_id}/teams | GET /leagues/{league_id}/teams
*LiveApi* | [**live_get**](docs/LiveApi.md#live_get) | **GET** /live | GET /live
*MatchesApi* | [**matches_match_id_get**](docs/MatchesApi.md#matches_match_id_get) | **GET** /matches/{match_id} | GET /matches/{match_id}
*MetadataApi* | [**metadata_get**](docs/MetadataApi.md#metadata_get) | **GET** /metadata | GET /metadata
*ParsedMatchesApi* | [**parsed_matches_get**](docs/ParsedMatchesApi.md#parsed_matches_get) | **GET** /parsedMatches | GET /parsedMatches
*PlayersApi* | [**players_account_id_counts_get**](docs/PlayersApi.md#players_account_id_counts_get) | **GET** /players/{account_id}/counts | GET /players/{account_id}/counts
*PlayersApi* | [**players_account_id_get**](docs/PlayersApi.md#players_account_id_get) | **GET** /players/{account_id} | GET /players/{account_id}
*PlayersApi* | [**players_account_id_heroes_get**](docs/PlayersApi.md#players_account_id_heroes_get) | **GET** /players/{account_id}/heroes | GET /players/{account_id}/heroes
*PlayersApi* | [**players_account_id_histograms_field_get**](docs/PlayersApi.md#players_account_id_histograms_field_get) | **GET** /players/{account_id}/histograms/{field} | GET /players/{account_id}/histograms
*PlayersApi* | [**players_account_id_matches_get**](docs/PlayersApi.md#players_account_id_matches_get) | **GET** /players/{account_id}/matches | GET /players/{account_id}/matches
*PlayersApi* | [**players_account_id_peers_get**](docs/PlayersApi.md#players_account_id_peers_get) | **GET** /players/{account_id}/peers | GET /players/{account_id}/peers
*PlayersApi* | [**players_account_id_pros_get**](docs/PlayersApi.md#players_account_id_pros_get) | **GET** /players/{account_id}/pros | GET /players/{account_id}/pros
*PlayersApi* | [**players_account_id_rankings_get**](docs/PlayersApi.md#players_account_id_rankings_get) | **GET** /players/{account_id}/rankings | GET /players/{account_id}/rankings
*PlayersApi* | [**players_account_id_ratings_get**](docs/PlayersApi.md#players_account_id_ratings_get) | **GET** /players/{account_id}/ratings | GET /players/{account_id}/ratings
*PlayersApi* | [**players_account_id_recent_matches_get**](docs/PlayersApi.md#players_account_id_recent_matches_get) | **GET** /players/{account_id}/recentMatches | GET /players/{account_id}/recentMatches
*PlayersApi* | [**players_account_id_refresh_post**](docs/PlayersApi.md#players_account_id_refresh_post) | **POST** /players/{account_id}/refresh | POST /players/{account_id}/refresh
*PlayersApi* | [**players_account_id_totals_get**](docs/PlayersApi.md#players_account_id_totals_get) | **GET** /players/{account_id}/totals | GET /players/{account_id}/totals
*PlayersApi* | [**players_account_id_wardmap_get**](docs/PlayersApi.md#players_account_id_wardmap_get) | **GET** /players/{account_id}/wardmap | GET /players/{account_id}/wardmap
*PlayersApi* | [**players_account_id_wl_get**](docs/PlayersApi.md#players_account_id_wl_get) | **GET** /players/{account_id}/wl | GET /players/{account_id}/wl
*PlayersApi* | [**players_account_id_wordcloud_get**](docs/PlayersApi.md#players_account_id_wordcloud_get) | **GET** /players/{account_id}/wordcloud | GET /players/{account_id}/wordcloud
*PlayersByRankApi* | [**players_by_rank_get**](docs/PlayersByRankApi.md#players_by_rank_get) | **GET** /playersByRank | GET /playersByRank
*ProMatchesApi* | [**pro_matches_get**](docs/ProMatchesApi.md#pro_matches_get) | **GET** /proMatches | GET /proMatches
*ProPlayersApi* | [**pro_players_get**](docs/ProPlayersApi.md#pro_players_get) | **GET** /proPlayers | GET /proPlayers
*PublicMatchesApi* | [**public_matches_get**](docs/PublicMatchesApi.md#public_matches_get) | **GET** /publicMatches | GET /publicMatches
*RankingsApi* | [**rankings_get**](docs/RankingsApi.md#rankings_get) | **GET** /rankings | GET /rankings
*RecordsApi* | [**records_field_get**](docs/RecordsApi.md#records_field_get) | **GET** /records/{field} | GET /records/{field}
*ReplaysApi* | [**replays_get**](docs/ReplaysApi.md#replays_get) | **GET** /replays | GET /replays
*RequestApi* | [**request_job_id_get**](docs/RequestApi.md#request_job_id_get) | **GET** /request/{jobId} | GET /request/{jobId}
*RequestApi* | [**request_match_id_post**](docs/RequestApi.md#request_match_id_post) | **POST** /request/{match_id} | POST /request/{match_id}
*ScenariosApi* | [**scenarios_item_timings_get**](docs/ScenariosApi.md#scenarios_item_timings_get) | **GET** /scenarios/itemTimings | GET /scenarios/itemTimings
*ScenariosApi* | [**scenarios_lane_roles_get**](docs/ScenariosApi.md#scenarios_lane_roles_get) | **GET** /scenarios/laneRoles | GET /scenarios/laneRoles
*ScenariosApi* | [**scenarios_misc_get**](docs/ScenariosApi.md#scenarios_misc_get) | **GET** /scenarios/misc | GET /scenarios/misc
*SchemaApi* | [**schema_get**](docs/SchemaApi.md#schema_get) | **GET** /schema | GET /schema
*SearchApi* | [**search_get**](docs/SearchApi.md#search_get) | **GET** /search | GET /search
*StatusApi* | [**status_get**](docs/StatusApi.md#status_get) | **GET** /status | GET /status
*TeamsApi* | [**teams_get**](docs/TeamsApi.md#teams_get) | **GET** /teams | GET /teams
*TeamsApi* | [**teams_team_id_get**](docs/TeamsApi.md#teams_team_id_get) | **GET** /teams/{team_id} | GET /teams/{team_id}
*TeamsApi* | [**teams_team_id_heroes_get**](docs/TeamsApi.md#teams_team_id_heroes_get) | **GET** /teams/{team_id}/heroes | GET /teams/{team_id}/heroes
*TeamsApi* | [**teams_team_id_matches_get**](docs/TeamsApi.md#teams_team_id_matches_get) | **GET** /teams/{team_id}/matches | GET /teams/{team_id}/matches
*TeamsApi* | [**teams_team_id_players_get**](docs/TeamsApi.md#teams_team_id_players_get) | **GET** /teams/{team_id}/players | GET /teams/{team_id}/players


## Documentation For Models

 - [BenchmarksResponse](docs/BenchmarksResponse.md)
 - [BenchmarksResponseResult](docs/BenchmarksResponseResult.md)
 - [BenchmarksResponseResultGoldPerMinInner](docs/BenchmarksResponseResultGoldPerMinInner.md)
 - [DistributionsResponse](docs/DistributionsResponse.md)
 - [DistributionsResponseCountryMmr](docs/DistributionsResponseCountryMmr.md)
 - [DistributionsResponseCountryMmrFieldsInner](docs/DistributionsResponseCountryMmrFieldsInner.md)
 - [DistributionsResponseCountryMmrRowsInner](docs/DistributionsResponseCountryMmrRowsInner.md)
 - [DistributionsResponseMmr](docs/DistributionsResponseMmr.md)
 - [DistributionsResponseRanks](docs/DistributionsResponseRanks.md)
 - [DistributionsResponseRanksFieldsInner](docs/DistributionsResponseRanksFieldsInner.md)
 - [DistributionsResponseRanksRowsInner](docs/DistributionsResponseRanksRowsInner.md)
 - [DistributionsResponseRanksSum](docs/DistributionsResponseRanksSum.md)
 - [HeroDurationsResponse](docs/HeroDurationsResponse.md)
 - [HeroItemPopularityResponse](docs/HeroItemPopularityResponse.md)
 - [HeroItemPopularityResponseEarlyGameItems](docs/HeroItemPopularityResponseEarlyGameItems.md)
 - [HeroItemPopularityResponseLateGameItems](docs/HeroItemPopularityResponseLateGameItems.md)
 - [HeroItemPopularityResponseMidGameItems](docs/HeroItemPopularityResponseMidGameItems.md)
 - [HeroItemPopularityResponseStartGameItems](docs/HeroItemPopularityResponseStartGameItems.md)
 - [HeroMatchupsResponse](docs/HeroMatchupsResponse.md)
 - [HeroObjectResponse](docs/HeroObjectResponse.md)
 - [HeroStatsResponse](docs/HeroStatsResponse.md)
 - [LeagueObjectResponse](docs/LeagueObjectResponse.md)
 - [MatchObjectResponse](docs/MatchObjectResponse.md)
 - [MatchResponse](docs/MatchResponse.md)
 - [MatchResponseChatInner](docs/MatchResponseChatInner.md)
 - [MatchResponseDraftTimingsInner](docs/MatchResponseDraftTimingsInner.md)
 - [MatchResponsePlayersInner](docs/MatchResponsePlayersInner.md)
 - [MatchResponsePlayersInnerBuybackLogInner](docs/MatchResponsePlayersInnerBuybackLogInner.md)
 - [MatchResponsePlayersInnerConnectionLogInner](docs/MatchResponsePlayersInnerConnectionLogInner.md)
 - [MatchResponsePlayersInnerKillsLogInner](docs/MatchResponsePlayersInnerKillsLogInner.md)
 - [MatchResponsePlayersInnerPurchaseLogInner](docs/MatchResponsePlayersInnerPurchaseLogInner.md)
 - [MatchResponsePlayersInnerRunesLogInner](docs/MatchResponsePlayersInnerRunesLogInner.md)
 - [MetadataResponse](docs/MetadataResponse.md)
 - [ParsedMatchesResponse](docs/ParsedMatchesResponse.md)
 - [PlayerCountsResponse](docs/PlayerCountsResponse.md)
 - [PlayerHeroesResponse](docs/PlayerHeroesResponse.md)
 - [PlayerMatchesResponse](docs/PlayerMatchesResponse.md)
 - [PlayerObjectResponse](docs/PlayerObjectResponse.md)
 - [PlayerPeersResponse](docs/PlayerPeersResponse.md)
 - [PlayerProsResponse](docs/PlayerProsResponse.md)
 - [PlayerRankingsResponse](docs/PlayerRankingsResponse.md)
 - [PlayerRatingsResponse](docs/PlayerRatingsResponse.md)
 - [PlayerRecentMatchesResponse](docs/PlayerRecentMatchesResponse.md)
 - [PlayerResponse](docs/PlayerResponse.md)
 - [PlayerResponseMmrEstimate](docs/PlayerResponseMmrEstimate.md)
 - [PlayerResponseProfile](docs/PlayerResponseProfile.md)
 - [PlayerTotalsResponse](docs/PlayerTotalsResponse.md)
 - [PlayerWardMapResponse](docs/PlayerWardMapResponse.md)
 - [PlayerWinLossResponse](docs/PlayerWinLossResponse.md)
 - [PlayerWordCloudResponse](docs/PlayerWordCloudResponse.md)
 - [PlayersByRankResponse](docs/PlayersByRankResponse.md)
 - [PublicMatchesResponse](docs/PublicMatchesResponse.md)
 - [RankingsResponse](docs/RankingsResponse.md)
 - [RankingsResponseRankings](docs/RankingsResponseRankings.md)
 - [RecordsResponse](docs/RecordsResponse.md)
 - [ReplaysResponse](docs/ReplaysResponse.md)
 - [ScenarioItemTimingsResponse](docs/ScenarioItemTimingsResponse.md)
 - [ScenarioLaneRolesResponse](docs/ScenarioLaneRolesResponse.md)
 - [ScenarioMiscResponse](docs/ScenarioMiscResponse.md)
 - [SchemaResponse](docs/SchemaResponse.md)
 - [SearchResponse](docs/SearchResponse.md)
 - [TeamHeroesResponse](docs/TeamHeroesResponse.md)
 - [TeamObjectResponse](docs/TeamObjectResponse.md)
 - [TeamPlayersResponse](docs/TeamPlayersResponse.md)


## Documentation For Authorization


## api_key

- **Type**: API key
- **API key parameter name**: api_key
- **Location**: URL query string


## Author




## Notes for Large OpenAPI documents
If the OpenAPI document is large, imports in python_opendota.apis and python_opendota.models may fail with a
RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions:

Solution 1:
Use specific imports for apis and models like:
- `from python_opendota.api.default_api import DefaultApi`
- `from python_opendota.model.pet import Pet`

Solution 2:
Before importing the package, adjust the maximum recursion limit as shown below:
```
import sys
sys.setrecursionlimit(1500)
import python_opendota
from python_opendota.apis import *
from python_opendota.models import *
```


