clarin.sru.diagnostic¶
- class clarin.sru.diagnostic.SRUDiagnostic(uri: str, details: str | None = None, message: str | None = None)[source]¶
Bases:
object
Class to hold a SRU diagnostic.
See also
SRU Diagnostics: http://www.loc.gov/standards/sru/diagnostics/
SRU Diagnostics List: http://www.loc.gov/standards/sru/diagnostics/diagnosticsList.html
- class clarin.sru.diagnostic.SRUDiagnosticList[source]¶
Bases:
object
Container for non surrogate diagnostics for the request. The will be put in the
diagnostics
part of the response.- abstract add_diagnostic(uri: str, details: str | None = None, message: str | None = None) None [source]¶
Add a non surrogate diagnostic to the response.
- Parameters:
uri – the diagnostic’s identifying URI
details – supplementary information available, often in a format specified by the diagnostic or
None
message – human readable message to display to the end user or
None