Metadata-Version: 2.1
Name: berserk
Version: 0.4.0
Summary: Python client for the lichess API
Home-page: https://github.com/rhgrant10/berserk
Author: Robert Grant
Author-email: rhgrant10@gmail.com
License: GNU General Public License v3
Keywords: berserk
Platform: UNKNOWN
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Requires-Dist: requests (~=2.20)
Requires-Dist: ndjson (~=0.2)

=======
berserk
=======


.. image:: https://img.shields.io/pypi/v/berserk.svg
        :target: https://pypi.python.org/pypi/berserk

.. image:: https://img.shields.io/travis/rhgrant10/berserk.svg
        :target: https://travis-ci.org/rhgrant10/berserk

.. image:: https://readthedocs.org/projects/berserk/badge/?version=latest
        :target: https://berserk.readthedocs.io/en/latest/?badge=latest
        :alt: Documentation Status


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:

.. code-block:: python

    import berserk

    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.challenges.create()
    lichess.challenges.accept()
    lichess.challenges.decline()

    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.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage


=======
History
=======

0.4.0 (2020-01-19)
------------------

* Add support for the broadcast endpoints
* Add a utility for easily converting API objects into update params
* Fix multiple bugs with the tournament create endpoint
* Improve the reusability of some conversion utilities
* Improve many docstrings in the client classes


0.3.2 (2020-01-04)
------------------

* Fix bug where options not passed for challenge creation
* Convert requirements from pinned to sematically compatible
* Bump all developer dependencies
* Use pytest instead of the older py.test
* Use py37 in tox


0.3.1 (2018-12-23)
------------------

* Convert datetime string in tournament creation response into datetime object


0.3.0 (2018-12-23)
------------------

* Convert all timestamps to datetime in all responses
* Provide support for challenging other players to a game


0.2.1 (2018-12-08)
------------------

* Bump requests dependency to >=2.20.0 (CVE-2018-18074)


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.


