ranobelib-python-sdk
Async Python SDK for ranobelib.me: fetch title metadata, download chapters and volumes, and export to epub, fb2, txt, or pdf.
The SDK talks to the undocumented but open JSON API behind the site (api.cdnlibs.org,
part of the lib.social network) instead of scraping HTML.
Status: all the calls in the quickstart below are implemented — metadata, table of contents, single/bulk chapter and volume downloads, whole-title bulk download, translation selection, and export to
"txt","fb2","epub", or"pdf"(cover + in-chapter illustrations embedded in epub/pdf). Raw API responses are cached to disk, and the underlying client bounds concurrency, paces requests, and retries 429/5xx with backoff.fmt="pdf"needs WeasyPrint's native dependencies (Pango/cairo/GTK3) installed on the system —pip install/uv addalone doesn't guarantee that on every platform; without them,export(fmt="pdf")raises the same "unknown format" error the other three formats don't. Authorization (private/18+/paid content) is out of scope — seeCLAUDE.mdfor the full architecture and design decisions behind all of this.
Installation
uv add ranobelib-python-sdk
or
pip install ranobelib-python-sdk
Requires Python 3.11+.
Quickstart
from ranobelib import RanobeLib
async with RanobeLib("https://ranobelib.me/ru/book/6712--high-school-dxd-novel") as lib:
info = await lib.get_info()
toc = await lib.get_table_of_contents()
chapter = await lib.get_chapter(volume=6, number="51.6")
volume = await lib.get_volume(volume=6)
chapters = await lib.get_chapters([(6, "51.6"), (6, "52")])
volumes = await lib.get_volumes([1, 2, 3])
translations = await lib.get_translations(volume=6, number="51.6")
chapter = await lib.get_chapter(volume=6, number="51.6", branch_id=...)
all_volumes = await lib.download_title(translation_index=0, chapter_delay=0.5)
await lib.export(chapters, fmt="epub", path="output.epub")
This is the full current public API — everything above is implemented and works today.
Examples
Complete, runnable scripts for every feature above — title metadata, table of contents,
single/bulk chapter and volume downloads, translation selection, whole-title bulk download,
disk caching, export to all four formats, and error handling — live in
examples/, one heavily commented file per feature. Start there for
copy-pasteable code.
Documentation
Full API reference and guides: https://LLIJIYAPNIK.github.io/ranobelib-python-sdk/
(built with mkdocs-material + mkdocstrings, deployed on push to main). CLAUDE.md
documents the full architecture, public API contract, and the reasoning behind the SDK's
design decisions. CHANGELOG.md lists what changed in each release.
License
MIT — see LICENSE.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ranobelib_python_sdk-0.7.0.tar.gz.
File metadata
- Download URL: ranobelib_python_sdk-0.7.0.tar.gz
- Upload date:
- Size: 32.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d00048cf9104f66df42fef4715b5d682b00ab91a3f5632d8bee6c0fb56400371
|
|
| MD5 |
e5631e43c068d67292cf5990f34c91fa
|
|
| BLAKE2b-256 |
d428f2125c61f1a41c8ba5a5b67494fc27309603f9cfbe093ca9b4298394b01d
|
File details
Details for the file ranobelib_python_sdk-0.7.0-py3-none-any.whl.
File metadata
- Download URL: ranobelib_python_sdk-0.7.0-py3-none-any.whl
- Upload date:
- Size: 42.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd07e661464a5b125bc5d9f400c849588a4934e0e82bec5f65ff68aeec6a51d1
|
|
| MD5 |
8e9463cdfde0ec76f1424ed026447c90
|
|
| BLAKE2b-256 |
e6745f697c768d0427438edbc9687ccce6702f9d91322c2598354c191a43bb4d
|