Skip to main content

Python client for the lichess API

Project description

berserk

https://img.shields.io/pypi/v/berserk.svg https://img.shields.io/travis/rhgrant10/berserk.svg Documentation Status

Python client for the lichess API

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.get_export()
lichess.games.stream_exports()
lichess.games.stream_exports_by_id()
lichess.games.stream_by_users()
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()

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

0.1.0 (2018-07-10)

  • First release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

berserk-0.1.0.tar.gz (19.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

berserk-0.1.0-py2.py3-none-any.whl (10.5 kB view details)

Uploaded Python 2Python 3

File details

Details for the file berserk-0.1.0.tar.gz.

File metadata

  • Download URL: berserk-0.1.0.tar.gz
  • Upload date:
  • Size: 19.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for berserk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 97f11a7efb72abb06203458a2c11aaec458e40fe188d09622300cc6c088c9543
MD5 c7316968896c180c9f0f31aa24410b32
BLAKE2b-256 8c199b9ecd5c48673bc3c66de71196cae217f46e2a298b2d59a8ae8cae001216

See more details on using hashes here.

File details

Details for the file berserk-0.1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for berserk-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 839a2771f7ad9d2235c827c998be7f10d619f1c27d4388cb93b63eef664ea3df
MD5 140f3467a6179b8ba649913f89c6f924
BLAKE2b-256 67eaa737e75956044c8f790c47a0ca2d8a7fed80950c2659811617b3e739553f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page