Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ berserk
:alt: Documentation Status


Python client for the `Lichess API`_.
Python client for the `Lichess API`_ (modified).

.. _Lichess API: https://lichess.org/api

Expand Down
83 changes: 83 additions & 0 deletions Test.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "canadian-savage",
"metadata": {},
"outputs": [],
"source": [
"import berserk"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "worldwide-talent",
"metadata": {},
"outputs": [],
"source": [
"\n",
"session = berserk.TokenSession(\"lip_WemfGeUdnPbJTOoKndeV\")\n",
"client = berserk.Client(session=session)\n"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "deadly-wagner",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'qLV4LUK4'"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"client.games.import_game(\"\"\"[Event \"🕸️ Opening Traps 🕸️: Fishing Pole Trap\"]\n",
"[Site \"https://lichess.org/study/Of3mcPk8/NHPhHyxK\"]\n",
"[Date \"????.??.??\"]\n",
"[Result \"*\"]\n",
"[FEN \"rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1\"]\n",
"[UTCDate \"2016.07.21\"]\n",
"[UTCTime \"14:05:49\"]\n",
"[Variant \"Standard\"]\n",
"[ECO \"C65\"]\n",
"[Opening \"Ruy Lopez: Berlin Defense, Fishing Pole Variation\"]\n",
"[Annotator \"https://lichess.org/@/Toxenory\"]\n",
"\n",
"1. e4 e5 2. Nf3 Nc6 3. Bb5 Nf6 4. O-O Ng4 5. h3 h5 6. hxg4 hxg4 7. Ne1 Qh4 8. f3 g3 { [%csl Gf2][%cal Gg3f2] } 9. Bxc6 Qh1# *\n",
"\n",
"\n",
"\"\"\")"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.2"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
10 changes: 5 additions & 5 deletions berserk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@


from .clients import Client # noqa: F401
from .session import TokenSession # noqa: F401
from .session import Requestor # noqa: F401
from .enums import PerfType # noqa: F401
from .enums import Variant # noqa: F401
from .enums import Color # noqa: F401
from .enums import Room # noqa: F401
from .enums import Mode # noqa: F401
from .enums import PerfType # noqa: F401
from .enums import Position # noqa: F401
from .enums import Room # noqa: F401
from .enums import Variant # noqa: F401
from .formats import JSON # noqa: F401
from .formats import LIJSON # noqa: F401
from .formats import NDJSON # noqa: F401
from .formats import PGN # noqa: F401
from .session import Requestor # noqa: F401
from .session import TokenSession # noqa: F401
Loading