lanraragi_api package¶
Subpackages¶
- lanraragi_api.api package
- Submodules
- lanraragi_api.api.archive module
ArchiveAPIArchiveAPI.add_archive_toc()ArchiveAPI.clear_archive_new_flag()ArchiveAPI.delete_archive()ArchiveAPI.delete_archive_toc()ArchiveAPI.download_archive()ArchiveAPI.extract_archive()ArchiveAPI.get_all_archives()ArchiveAPI.get_archive()ArchiveAPI.get_archive_categories()ArchiveAPI.get_archive_metadata()ArchiveAPI.get_archive_page()ArchiveAPI.get_archive_tankoubons()ArchiveAPI.get_archive_thumbnail()ArchiveAPI.get_untagged_archives()ArchiveAPI.queue_extraction_of_page_thumbnails()ArchiveAPI.set_archive_new_flag()ArchiveAPI.update_archive_metadata()ArchiveAPI.update_reading_progression()ArchiveAPI.update_thumbnail()ArchiveAPI.upload_archive()
- lanraragi_api.api.base module
- lanraragi_api.api.category module
CategoryAPICategoryAPI.add_archive_to_category()CategoryAPI.create_category()CategoryAPI.delete_category()CategoryAPI.disable_bookmark_feature()CategoryAPI.get_all_categories()CategoryAPI.get_bookmark_link()CategoryAPI.get_category()CategoryAPI.remove_archive_from_category()CategoryAPI.update_bookmark_link()CategoryAPI.update_category()
- lanraragi_api.api.database module
- lanraragi_api.api.minion module
- lanraragi_api.api.misc module
- lanraragi_api.api.opds module
- lanraragi_api.api.plugin module
- lanraragi_api.api.search module
- lanraragi_api.api.shinobu module
- lanraragi_api.api.stamp module
- lanraragi_api.api.tankoubon module
TankoubonAPITankoubonAPI.add_archive_to_tankoubon()TankoubonAPI.create_tankoubon()TankoubonAPI.delete_tankoubon()TankoubonAPI.get_all_tankoubons()TankoubonAPI.get_tankoubon()TankoubonAPI.get_tankoubon_detail()TankoubonAPI.get_tankoubon_full()TankoubonAPI.get_tankoubon_list()TankoubonAPI.get_tankoubon_thumbnail()TankoubonAPI.remove_archive_from_tankoubon()TankoubonAPI.update_tank_progress()TankoubonAPI.update_tankoubon()TankoubonAPI.update_tankoubon_thumbnail()
- Module contents
ArchiveAPIArchiveAPI.add_archive_toc()ArchiveAPI.clear_archive_new_flag()ArchiveAPI.delete_archive()ArchiveAPI.delete_archive_toc()ArchiveAPI.download_archive()ArchiveAPI.extract_archive()ArchiveAPI.get_all_archives()ArchiveAPI.get_archive()ArchiveAPI.get_archive_categories()ArchiveAPI.get_archive_metadata()ArchiveAPI.get_archive_page()ArchiveAPI.get_archive_tankoubons()ArchiveAPI.get_archive_thumbnail()ArchiveAPI.get_untagged_archives()ArchiveAPI.queue_extraction_of_page_thumbnails()ArchiveAPI.set_archive_new_flag()ArchiveAPI.update_archive_metadata()ArchiveAPI.update_reading_progression()ArchiveAPI.update_thumbnail()ArchiveAPI.upload_archive()
CategoryAPICategoryAPI.add_archive_to_category()CategoryAPI.create_category()CategoryAPI.delete_category()CategoryAPI.disable_bookmark_feature()CategoryAPI.get_all_categories()CategoryAPI.get_bookmark_link()CategoryAPI.get_category()CategoryAPI.remove_archive_from_category()CategoryAPI.update_bookmark_link()CategoryAPI.update_category()
DatabaseAPIMinionAPIMiscAPIOPDSAPIPluginAPISearchAPIShinobuAPIStampAPITankoubonAPITankoubonAPI.add_archive_to_tankoubon()TankoubonAPI.create_tankoubon()TankoubonAPI.delete_tankoubon()TankoubonAPI.get_all_tankoubons()TankoubonAPI.get_tankoubon()TankoubonAPI.get_tankoubon_detail()TankoubonAPI.get_tankoubon_full()TankoubonAPI.get_tankoubon_list()TankoubonAPI.get_tankoubon_thumbnail()TankoubonAPI.remove_archive_from_tankoubon()TankoubonAPI.update_tank_progress()TankoubonAPI.update_tankoubon()TankoubonAPI.update_tankoubon_thumbnail()
- lanraragi_api.enhanced package
- lanraragi_api.entity package
- Submodules
- lanraragi_api.entity.archive module
ArchiveMetadataArchiveMetadata.arcidArchiveMetadata.extensionArchiveMetadata.filenameArchiveMetadata.isnewArchiveMetadata.lastreadtimeArchiveMetadata.pagecountArchiveMetadata.progressArchiveMetadata.sizeArchiveMetadata.summaryArchiveMetadata.tocArchiveMetadata.tagsArchiveMetadata.titleArchiveMetadata.arcidArchiveMetadata.extensionArchiveMetadata.filenameArchiveMetadata.isnewArchiveMetadata.lastreadtimeArchiveMetadata.model_configArchiveMetadata.pagecountArchiveMetadata.progressArchiveMetadata.sizeArchiveMetadata.summaryArchiveMetadata.tagsArchiveMetadata.titleArchiveMetadata.toc
ArchiveTags
- lanraragi_api.entity.base module
- lanraragi_api.entity.category module
- lanraragi_api.entity.database module
BackupArchiveMetadataBackupArchiveMetadata.arcidBackupArchiveMetadata.titleBackupArchiveMetadata.tagsBackupArchiveMetadata.summaryBackupArchiveMetadata.thumbhashBackupArchiveMetadata.filenameBackupArchiveMetadata.arcidBackupArchiveMetadata.filenameBackupArchiveMetadata.model_configBackupArchiveMetadata.summaryBackupArchiveMetadata.tagsBackupArchiveMetadata.thumbhashBackupArchiveMetadata.title
BackupCategoryMetadataBackupTankoubonMetadataJsonBackupTankoubonMetadataJson.tankidBackupTankoubonMetadataJson.nameBackupTankoubonMetadataJson.summaryBackupTankoubonMetadataJson.tagsBackupTankoubonMetadataJson.archivesBackupTankoubonMetadataJson.archivesBackupTankoubonMetadataJson.model_configBackupTankoubonMetadataJson.nameBackupTankoubonMetadataJson.summaryBackupTankoubonMetadataJson.tagsBackupTankoubonMetadataJson.tankid
DatabaseBackupTagStatistic
- lanraragi_api.entity.minion module
BasicJobStatusFullJobStatusFullJobStatus.argsFullJobStatus.attemptsFullJobStatus.childrenFullJobStatus.createdFullJobStatus.delayedFullJobStatus.expiresFullJobStatus.finishedFullJobStatus.idFullJobStatus.laxFullJobStatus.notesFullJobStatus.parentsFullJobStatus.priorityFullJobStatus.queueFullJobStatus.resultFullJobStatus.retriedFullJobStatus.retriesFullJobStatus.startedFullJobStatus.stateFullJobStatus.taskFullJobStatus.workerFullJobStatus.argsFullJobStatus.attemptsFullJobStatus.childrenFullJobStatus.createdFullJobStatus.delayedFullJobStatus.expiresFullJobStatus.finishedFullJobStatus.idFullJobStatus.laxFullJobStatus.model_configFullJobStatus.notesFullJobStatus.parentsFullJobStatus.priorityFullJobStatus.queueFullJobStatus.resultFullJobStatus.retriedFullJobStatus.retriesFullJobStatus.startedFullJobStatus.stateFullJobStatus.taskFullJobStatus.worker
MinionJobResponse
- lanraragi_api.entity.misc module
DownloadUrlResponseServerInfoServerInfo.archives_per_pageServerInfo.cache_last_clearedServerInfo.debug_modeServerInfo.has_passwordServerInfo.motdServerInfo.nameServerInfo.nofun_modeServerInfo.server_resizes_imagesServerInfo.server_tracks_progressServerInfo.authenticated_progressServerInfo.total_archivesServerInfo.total_pages_readServerInfo.versionServerInfo.version_descServerInfo.version_nameServerInfo.excluded_namespacesServerInfo.archives_per_pageServerInfo.authenticated_progressServerInfo.cache_last_clearedServerInfo.debug_modeServerInfo.excluded_namespacesServerInfo.has_passwordServerInfo.model_configServerInfo.motdServerInfo.nameServerInfo.nofun_modeServerInfo.server_resizes_imagesServerInfo.server_tracks_progressServerInfo.total_archivesServerInfo.total_pages_readServerInfo.versionServerInfo.version_descServerInfo.version_name
TempfolderCleanupResponse
- lanraragi_api.entity.plugin module
PluginInfoPluginInfo.authorPluginInfo.descriptionPluginInfo.namePluginInfo.iconPluginInfo.typePluginInfo.namespacePluginInfo.parametersPluginInfo.versionPluginInfo.oneshot_argPluginInfo.url_regexPluginInfo.login_fromPluginInfo.authorPluginInfo.descriptionPluginInfo.iconPluginInfo.login_fromPluginInfo.model_configPluginInfo.namePluginInfo.namespacePluginInfo.oneshot_argPluginInfo.parametersPluginInfo.typePluginInfo.url_regexPluginInfo.version
PluginParameterPluginUseResponse
- lanraragi_api.entity.search module
- lanraragi_api.entity.stamp module
- lanraragi_api.entity.tankoubon module
TankoubonDetailResponseTankoubonListResponseTankoubonMetadataTankoubonMetadata.archivesTankoubonMetadata.full_dataTankoubonMetadata.tankidTankoubonMetadata.nameTankoubonMetadata.summaryTankoubonMetadata.tagsTankoubonMetadata.progressTankoubonMetadata.archivesTankoubonMetadata.full_dataTankoubonMetadata.idTankoubonMetadata.model_configTankoubonMetadata.nameTankoubonMetadata.progressTankoubonMetadata.summaryTankoubonMetadata.tagsTankoubonMetadata.tankid
- Module contents
- lanraragi_api.util package
Submodules¶
lanraragi_api.error module¶
- exception lanraragi_api.error.APIError¶
Bases:
ExceptionBase exception for all API client errors.
- exception lanraragi_api.error.APIHttpError(status_code: int, url: str)¶
Bases:
APIErrorRaised when the server answers with an unexpected status code.
- status_code¶
HTTP status code returned by the server.
- url¶
Absolute URL the request was sent to.
- exception lanraragi_api.error.APIOperationError(operation: str, message: str | None, status_code: int | None = None, payload: dict[str, Any] | None = None)¶
Bases:
APIErrorRaised when an operation endpoint reports a failure.
Only raised when raising is enabled, either through the client-level
raise_on_operation_errorsetting or through theraise_on_failureargument of a single call. Otherwise the failed operation is returned to the caller like any other result.- operation¶
Name of the operation reported by the server.
- message¶
Error message reported by the server, if it was kept.
- status_code¶
HTTP status code of the response, if one was returned.
- payload¶
Raw response payload, if the client was configured to keep it.
- exception lanraragi_api.error.APIRequestError(url: str, error_type: str | None = None)¶
Bases:
APIErrorRaised when a request cannot be sent to the server.
It covers transport level failures such as a refused connection or a timeout. HTTP error statuses are reported through
APIHttpErrorinstead. The message names the class of the underlyingrequestsexception when one is available.- url¶
Absolute URL the request was sent to.
- exception lanraragi_api.error.APIResponseDecodeError(url: str, message: str)¶
Bases:
APIErrorRaised when a response body cannot be turned into the expected model.
It is raised for a body that is not valid JSON for a JSON endpoint, and for a JSON payload that does not match the pydantic model of the endpoint.
- url¶
Absolute URL the request was sent to.
lanraragi_api.lanraragi module¶
- class lanraragi_api.lanraragi.LANraragiAPI(server: str, key: str | None = None, auth_way: Auth = Auth.AUTH_HEADER, timeout: float | tuple[int, int] | None = None, include_error_payload: bool = False, include_operation_error_message: bool = True, raise_on_operation_error: bool = False, default_headers: dict[str, str] | None = None, default_params: dict[str, str] | None = None)¶
Bases:
objectEntry point of the library, grouping every API section of a server.
Each attribute is an independent client for one group of endpoints, and all of them share the connection settings passed to this class.
- Parameters:
server – Base URL of the LANraragi server, with or without a trailing slash.
key – API key sent with every request. Defaults to None, which sends no credentials.
auth_way – How the API key is transmitted. Defaults to
Auth.AUTH_HEADER.timeout – Timeout applied to every request, either a single value or a
(connect, read)pair. Defaults to None, meaning no timeout.include_error_payload – Whether
APIOperationErrorcarries the raw response payload. Defaults to False.include_operation_error_message – Whether
APIOperationErrorcarries the error message reported by the server. Defaults to True.raise_on_operation_error – Whether a failed operation raises
APIOperationErrorinstead of being returned to the caller. Defaults to False.default_headers – Extra headers sent with every request. Defaults to None, which sends no extra headers.
default_params – Extra query parameters sent with every request. Defaults to None, which sends no extra parameters.
- archives¶
Archive endpoints.
- Type:
- database¶
Database endpoints.
- Type:
- categories¶
Category endpoints.
- Type:
- tankoubons¶
Tankoubon endpoints.
- Type:
- shinobu¶
Shinobu endpoints.
- Type:
Module contents¶
- exception lanraragi_api.APIError¶
Bases:
ExceptionBase exception for all API client errors.
- exception lanraragi_api.APIHttpError(status_code: int, url: str)¶
Bases:
APIErrorRaised when the server answers with an unexpected status code.
- status_code¶
HTTP status code returned by the server.
- url¶
Absolute URL the request was sent to.
- exception lanraragi_api.APIOperationError(operation: str, message: str | None, status_code: int | None = None, payload: dict[str, Any] | None = None)¶
Bases:
APIErrorRaised when an operation endpoint reports a failure.
Only raised when raising is enabled, either through the client-level
raise_on_operation_errorsetting or through theraise_on_failureargument of a single call. Otherwise the failed operation is returned to the caller like any other result.- operation¶
Name of the operation reported by the server.
- message¶
Error message reported by the server, if it was kept.
- status_code¶
HTTP status code of the response, if one was returned.
- payload¶
Raw response payload, if the client was configured to keep it.
- exception lanraragi_api.APIRequestError(url: str, error_type: str | None = None)¶
Bases:
APIErrorRaised when a request cannot be sent to the server.
It covers transport level failures such as a refused connection or a timeout. HTTP error statuses are reported through
APIHttpErrorinstead. The message names the class of the underlyingrequestsexception when one is available.- url¶
Absolute URL the request was sent to.
- exception lanraragi_api.APIResponseDecodeError(url: str, message: str)¶
Bases:
APIErrorRaised when a response body cannot be turned into the expected model.
It is raised for a body that is not valid JSON for a JSON endpoint, and for a JSON payload that does not match the pydantic model of the endpoint.
- url¶
Absolute URL the request was sent to.
- class lanraragi_api.LANraragiAPI(server: str, key: str | None = None, auth_way: Auth = Auth.AUTH_HEADER, timeout: float | tuple[int, int] | None = None, include_error_payload: bool = False, include_operation_error_message: bool = True, raise_on_operation_error: bool = False, default_headers: dict[str, str] | None = None, default_params: dict[str, str] | None = None)¶
Bases:
objectEntry point of the library, grouping every API section of a server.
Each attribute is an independent client for one group of endpoints, and all of them share the connection settings passed to this class.
- Parameters:
server – Base URL of the LANraragi server, with or without a trailing slash.
key – API key sent with every request. Defaults to None, which sends no credentials.
auth_way – How the API key is transmitted. Defaults to
Auth.AUTH_HEADER.timeout – Timeout applied to every request, either a single value or a
(connect, read)pair. Defaults to None, meaning no timeout.include_error_payload – Whether
APIOperationErrorcarries the raw response payload. Defaults to False.include_operation_error_message – Whether
APIOperationErrorcarries the error message reported by the server. Defaults to True.raise_on_operation_error – Whether a failed operation raises
APIOperationErrorinstead of being returned to the caller. Defaults to False.default_headers – Extra headers sent with every request. Defaults to None, which sends no extra headers.
default_params – Extra query parameters sent with every request. Defaults to None, which sends no extra parameters.
- archives¶
Archive endpoints.
- Type:
- database¶
Database endpoints.
- Type:
- categories¶
Category endpoints.
- Type:
- tankoubons¶
Tankoubon endpoints.
- Type:
- shinobu¶
Shinobu endpoints.
- Type: