nyora 0.3.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.
- nyora/__init__.py +79 -0
- nyora/assets/__init__.py +1 -0
- nyora/assets/parsers.bundle.js +13078 -0
- nyora/assets/sources.json +2778 -0
- nyora/cli.py +475 -0
- nyora/client.py +380 -0
- nyora/config.py +66 -0
- nyora/direct.py +296 -0
- nyora/errors.py +39 -0
- nyora/helper.py +144 -0
- nyora/models.py +674 -0
- nyora/ota.py +311 -0
- nyora/parser_bridge.py +144 -0
- nyora/py.typed +0 -0
- nyora/runtime.py +955 -0
- nyora/server.py +342 -0
- nyora/services/__init__.py +9 -0
- nyora/services/backup.py +266 -0
- nyora/services/downloads.py +138 -0
- nyora/services/library.py +288 -0
- nyora/services/manga.py +242 -0
- nyora/services/sources.py +124 -0
- nyora/services/system.py +5 -0
- nyora-0.3.0.dist-info/METADATA +329 -0
- nyora-0.3.0.dist-info/RECORD +30 -0
- nyora-0.3.0.dist-info/WHEEL +4 -0
- nyora-0.3.0.dist-info/entry_points.txt +4 -0
- nyora_tui/__init__.py +1 -0
- nyora_tui/app.py +745 -0
- nyora_tui/py.typed +0 -0
nyora/__init__.py
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"""Nyora Python SDK — the importable ``nyora`` library.
|
|
2
|
+
|
|
3
|
+
Nyora is a self-contained manga sources SDK. The default client
|
|
4
|
+
(:class:`nyora.direct.Nyora`, re-exported here as :class:`Nyora`) embeds the
|
|
5
|
+
JavaScript parser bundle inside a QuickJS context via
|
|
6
|
+
:class:`nyora.runtime.ParserRuntime`, so it needs **no** Node and **no** JVM
|
|
7
|
+
helper: HTTP is handled by ``httpx`` and HTML parsing by ``selectolax``. The
|
|
8
|
+
parser bundle and source catalog are kept current through
|
|
9
|
+
:class:`nyora.ota.OtaManager` (over-the-air updates).
|
|
10
|
+
|
|
11
|
+
This module is the public surface of the SDK. It re-exports the primary
|
|
12
|
+
client, the helper-backed REST clients, the over-the-air manager, the embedded
|
|
13
|
+
:class:`nyora.server.NyoraServer`, the typed :mod:`nyora.models` dataclasses,
|
|
14
|
+
and the SDK exception hierarchy.
|
|
15
|
+
|
|
16
|
+
The importable ``nyora`` library and the separately shipped ``nyora-cli`` tool
|
|
17
|
+
(which launches the terminal UI) are distinct: this package documents the SDK.
|
|
18
|
+
|
|
19
|
+
Example:
|
|
20
|
+
>>> import nyora
|
|
21
|
+
>>> with nyora.Nyora() as client:
|
|
22
|
+
... source = client.sources.find("mangadex")
|
|
23
|
+
... page = client.manga.popular(source.id)
|
|
24
|
+
... first = page.entries[0]
|
|
25
|
+
... details = client.manga.details(source.id, first.url, title=first.title)
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
from nyora.client import AsyncNyora
|
|
29
|
+
from nyora.client import Nyora as NyoraHelper
|
|
30
|
+
from nyora.direct import Nyora
|
|
31
|
+
from nyora.errors import HelperNotFoundError, NyoraError, NyoraHTTPError
|
|
32
|
+
from nyora.models import (
|
|
33
|
+
BackupImportResult,
|
|
34
|
+
Category,
|
|
35
|
+
Download,
|
|
36
|
+
DownloadSettings,
|
|
37
|
+
GlobalSearchGroup,
|
|
38
|
+
HistoryEntry,
|
|
39
|
+
Manga,
|
|
40
|
+
MangaChapter,
|
|
41
|
+
MangaDetails,
|
|
42
|
+
MangaPage,
|
|
43
|
+
MangaPrefs,
|
|
44
|
+
SearchPage,
|
|
45
|
+
Source,
|
|
46
|
+
SourceFilter,
|
|
47
|
+
Stats,
|
|
48
|
+
)
|
|
49
|
+
from nyora.ota import OtaManager, OtaUpdateResult
|
|
50
|
+
from nyora.parser_bridge import NyoraPythonEngine
|
|
51
|
+
from nyora.server import NyoraServer
|
|
52
|
+
|
|
53
|
+
__all__ = [
|
|
54
|
+
"AsyncNyora",
|
|
55
|
+
"BackupImportResult",
|
|
56
|
+
"Category",
|
|
57
|
+
"Download",
|
|
58
|
+
"DownloadSettings",
|
|
59
|
+
"GlobalSearchGroup",
|
|
60
|
+
"HelperNotFoundError",
|
|
61
|
+
"HistoryEntry",
|
|
62
|
+
"Manga",
|
|
63
|
+
"MangaChapter",
|
|
64
|
+
"MangaDetails",
|
|
65
|
+
"MangaPage",
|
|
66
|
+
"MangaPrefs",
|
|
67
|
+
"Nyora",
|
|
68
|
+
"NyoraError",
|
|
69
|
+
"NyoraHTTPError",
|
|
70
|
+
"NyoraHelper",
|
|
71
|
+
"NyoraPythonEngine",
|
|
72
|
+
"NyoraServer",
|
|
73
|
+
"OtaManager",
|
|
74
|
+
"OtaUpdateResult",
|
|
75
|
+
"SearchPage",
|
|
76
|
+
"Source",
|
|
77
|
+
"SourceFilter",
|
|
78
|
+
"Stats",
|
|
79
|
+
]
|
nyora/assets/__init__.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Bundled Nyora parser assets."""
|