Python client for the lichess API
Project description
berserk
Python client for the lichess API
Free software: GNU General Public License v3
Documentation: https://berserk.readthedocs.io.
Features
handles JSON and PGN formats at user’s discretion
all endpoints implemented
token auth support provided
easy integration with oauth2
Usage
You can use any requests.Session-like object as a session, including those from requests_oauth. A simple token session is included, as shown below:
import berserk
session = berserk.TokenSession('token')
lichess = berserk.Client(session)
lichess.account.get()
lichess.account.get_email()
lichess.account.get_preferences()
lichess.account.get_kid_mode()
lichess.account.set_kid_mode()
lichess.account.upgrade_to_bot()
lichess.users.get_realtime_statuses()
lichess.users.get_all_top_10()
lichess.users.get_leaderboard()
lichess.users.get_public_data()
lichess.users.get_activity_feed()
lichess.users.get_by_id()
lichess.users.get_by_team()
lichess.users.get_live_streamers()
lichess.games.export()
lichess.games.export_by_player()
lichess.games.export_multi()
lichess.games.get_among_players()
lichess.games.get_ongoing()
lichess.games.get_tv_channels()
lichess.bots.stream_incoming_events()
lichess.bots.stream_game_state()
lichess.bots.make_move()
lichess.bots.post_message()
lichess.bots.abort_game()
lichess.bots.resign_game()
lichess.bots.accept_challenge()
lichess.bots.decline_challenge()
lichess.tournaments.get()
lichess.tournaments.create()
Details for each function can be found in the full documentation.
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
History
0.2.0 (2018-12-08)
Add position and start_date params to Tournament.create
Add Position enum
0.1.2 (2018-07-14)
Fix an asine bug in the docs
0.1.1 (2018-07-14)
Added tests for session and formats modules
Fixed mispelled PgnHandler class (!)
Fixed issue with trailing whitespace when splitting multiple PGN texts
Fixed the usage overview in the README
Fixed the versions for travis-ci
Made it easier to test the JsonHandler class
Salted the bumpversion config to taste
0.1.0 (2018-07-10)
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
File details
Details for the file berserk-0.2.0.tar.gz
.
File metadata
- Download URL: berserk-0.2.0.tar.gz
- Upload date:
- Size: 23.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.10.0 pkginfo/1.4.2 requests/2.18.4 setuptools/28.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9a82604434c0137d15b87bb1ab676b1254c33a86839dd3dbb215533becee75e |
|
MD5 | cfb949b216f256d46829b150c1b21df2 |
|
BLAKE2b-256 | 3159f4c3b3024ea9e9fb1d398b06f06043b0152c3bc0e1360295c5676573b231 |
Provenance
File details
Details for the file berserk-0.2.0-py2.py3-none-any.whl
.
File metadata
- Download URL: berserk-0.2.0-py2.py3-none-any.whl
- Upload date:
- Size: 13.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.10.0 pkginfo/1.4.2 requests/2.18.4 setuptools/28.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2e30cb465e8894472ba7423037e78f61bca8afc9e9b5cc7fe712cd25ee1b18b |
|
MD5 | 2967f0b44ad603970f173d465ec98df7 |
|
BLAKE2b-256 | b81f642b1d5b7b9902a75a7d7e54b972c95bc3c0c27542bf12af8ddc1c4387dc |