Package: kavitapy
A python wrapper for the Kavita APITable of ContentsInstallationUsagePlugin authenticationHTTP Status CodeReturned Contents/api/Reader endpoints/api/Library endpoints/api/Series endpointsVersioningInstallationUse pip in your terminal of choice.$ python -m pip install kavitapyThis library requires Python 3. Testing is done on Python 3.10UsageImport the package usingimportkavitapyPlugin authenticationPlugin authentication is done automatically whenever you call an object or one of its methods.For example:kavitapy.Reader("url","apikey")Your token can also be accessed.kavitapy.Reader("url","apikey").tokenReplaceurlwith your server address. Make sure to includehttp://orhttps://.Replaceapikeywith your user's API key. You can find it under the 3rd Party Clients tab in your user settings in the webinterface.HTTP Status CodeAny method returns the full http response. Use.status_codeto view the returned status codekavitapy.Reader("url","apikey").status_codekavitapy.Reader("url","apikey").chapter_info(ChapterID(Int)).status_codeReturned ContentsMany of the methods return not only as status code, but also other content. For example, a list of Books or Manga matching a particular query.Use.contentto view the raw responsekavitapy.Library("url","apikey").search(Query(String)).contentOften times the response content can also be parsed by decoding it with.json()...importjson...kavitapy.Library("url","apikey").search(Query(String)).json()/api/Reader endpointsReturn information about a single chapterkavitapy.Reader("url","apikey").chapter_info(Chapter(Int))Return content: JsonMark all series in the list as read or unreadkavitapy.Reader("url","apikey").mark_multiple_series("operation",Series(List))operationcan be eitherreadorunread.Return content: NoneMark all series in the list as readkavitapy.Reader("url","apikey").mark_multiple_series_read(Series(List))Return content: NoneMark all series in the list as unreadkavitapy.Reader("url","apikey").mark_multiple_series_unread(Series(List))Return content: NoneReturn progress for a chapterkavitapy.Reader("url","apikey").get_progress(Chapter(Int))Return content: JsonSet reading progress on chapterkavitapy.Reader("url","apikey").progress(Series(Int),Volume(Int),Chapter(Int),Page(Int),[Bookscroll(String)])SettingBookscrollis optionalReturn content: JsonReturn the current progress on a serieskavitapy.Reader("url","apikey").continue_point(Series(Int))Return content: Json/api/Library endpointsReturn all librarieskavitapy.Library("url","apikey").contentReturn content: JsonScan the given librarykavitapy.Library("url","apikey").scan(Library(int))Return content: NoneSearch series by namekavitapy.Library("url","apikey").search(Query(String))Return content: Json/api/Series endpointsReturn all series. Allows you to specify a variety of filterskavitapy.Series("url","apikey").default([Library(Int)],[PageNumber(Int)],[PageSize(Int)],[ReadStatus(Dict)],[RequestBody(Dict)])This method does not require any parameters.The Parameters RequestBody and ReadStatus are mutually exclusive.This is the format for ReadStatus{"unread": True,
 "in_progress": True,
 "read": True}See the official API Documentation for RequestBodyReturn content: JsonReturn all volumes, chapters and page progress for a serieskavitapy.Series("url","apikey").volumes(Series(Int))Return content: JsonReturn information about the given volumekavitapy.Series("url","apikey").volume(Volume(Int))Return content: JsonVersioningThis project aims to follow thePEP 440 specificationversioning.