ranobelib-python-sdk 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,100 @@
1
+ Metadata-Version: 2.4
2
+ Name: ranobelib-python-sdk
3
+ Version: 0.1.0
4
+ Summary: Async Python SDK for ranobelib.me: title metadata, chapter/volume downloads, and export to epub/fb2/txt/pdf
5
+ Keywords: ranobelib,ranobe,novel,webnovel,epub,fb2,sdk
6
+ Author: LLIJIYAPNIK
7
+ Author-email: LLIJIYAPNIK <kas4wot@yandex.ru>
8
+ License-Expression: MIT
9
+ Classifier: Development Status :: 2 - Pre-Alpha
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
17
+ Classifier: Typing :: Typed
18
+ Requires-Dist: ebooklib>=0.20
19
+ Requires-Dist: httpx>=0.27
20
+ Requires-Dist: pydantic>=2.7
21
+ Requires-Dist: weasyprint>=69.0
22
+ Requires-Python: >=3.11
23
+ Project-URL: Homepage, https://github.com/LLIJIYAPNIK/ranobelib-python-sdk
24
+ Project-URL: Repository, https://github.com/LLIJIYAPNIK/ranobelib-python-sdk
25
+ Project-URL: Issues, https://github.com/LLIJIYAPNIK/ranobelib-python-sdk/issues
26
+ Description-Content-Type: text/markdown
27
+
28
+ # ranobelib-python-sdk
29
+
30
+ [![PyPI](https://img.shields.io/pypi/v/ranobelib-python-sdk)](https://pypi.org/project/ranobelib-python-sdk/)
31
+ [![License: MIT](https://img.shields.io/github/license/LLIJIYAPNIK/ranobelib-python-sdk)](LICENSE)
32
+ [![Python versions](https://img.shields.io/badge/python-3.11%20%7C%203.12%20%7C%203.13-blue)](pyproject.toml)
33
+ [![CI](https://github.com/LLIJIYAPNIK/ranobelib-python-sdk/actions/workflows/ci.yml/badge.svg)](https://github.com/LLIJIYAPNIK/ranobelib-python-sdk/actions/workflows/ci.yml)
34
+ [![Coverage Status](https://coveralls.io/repos/github/LLIJIYAPNIK/ranobelib-python-sdk/badge.svg?branch=main)](https://coveralls.io/github/LLIJIYAPNIK/ranobelib-python-sdk?branch=main)
35
+ [![Docs](https://github.com/LLIJIYAPNIK/ranobelib-python-sdk/actions/workflows/docs.yml/badge.svg)](https://github.com/LLIJIYAPNIK/ranobelib-python-sdk/actions/workflows/docs.yml)
36
+
37
+ Async Python SDK for [ranobelib.me](https://ranobelib.me): fetch title metadata, download
38
+ chapters and volumes, and export to epub, fb2, txt, or pdf.
39
+
40
+ The SDK talks to the undocumented but open JSON API behind the site (`api.cdnlibs.org`,
41
+ part of the lib.social network) instead of scraping HTML.
42
+
43
+ > **Status:** all the calls in the quickstart below are implemented — metadata, table of
44
+ > contents, single/bulk chapter and volume downloads, translation selection, and export to
45
+ > `"txt"`, `"fb2"`, `"epub"`, or `"pdf"` (cover + in-chapter illustrations embedded in
46
+ > epub/pdf). Raw API responses are cached to disk, and the underlying client bounds
47
+ > concurrency, paces requests, and retries 429/5xx with backoff. `fmt="pdf"` needs
48
+ > WeasyPrint's native dependencies (Pango/cairo/GTK3) installed on the system — `pip
49
+ > install`/`uv add` alone doesn't guarantee that on every platform; without them,
50
+ > `export(fmt="pdf")` raises the same "unknown format" error the other three formats don't.
51
+ > Authorization (private/18+/paid content) is out of scope — see `CLAUDE.md` for the full
52
+ > architecture and design decisions behind all of this.
53
+
54
+ ## Installation
55
+
56
+ ```bash
57
+ uv add ranobelib-python-sdk
58
+ ```
59
+
60
+ or
61
+
62
+ ```bash
63
+ pip install ranobelib-python-sdk
64
+ ```
65
+
66
+ Requires Python 3.11+.
67
+
68
+ ## Quickstart
69
+
70
+ ```python
71
+ from ranobelib import RanobeLib
72
+
73
+ async with RanobeLib("https://ranobelib.me/ru/book/6712--high-school-dxd-novel") as lib:
74
+ info = await lib.get_info()
75
+ toc = await lib.get_table_of_contents()
76
+
77
+ chapter = await lib.get_chapter(volume=6, number="51.6")
78
+ volume = await lib.get_volume(volume=6)
79
+
80
+ chapters = await lib.get_chapters([(6, "51.6"), (6, "52")])
81
+ volumes = await lib.get_volumes([1, 2, 3])
82
+
83
+ translations = await lib.get_translations(volume=6, number="51.6")
84
+ chapter = await lib.get_chapter(volume=6, number="51.6", branch_id=...)
85
+
86
+ await lib.export(chapters, fmt="epub", path="output.epub")
87
+ ```
88
+
89
+ This is the full current public API — everything above is implemented and works today.
90
+
91
+ ## Documentation
92
+
93
+ Full API reference and guides: **<https://LLIJIYAPNIK.github.io/ranobelib-python-sdk/>**
94
+ (built with `mkdocs-material` + `mkdocstrings`, deployed on push to `main`). `CLAUDE.md`
95
+ documents the full architecture, public API contract, and the reasoning behind the SDK's
96
+ design decisions.
97
+
98
+ ## License
99
+
100
+ MIT — see [LICENSE](LICENSE).
@@ -0,0 +1,18 @@
1
+ ranobelib/__init__.py,sha256=AqY5cCbkQ46mcXMZKDgOPyPpG-0KnjzKeLzBi_m5Rxs,629
2
+ ranobelib/cache.py,sha256=21SGf2g1l2tkaXmPu24j91gYfmsIyX5_ZPhdmLxd6xc,2490
3
+ ranobelib/client.py,sha256=LhX5sdTspIW_8VKVSxt-SWHCaMSZw-Nq5ZvMXVDIGGA,8255
4
+ ranobelib/exceptions.py,sha256=H5LVxgq5hpCfIblkvbDV1rfCa3KAYv-cu7tpZ6JTfHE,4027
5
+ ranobelib/exporters/__init__.py,sha256=F3LXOmiKwJhxfBS41fgYVuipw1MSd7ug5KQtVIAGt1Q,1966
6
+ ranobelib/exporters/_illustrations.py,sha256=Dx0RsW196HiWVUE0vTnESGhwZbKVfmmJPLc37rdzoaw,6651
7
+ ranobelib/exporters/_shared.py,sha256=hQIIrrXTSScBsNKAUPU3H2KFmRhff2ZYYPBDUIy64pI,438
8
+ ranobelib/exporters/epub.py,sha256=sBQ7lPpiOIcYPAev5-vsxdf_NzAd1CgYPNDrjw-PL3U,4229
9
+ ranobelib/exporters/fb2.py,sha256=G4d_67EJNpiT1xHU6nPEdYjLeA2rmzOZxT8aiD3z-sA,6297
10
+ ranobelib/exporters/pdf.py,sha256=dAEfZKhI7hV5dRkfjXrjrXuGJ5ZXuKcPNbnzoP5n3uY,6087
11
+ ranobelib/exporters/txt.py,sha256=nXqLTYs8RynlIePe8vOdTQOF135z2kotugrXid7Te4Q,2962
12
+ ranobelib/models.py,sha256=xdB-GR_PwvGkEws0KdNFPqx3v-ip2RjKlQPTHh90XrE,8079
13
+ ranobelib/numbering.py,sha256=fL0oMRI1d_BdXasf6ImX7wsjMRYRydzub0SmBLUWCKY,1106
14
+ ranobelib/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
+ ranobelib/sdk.py,sha256=lr-Pl2o2JFvng79o9yFoIn8ypSCdkxT5-aeQiUVTtAQ,12859
16
+ ranobelib_python_sdk-0.1.0.dist-info/WHEEL,sha256=q9Wah2_CgP24mRNSlTyb0F8Yrbz55SzVl8eHLkZ_wvE,80
17
+ ranobelib_python_sdk-0.1.0.dist-info/METADATA,sha256=zsewgQzy39NX0ndol4Qu1JM3xxd2KQ0y80r8w6ULqrA,4437
18
+ ranobelib_python_sdk-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: uv 0.12.2
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any