API reference¶
Auto-generated reference for every public symbol in the Nyora library
(import nyora). Each section renders the live docstrings of a module. For
narrative usage, see the library guide.
Package overview¶
The top-level nyora package re-exports the client, the async client, the
sync client, the model dataclasses, and the exception hierarchy. Each
re-exported symbol is documented in full under its canonical module section
below.
Nyora Python SDK — the importable nyora library.
Nyora is a manga sources SDK. The default client (nyora.Nyora) is a
thin client over a Nyora parser engine (the kotatsu-parsers stack, ~960
sources): it runs no parsers in-process, speaking the engine’s REST contract
over httpx. It is fully self-contained — with no server configured it
launches its own bundled engine locally (via nyora-extension-server),
so no cloud is required. Point it at any server with nyora config set-url.
nyora.sync.NyoraSync optionally adds account and library sync against a
(self-hosted) Nyora sync server.
This module is the public surface of the SDK. It re-exports the primary client
(and the async nyora.AsyncNyora), the sync client, the typed
nyora.models dataclasses, and the SDK exception hierarchy.
The importable nyora library and the separately shipped nyora-cli tool
(which launches the terminal UI) are distinct: this package documents the SDK.
Example
>>> import nyora
>>> with nyora.Nyora() as client:
... source = client.sources.find("mangadex")
... page = client.manga.popular(source.id)
... first = page.entries[0]
... details = client.manga.details(source.id, first.url, title=first.title)
nyora.client¶
The clients (Nyora, AsyncNyora) — a bare Nyora() auto-launches a bundled local engine, or point it at a server via base_url / nyora config set-url.
Nyora helper HTTP clients.
This module provides the SDK’s REST clients. They run no parsers themselves;
they speak the camelCase helper REST contract over HTTP via httpx against a
Nyora parser engine.
It exposes:
Nyora— synchronous client with the full set of service objects (sources, manga, library, downloads, backup, system).AsyncNyora— asynchronous client with the read/browse surface (sources/manga) plus rawget/post/delete.
Both clients automatically retry transient failures (connect/read timeouts,
connection errors, 429/5xx) with exponential backoff + jitter, send a
descriptive User-Agent, and emit structured logs on the "nyora" logger.
The SDK is fully self-contained: when no server is configured, Nyora
launches its own bundled parser engine locally (shipped with
nyora-extension-server) and owns its lifecycle — no cloud required. A base
URL can be supplied explicitly, via the NYORA_BASE_URL environment variable,
via persisted config (nyora config set-url), or discovered from a running
helper’s port file. A self-hosted helper jar can also be launched and managed
via Nyora.managed().
- class nyora.client.Nyora(base_url=None, *, timeout=60.0, retries=None, helper=None)[source]¶
Bases:
objectSynchronous Nyora SDK client backed by a helper REST API.
Wraps an
httpx.Clientagainst a discovered or managed helper and exposes the full set of service objects. Transient failures are retried with exponential backoff. Use as a context manager to release the HTTP connection (and stop a managed helper) on exit.- Variables:
base_url (
str) – The resolved helper base URL.sources –
SourcesService.manga –
MangaService.library –
LibraryService.downloads –
DownloadsService.backup –
BackupService.system –
SystemService.
Example
>>> with Nyora.attach() as client: ... for source in client.sources.list(): ... print(source.id, source.name)
- Parameters:
Connect to a helper and construct the service objects.
- Parameters:
base_url (
str|None) – Explicit helper base URL, orNoneto auto-discover.timeout (
float) – Per-request HTTP timeout in seconds.retries (
RetryConfig|int|None) – Retry policy — an int (max attempts) or aRetryConfig.0disables retrying.helper (
HelperProcess|None) – An ownedHelperProcessto stop onclose(), when the client launched the helper itself.
- Raises:
HelperNotFoundError – If no server is configured and no bundled engine can be launched (e.g. no Java runtime / no engine jar).
- classmethod attach(base_url=None, *, timeout=60.0, retries=None)[source]¶
Attach to an already-running helper.
- classmethod managed(jar_path=None, *, java='java', timeout=60.0, retries=None, launch_timeout=20.0)[source]¶
Launch a helper jar and return a client bound to it.
The launched process is owned by the returned client and is stopped on
close().- Parameters:
jar_path (
str|PathLike[str] |None) – Path to the helper jar. WhenNoneit is read from theNYORA_HELPER_JARenvironment variable.java (
str) – Thejavaexecutable to invoke.timeout (
float) – Per-request HTTP timeout in seconds for the client.retries (
RetryConfig|int|None) – Retry policy (int orRetryConfig).launch_timeout (
float) – Seconds to wait for the helper to report healthy.
- Return type:
Self- Returns:
A client connected to the managed helper.
- Raises:
HelperNotFoundError – If the jar path is missing or does not exist.
HelperLaunchError – If the helper fails to start within the timeout.
- get(path, *, params=None)[source]¶
Issue a
GETrequest against the helper.- Parameters:
- Return type:
- Returns:
Parsed JSON, or the response text for non-JSON bodies.
- Raises:
NyoraHTTPError – If the helper returns a 4xx/5xx response.
NyoraTransportError – If the engine is unreachable after retries.
- post(path, *, params=None, json=None, content=None)[source]¶
Issue a
POSTrequest against the helper.- Parameters:
- Return type:
- Returns:
Parsed JSON, or the response text for non-JSON bodies.
- Raises:
NyoraHTTPError – If the helper returns a 4xx/5xx response.
NyoraTransportError – If the engine is unreachable after retries.
- delete(path, *, params=None)[source]¶
Issue a
DELETErequest against the helper.- Parameters:
- Return type:
- Returns:
Parsed JSON, or the response text for non-JSON bodies.
- Raises:
NyoraHTTPError – If the helper returns a 4xx/5xx response.
NyoraTransportError – If the engine is unreachable after retries.
- class nyora.client.AsyncNyora(base_url=None, *, timeout=60.0, retries=None)[source]¶
Bases:
objectAsynchronous Nyora client for the read/browse surface.
Wraps an
httpx.AsyncClientand exposes asyncsourcesandmangaservices (browse, search, details, pages) plus rawget/post/delete— with the same automatic retries and User-Agent asNyora. Use as an async context manager to release the connection on exit.Unlike
Nyora, this client does not launch a bundled engine; point it at a running/configured server.- Variables:
base_url (
str) – The resolved helper base URL.sources – async source listing / lookup.
manga – async browse, search, details, pages (with
iter_*pagers).
Example
>>> async with AsyncNyora.attach() as client: ... src = await client.sources.find("mangadex") ... async for manga in client.manga.iter_popular(src.id, limit=30): ... print(manga.title)
Connect to a helper.
- Parameters:
- Raises:
HelperNotFoundError – If no helper can be discovered.
- classmethod attach(base_url=None, *, timeout=60.0, retries=None)[source]¶
Attach to an already-running helper.
nyora.sync¶
Cloud account and library sync (NyoraSync) against the Nyora sync server.
Nyora cloud sync — account + library sync against the self-hosted sync server.
NyoraSync talks to the Nyora sync server (https://sync.nyora.xyz)
using an OAuth2 password flow + JWT. It offers a generic last-write-wins
upsert/select transport, plus high-level favourite/history
helpers that build rows through nyora.schema so they stay
field-compatible with the nyora-web sync client. Row shapes are the single
source of truth in nyora.schema.
Tokens are held in memory and, when a token_path is given, persisted to disk
so a process can stay signed in across runs.
- class nyora.sync.NyoraSync(base_url=None, *, timeout=30.0, token_path=None)[source]¶
Bases:
objectAccount and library sync against the Nyora sync server.
Example
>>> from nyora import Nyora >>> sync = NyoraSync() >>> sync.sign_in("[email protected]", "hunter2") >>> with Nyora() as client: ... manga = client.manga.popular("mangadex").entries[0] ... sync.favourite("mangadex", manga) # schema-correct upserts >>> [row["title"] for row in sync.favourites()] ['...']
Create a sync client.
- Parameters:
base_url (
str|None) – Sync server base URL. Defaults tohttps://sync.nyora.xyz(or theNYORA_SYNC_URLenv var).timeout (
float) – Per-request HTTP timeout in seconds.token_path (
str|PathLike[str] |None) – Where to persist tokens.Noneuses the default user config path; passFalse-y string to disable persistence.
- select(table, since=None)[source]¶
Fetch rows from
table, optionally only those changed aftersince.
- favourite(source_id, manga)[source]¶
Add
mangato the cloud library (manga + favourite rows). Returns the id.
- record_history(source_id, manga, chapter, *, page=0, total=0, percent=0.0)[source]¶
Record reading progress for a chapter (manga + history rows).
- push_snapshot(favourites, history)[source]¶
Bulk-push a device’s local library (favourites + history) to the cloud.
Mirrors nyora-web’s
pushAll: one upsert per table, with a dedupednyora_mangarow for each referenced title so joins resolve on pull.
- exception nyora.sync.NotSignedInError[source]¶
Bases:
RuntimeErrorRaised when a sync operation is attempted without signing in.
nyora.models¶
Typed dataclasses returned throughout the SDK.
Typed data models for the Nyora SDK.
Lightweight, slotted dataclasses that mirror the JSON returned by the Nyora
helper REST API. Every model exposes a tolerant from_json classmethod
that accepts the raw camelCase payloads and coerces field types defensively, so
missing or malformed fields fall back to sensible defaults rather than raising.
These types are returned throughout nyora.Nyora and the service
objects.
- class nyora.models.MangaPage(url, headers=<factory>)[source]¶
Bases:
objectA single readable image page of a chapter.
- Variables:
url – The image URL.
headers – Request headers required to fetch the image (e.g.
Referer).
- Parameters:
- class nyora.models.MangaChapter(id, title, number=0.0, volume=0, url='', scanlator=None, upload_date=0, branch=None, pages=<factory>, index=0)[source]¶
Bases:
objectA chapter belonging to a manga.
- Variables:
id – Stable chapter identifier.
title – Display title.
number – Chapter number (may be fractional).
volume – Volume number, or
0if unknown.url – Source-relative or absolute chapter URL.
scanlator – Scanlation group, if known.
upload_date – Upload timestamp in epoch milliseconds.
branch – Scanlation branch/translation name, if any.
pages – Resolved pages, when already loaded.
index – Position within the chapter list.
- Parameters:
- classmethod from_json(data)[source]¶
Build a
MangaChapterfrom a raw payload.- Parameters:
data (
Any) – A chapter object from the parser or helper.- Return type:
- Returns:
The parsed chapter.
- class nyora.models.Manga(id, title, alt_titles=<factory>, url='', public_url='', rating=-1.0, is_nsfw=False, content_rating=None, cover_url='', large_cover_url=None, state=None, authors=<factory>, source=<factory>, source_id='', description='', tags=<factory>, chapters=<factory>, unread=0, progress=0.0)[source]¶
Bases:
objectA manga entry as returned in listings and details.
- Variables:
id – Stable manga identifier.
title – Primary title.
alt_titles – Alternative titles.
url – Source-relative or absolute manga URL.
public_url – Public web URL for the manga, if distinct.
rating – Normalized rating, or
-1.0when unknown.is_nsfw – Whether the entry is flagged adult/NSFW.
content_rating – Source-provided content rating, if any.
cover_url – Cover thumbnail URL.
large_cover_url – High-resolution cover URL, if available.
state – Publication state (e.g. ongoing/finished), if known.
authors – Author names.
source – Raw source metadata as a dict.
source_id – Identifier of the owning source.
description – Synopsis text.
tags – Genre/tag dicts.
chapters – Chapters, when already loaded.
unread – Unread chapter count, for library entries.
progress – Read progress fraction, for library entries.
- Parameters:
- chapters: list[MangaChapter]¶
- class nyora.models.Source(id, name, lang='', base_url='', engine='', content_type='', is_installed=False, is_pinned=False, is_nsfw=False, is_obsolete=False, icon_url='', version='', notes='', can_uninstall=True)[source]¶
Bases:
objectA content source (site) the SDK can read from.
- Variables:
id – Stable source identifier.
name – Human-readable source name.
lang – Primary content language/locale code.
base_url – The source’s base site URL.
engine – Parser engine (e.g.
"JavaScript").content_type – Content type (e.g.
"Manga").is_installed – Whether the source is installed/available.
is_pinned – Whether the user pinned the source.
is_nsfw – Whether the source is flagged adult/NSFW.
is_obsolete – Whether the source is deprecated.
icon_url – Source icon URL.
version – Source/parser version string.
notes – Free-form notes.
can_uninstall – Whether the source may be uninstalled.
- Parameters:
- class nyora.models.SourceFilter(name, type_name, values=<factory>)[source]¶
Bases:
objectA search filter advertised by a source.
- Variables:
name – Filter name.
type_name – Filter widget/type (e.g. select, toggle).
values – Allowed values for the filter.
- Parameters:
- classmethod from_json(data)[source]¶
Build a
SourceFilterfrom a raw payload.- Parameters:
data (
Any) – A filter object from the helper.- Return type:
- Returns:
The parsed filter.
- class nyora.models.SearchPage(entries, has_next_page=False)[source]¶
Bases:
objectOne page of manga results from browse or search.
- Variables:
entries – The manga on this page.
has_next_page – Whether a further page is likely available.
- Parameters:
- classmethod from_json(data)[source]¶
Build a
SearchPagefrom a raw payload.- Parameters:
data (
Any) – A page object withentriesandhasNextPage.- Return type:
- Returns:
The parsed page.
- class nyora.models.MangaDetails(manga, chapters)[source]¶
Bases:
objectFull metadata for one manga together with its chapter list.
- Variables:
manga – The manga metadata.
chapters – The manga’s chapters.
- Parameters:
manga (
Manga)chapters (
list[MangaChapter])
- chapters: list[MangaChapter]¶
- classmethod from_json(data)[source]¶
Build a
MangaDetailsfrom a raw payload.- Parameters:
data (
Any) – An object withmangaandchapters.- Return type:
- Returns:
The parsed details.
- reading_order()[source]¶
Return the chapters in canonical reading order (earliest first).
Sources order their chapter arrays inconsistently (ascending on some, descending on others); this normalises them so index
0is always the earliest chapter.- Return type:
- next_chapter(current)[source]¶
Return the next (later) chapter after
current, order-independent.- Parameters:
current (
MangaChapter)- Return type:
- previous_chapter(current)[source]¶
Return the previous (earlier) chapter before
current, order-independent.- Parameters:
current (
MangaChapter)- Return type:
- class nyora.models.HistoryEntry(manga, chapter_id='', page=0, percent=0.0, updated_at=0)[source]¶
Bases:
objectA reading-history record for a manga.
- Variables:
manga – The manga that was read.
chapter_id – The last-read chapter identifier.
page – The last-read page index.
percent – Read progress fraction within the chapter.
updated_at – Last-update timestamp in epoch milliseconds.
- Parameters:
- classmethod from_json(data)[source]¶
Build a
HistoryEntryfrom a raw payload.- Parameters:
data (
Any) – A history object from the helper.- Return type:
- Returns:
The parsed entry.
- class nyora.models.Category(id, title, manga_count=0)[source]¶
Bases:
objectA user-defined library category.
- Variables:
id – Category identifier.
title – Display title.
manga_count – Number of manga in the category.
- Parameters:
- class nyora.models.Download(id, source_id, manga_title, chapter_title, chapter_url, status, total_pages=0, completed_pages=0, failed_pages=0, file_path=None, error=None)[source]¶
Bases:
objectA chapter download task and its progress.
- Variables:
id – Download task identifier.
source_id – Identifier of the owning source.
manga_title – Title of the manga being downloaded.
chapter_title – Title of the chapter being downloaded.
chapter_url – URL of the chapter being downloaded.
status – Task status string.
total_pages – Total number of pages to download.
completed_pages – Pages downloaded so far.
failed_pages – Pages that failed to download.
file_path – Output path once complete, if available.
error – Error message when the task failed, if any.
- Parameters:
- class nyora.models.DownloadSettings(max_concurrent_downloads=3, format='AUTO')[source]¶
Bases:
objectDownload subsystem settings.
- Variables:
max_concurrent_downloads – Maximum simultaneous downloads.
format – Output format (e.g.
"AUTO").
- Parameters:
- classmethod from_json(data)[source]¶
Build
DownloadSettingsfrom a raw payload.Accepts either a bare settings object or one nested under
settings.- Parameters:
data (
Any) – A settings object from the helper.- Return type:
- Returns:
The parsed settings.
- class nyora.models.MangaPrefs(manga_id, reader_mode='', brightness=0.0, contrast=1.0, saturation=1.0, hue=0.0, palette='', present=False)[source]¶
Bases:
objectPer-manga reader preferences.
- Variables:
manga_id – Identifier of the manga these preferences apply to.
reader_mode – Reader layout/mode.
brightness – Brightness adjustment.
contrast – Contrast multiplier.
saturation – Saturation multiplier.
hue – Hue rotation.
palette – Named color palette.
present – Whether stored preferences exist for this manga.
- Parameters:
- classmethod from_json(data)[source]¶
Build
MangaPrefsfrom a raw payload.- Parameters:
data (
Any) – A preferences object from the helper.- Return type:
- Returns:
The parsed preferences.
- class nyora.models.GlobalSearchGroup(source_id, source_name, entries, error=None)[source]¶
Bases:
objectResults from one source within a cross-source global search.
- Variables:
source_id – Identifier of the source that produced these results.
source_name – Display name of the source.
entries – Matching manga from this source.
error – Error message if this source’s search failed, else
None.
- Parameters:
- classmethod from_json(data)[source]¶
Build a
GlobalSearchGroupfrom a raw payload.- Parameters:
data (
Any) – A group object from the helper.- Return type:
- Returns:
The parsed group.
- class nyora.models.Stats(total_chapters=0, distinct_manga=0, favourites_count=0, longest_streak_days=0, top_sources=<factory>)[source]¶
Bases:
objectAggregate reading statistics.
- Variables:
total_chapters – Total chapters read.
distinct_manga – Number of distinct manga read.
favourites_count – Number of favourited manga.
longest_streak_days – Longest consecutive reading streak in days.
top_sources – Per-source usage breakdown dicts.
- Parameters:
- class nyora.models.BackupImportResult(ok, imported_favourites=0, imported_history=0)[source]¶
Bases:
objectOutcome of importing a backup archive.
- Variables:
ok – Whether the import succeeded.
imported_favourites – Number of favourites imported.
imported_history – Number of history records imported.
- Parameters:
- classmethod from_json(data)[source]¶
Build a
BackupImportResultfrom a raw payload.- Parameters:
data (
Any) – A result object from the helper.- Return type:
- Returns:
The parsed result.
nyora.errors¶
The SDK exception hierarchy.
Nyora SDK exceptions.
Defines the exception hierarchy raised across the SDK. NyoraError is
the common base; helper discovery, helper launch, and helper HTTP failures each
have a dedicated subclass so callers can catch them selectively.
- exception nyora.errors.HelperNotFoundError[source]¶
Bases:
NyoraErrorRaised when no running helper can be discovered.
- exception nyora.errors.HelperLaunchError[source]¶
Bases:
NyoraErrorRaised when a managed helper process fails to start.
- exception nyora.errors.NyoraTransportError[source]¶
Bases:
NyoraErrorBase for network/transport failures reaching the engine (after retries).
- exception nyora.errors.NyoraTimeoutError[source]¶
Bases:
NyoraTransportErrorRaised when a request exceeds its timeout, and retries are exhausted.
- exception nyora.errors.NyoraConnectionError[source]¶
Bases:
NyoraTransportErrorRaised when the engine is unreachable, and retries are exhausted.
- exception nyora.errors.NyoraHTTPError(status_code, message, *, body='')[source]¶
Bases:
NyoraErrorRaised when the helper returns a non-successful HTTP response.
- Variables:
status_code – The HTTP status code returned by the helper.
body – The raw response body, when available.
- Parameters:
Initialize the error.
nyora.config¶
Endpoint-discovery configuration: environment variables and the port file.
Configuration helpers for local Nyora helper discovery.
Defines the environment-variable names the SDK honors and resolves the
platform-specific path of the helper port file. These helpers let
nyora.client and nyora.helper locate a running Nyora helper
without explicit configuration.
- Environment variables:
NYORA_BASE_URL: Explicit helper base URL, overriding port-file discovery. NYORA_HELPER_PORT_FILE: Override path for the helper port file. NYORA_HELPER_JAR: Path to a helper jar for managed launches.
- nyora.config.config_file()[source]¶
Path of the persisted SDK config (
NYORA_CONFIG_FILEoverride, else the platform user-config dir). Stores the preferred server URL and blocklist cache location sonyorauses your server, not the cloud, across runs.- Return type:
- nyora.config.read_config()[source]¶
Return the persisted config dict (
{}if absent/corrupt).- Return type:
- nyora.config.write_config(data)[source]¶
Persist the config dict to
config_file().
- nyora.config.read_base_url_from_config()[source]¶
Return the user’s persisted preferred server URL, or
None.
- nyora.config.set_config_base_url(url)[source]¶
Persist (or clear, when
urlis falsy) the preferred server URL.
- nyora.config.read_theme_from_config()[source]¶
Return the user’s persisted TUI colour-scheme id, or
None.
- nyora.config.set_config_theme(theme_id)[source]¶
Persist (or clear, when
theme_idis falsy) the TUI colour scheme.
- nyora.config.read_ui_lang()[source]¶
Return the user’s persisted TUI interface language code, or
None.
- nyora.config.set_ui_lang(code)[source]¶
Persist (or clear, when
codeis falsy) the TUI interface language.
- nyora.config.read_onboarded()[source]¶
Return whether the user has passed the welcome screen at least once.
- Return type:
- nyora.config.set_onboarded(value=True)[source]¶
Mark (or clear) the one-time welcome screen as seen.
- nyora.config.read_show_nsfw()[source]¶
Return whether adult (18+) sources should be shown.
- Return type:
- nyora.config.read_languages()[source]¶
Return the user’s chosen language filter (empty = all languages).
- nyora.config.set_languages(langs)[source]¶
Persist the language filter (a list of locale codes; empty = all).
- nyora.config.read_reader_prefs()[source]¶
Return persisted reader preferences (
mode,fit), or{}.- Return type:
- nyora.config.set_reader_pref(key, value)[source]¶
Persist a single reader preference (e.g.
modeorfit).
- nyora.config.default_port_file()[source]¶
Return the path of the helper port file for this platform.
Honors
NYORA_HELPER_PORT_FILEwhen set; otherwise uses the platform-conventional application-data location (macOS Application Support, Windows%APPDATA%, or the XDG config dir on Linux).- Return type:
- Returns:
The resolved port-file path (which may not yet exist).
- nyora.config.read_base_url_from_port_file(port_file=None)[source]¶
Derive a helper base URL from a port file, if present.
- Parameters:
port_file (
Path|None) – Path to read. Defaults todefault_port_file().- Return type:
- Returns:
http://127.0.0.1:<port>when the file exists and holds a port, elseNone.
Services¶
The service objects attached to the client (nyora.client.Nyora).
nyora.services.sources¶
Source catalog operations.
- class nyora.services.sources.SourcesService(client)[source]¶
Bases:
_ServiceBrowse, manage, and inspect the helper’s content sources.
Attached to a client as
client.sources.- Parameters:
client (
Nyora)
- filters(source_id)[source]¶
List the search filters a source advertises.
- Parameters:
source_id (
str) – Identifier of the source to query.- Return type:
- Returns:
The source’s
SourceFilterdefinitions.
nyora.services.manga¶
Manga browse, search, reader, and metadata operations.
- class nyora.services.manga.MangaService(client)[source]¶
Bases:
_ServiceBrowse, search, read, and configure manga via the helper.
Attached to a client as
client.manga.- Parameters:
client (
Nyora)
- popular(source_id, page=1)[source]¶
Fetch a page of popular manga from a source.
- Parameters:
- Return type:
- Returns:
A
SearchPageof entries.
- latest(source_id, page=1)[source]¶
Fetch a page of the latest updated manga from a source.
- Parameters:
- Return type:
- Returns:
A
SearchPageof entries.
- search(source_id, query, page=1, *, filters=None)[source]¶
Search a source for manga matching a query.
- Parameters:
- Return type:
- Returns:
A
SearchPageof matching entries.
- iter_popular(source_id, *, start_page=1, max_pages=None, limit=None)[source]¶
Auto-paging iterator over popular manga across all pages.
- Parameters:
- Return type:
MangaPager- Returns:
A
MangaPager— iterate forManga.
- iter_latest(source_id, *, start_page=1, max_pages=None, limit=None)[source]¶
Auto-paging iterator over the latest-updated manga across all pages.
- iter_search(source_id, query, *, start_page=1, max_pages=None, limit=None, filters=None)[source]¶
Auto-paging iterator over search results across all pages.
- global_search(query, *, limit_per_source=8)[source]¶
Search every installed source at once.
- Parameters:
- Return type:
- Returns:
One
GlobalSearchGroupper source.
- details(source_id, manga_url, *, manga_id=None)[source]¶
Fetch full metadata and chapters for one manga.
- Parameters:
- Return type:
- Returns:
A
MangaDetails.
- pages(source_id, chapter_url, *, branch=None)[source]¶
Resolve the readable image pages of a chapter.
- prefs(manga_id)[source]¶
Fetch the stored reader preferences for a manga.
- Parameters:
manga_id (
str) – Identifier of the manga.- Return type:
- Returns:
The manga’s
MangaPrefs.
nyora.services.library¶
Library, history, favourites, bookmarks, and categories.
- class nyora.services.library.LibraryService(client)[source]¶
Bases:
_ServiceManage reading history, favourites, bookmarks, and categories.
Attached to a client as
client.library.- Parameters:
client (
Nyora)
- history(limit=100)[source]¶
Return recent reading history.
- Parameters:
limit (
int) – Maximum number of entries to return.- Return type:
- Returns:
The most recent
HistoryEntryrecords.
- record_history(*, manga_id, chapter_id, page, percent)[source]¶
Record reading progress for a chapter.
- remove_history(manga_id, chapter_id=None)[source]¶
Remove history for a manga, optionally narrowed to one chapter.
nyora.services.downloads¶
Download operations.
- class nyora.services.downloads.DownloadsService(client)[source]¶
Bases:
_ServiceStart, enqueue, monitor, and configure chapter downloads.
Attached to a client as
client.downloads.- Parameters:
client (
Nyora)
- start(*, source_id, manga_url, chapter_url, manga_title='', chapter_title='')[source]¶
Start downloading a single chapter.
- Parameters:
- Return type:
- Returns:
The created
Downloadtask.
- enqueue(*, source_id, manga_url, chapters, manga_title='')[source]¶
Enqueue multiple chapters for download.
- settings()[source]¶
Return the current download settings.
- Return type:
- Returns:
The
DownloadSettings.
- save_settings(*, max_concurrent=None, format=None)[source]¶
Update download settings.
- Parameters:
- Return type:
- Returns:
The updated
DownloadSettings.
nyora.services.backup¶
Includes BackupService, LocalService, TrackerService, and SystemService.
Backup, sync, local file, tracker, and system operations.
Defines several helper-backed services: BackupService (export/import),
LocalService (local file scanning), TrackerService (AniList
tracking), and SystemService (stats, settings, OTA) which composes the
local and tracker services. SystemService is attached to a client as
client.system; the rest are reachable as client.system.local etc.
Cloud sync is a separate client: nyora.sync.NyoraSync.
- class nyora.services.backup.BackupService(client)[source]¶
Bases:
_ServiceExport and import the helper’s library backup.
Attached to a client as
client.backup.- Parameters:
client (
Nyora)
- export()[source]¶
Export the full backup archive.
- Return type:
- Returns:
The backup payload as returned by the helper.
- import_(backup_json)[source]¶
Import a previously exported backup.
- Parameters:
backup_json (
str|bytes) – The backup payload as JSON text or bytes.- Return type:
- Returns:
A
BackupImportResultsummarizing the import.
- class nyora.services.backup.LocalService(client)[source]¶
Bases:
_ServiceScan and read locally stored manga files.
Reachable as
client.system.local.- Parameters:
client (
Nyora)
- class nyora.services.backup.TrackerService(client)[source]¶
Bases:
_ServiceProgress-tracking integrations (AniList).
Reachable as
client.system.tracker.- Parameters:
client (
Nyora)
- class nyora.services.backup.SystemService(client)[source]¶
Bases:
_ServiceSystem-level operations: stats, settings, OTA, and sub-services.
Attached to a client as
client.system. ComposesLocalService(.local) andTrackerService(.tracker).Cloud sync now lives in the standalone
nyora.sync.NyoraSyncclient (OAuth2/JWT against the Nyora sync server), not onclient.system.- Variables:
local – Local-file operations.
tracker – Progress-tracking operations.
- Parameters:
client (
Nyora)