This package is meant to be an unofficial Python API Client for lichess.org.
For information about the API please refer to https://lichess.org/api
Every API endpoint uses async Python methods (asyncio).
Installation
Pypi:
pip install async-lichess-sdk
Test Pypi:
pip install -i https://test.pypi.org/simple/ async-lichess-sdk
Documentation
Sample Notebook
Dependencies
To use this package you need to install all of the dependencies located under requirements.txt.
pip install requirements.txt
Supported python versions: python >= 3.6
How to build
Building script is located under build.sh.
Steps:
sh build.sh
pip install -U .
Implemented Lichess Endpoints
- account
- boards
- bots
- broadcast
- challenges
- games
- messages
- relations
- simulations
- studies
- teams
- tournaments
- users
Sample usage
Client initialization and usage
import asyncio
from lichess_client import APIClient
async def main():
client = APIClient(token="your_lichess_account_token")
response = await client.account.get_my_profile()
print(response)
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
.....
{'metadata':
{'method': <RequestMethods.GET: 'GET'>,
'url': 'https://lichess.org/api/account/kid',
'content_type': 'application/json',
'timestamp': b'Fri, 13 Mar 2020 19:05:27 GMT'},
'entity':
{'code': 200,
'reason': 'OK',
'status': <StatusTypes.SUCCESS: 'success'>,
'content': {'kid': False}
}
}
Access to the response properties
print(response.metadata.timestamp)
b'Fri, 13 Mar 2020 19:11:32 GMT'
print(response.entity.content)
{'kid': False}
Release files for async-lichess-sdk 1.1.0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| async_lichess_sdk-1.1.0.7.tar.gz | 25.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| async_lichess_sdk-1.1.0.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 79.7 kB
Release files / async_lichess_sdk-1.1.0.7.tar.gz
| Download URL | async_lichess_sdk-1.1.0.7.tar.gz |
|---|---|
| Size | 25.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0247c744c599568fc6eb5034740207e3c59527414c6d10e44bdbbe1f194b8ada
|
|
BLAKE2b-256 checksum How to use checksums |
8f55437b2860692da552fa4f8d77ec9a35ce02e15387fb89f3f7df98bd3f6c12
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7
|
Release files / async_lichess_sdk-1.1.0.7-py3-none-any.whl
| Download URL | async_lichess_sdk-1.1.0.7-py3-none-any.whl |
|---|---|
| Size | 54.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b07c00ef8fc184e13bbb018c932484182c8784a5855aac11a16a6d3031548e94
|
|
BLAKE2b-256 checksum How to use checksums |
1906d894ec76e85026a34f9776f1630c61b12fc2515a6681279232fd22c0386d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7
|