Metadata-Version: 2.1
Name: lichesspy
Version: 6.0.4.dev4
Summary: Python wrapper for lichess
Home-page: https://github.com/eskopp/lichesspy
Author: eskopp
Author-email: skopp.erik+lichesspy@gmail.com
License: MIT
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests==2.0.0
Requires-Dist: six==1.16.0
Requires-Dist: chess==1.10.0

A client for the lichess.org API
================================================
This is a client library for the Lichess API.
It is designed to be:

* Easy to use

* Customizable when you need it

* Adaptable to API changes

Getting a user's rating:

```python
>>> import lichesspy.api
>>> 
>>> user = lichesspy.api.user('thibault')
>>> print(user['perfs']['blitz']['rating'])
1617
```
Checking who's online and playing:

```python
>>> import lichesspy.api
>>>
>>> users = list(lichesspy.api.users_status(['thibault', 'cyanfish']))
>>> online = [u['id'] for u in users if u.get('online', False)]
>>> playing = [u['id'] for u in users if u.get('playing', False)]
>>> print(online, playing)
['thibault', 'cyanfish'] ['cyanfish']
```

Saving a PGN of a user's last 200 games:

```python
>>> import lichesspy.api
>>> from lichesspy.format import SINGLE_PGN
>>> 
>>> pgn = lichesspy.api.user_games('thibault', max=200, format=SINGLE_PGN)
>>> with open('last200.pgn', 'w') as f:
>>>    f.write(pgn)
```

Integrating with python-chess:

```python
>>> import lichesspy.api
>>> from lichesspy.format import PYCHESS
>>> 
>>> game = lichesspy.api.game('Qa7FJNk2', format=PYCHESS)
>>> print(game.end().board())
. . k . R b r .
. p p r . N p .
p . . . . . . p
. . . . . . . .
. . . p . . . .
P . . P . . . P
. P P . . P P .
. . K R . . . .
```

Installing
----------
```shell
pip install lichesspy
```


# Farewell
