File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33LPDB-python provides Python interfaces for the [ Liquipedia Database API] ( https://liquipedia.net/api ) (LPDB API).
44
5+ ## LPDB Session
6+
7+ Python wrapper for LPDB session is defined in [ session.py] ( src/lpdb/session.py ) . The wrapper provides the following
8+ differences from making your own requests:
9+
10+ - Type hints
11+ - Validation of data type names being requested
12+ If an invalid data type is supplied, then the session will raise ` ValueError ` before attempting to make a request.
13+ - Error / warning handling
14+ If an error is returned by LPDB, then they will be converted to and raised as a Python exception.
15+ - Pre-configured request header, including formatting of your API key in the request header
16+
17+ ``` python
18+ import lpdb
19+
20+ # These are equivalent
21+ session = lpdb.LpdbSession(" your_lpdb_api_key" )
22+ session = lpdb.LpdbSession(" Apikey your_lpdb_api_key" )
23+ ```
24+
525## LPDB Data Types
626
727Data types in LPDB can be found in < https://liquipedia.net/commons/Help:LiquipediaDB > .
You can’t perform that action at this time.
0 commit comments