1"use strict";(globalThis.webpackChunkopensource_contentauth_org=globalThis.webpackChunkopensource_contentauth_org||[]).push([[7851],{1834:(n,e,t)=>{t.r(e),t.d(e,{assets:()=>c,contentTitle:()=>i,default:()=>p,frontMatter:()=>a,metadata:()=>s,toc:()=>d});const s=JSON.parse('{"id":"sdk-repos/c2pa-python/docs/class-diagram","title":"Class diagram","description":"This diagram shows the public classes in the Python library and their relationships.","source":"@site/docs/sdk-repos/c2pa-python/docs/class-diagram.md","sourceDirName":"sdk-repos/c2pa-python/docs","slug":"/sdk-repos/c2pa-python/docs/class-diagram","permalink":"/docs/sdk-repos/c2pa-python/docs/class-diagram","draft":false,"unlisted":false,"editUrl":"https://github.com/contentauth/c2pa-python/edit/main/docs/class-diagram.md","tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Supported media formats","permalink":"/docs/sdk-repos/c2pa-python/docs/supported-formats"},"next":{"title":"Configuring SDK settings","permalink":"/docs/sdk-repos/c2pa-python/docs/context-settings"}}');var r=t(4848),o=t(8453);const a={},i="Class diagram",c={},d=[];function l(n){const e={h1:"h1",header:"header",mermaid:"mermaid",p:"p",...(0,o.R)(),...n.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(e.header,{children:(0,r.jsx)(e.h1,{id:"class-diagram",children:"Class diagram"})}),"\n",(0,r.jsx)(e.p,{children:"This diagram shows the public classes in the Python library and their relationships."}),"\n",(0,r.jsx)(e.mermaid,{value:"classDiagram\n direction LR\n\n class Settings {\n +from_json(json_str) Settings$\n +from_dict(config) Settings$\n +set(path, value) Settings\n +update(data) Settings\n +close()\n +is_valid bool\n }\n\n class ContextProvider {\n <<abstract>>\n +is_valid bool*\n +execution_context*\n }\n\n class Context {\n +from_json(json_str, signer) Context$\n +from_dict(config, signer) Context$\n +has_signer bool\n +is_valid bool\n +close()\n }\n\n class Reader {\n +get_supported_mime_types() list~str~$\n +try_create(format_or_path, stream, manifest_data, context) Reader | None$\n +json() str\n +detailed_json() str\n +get_active_manifest() dict | None\n +get_manifest(label) dict\n +get_validation_state() str | None\n +get_validation_results() dict | None\n +resource_to_stream(uri, stream) int\n +is_embedded() bool\n +get_remote_url() str | None\n +close()\n }\n\n class Builder {\n +from_json(manifest_json, context) Builder$\n +from_archive(stream) Builder$\n +get_supported_mime_types() list~str~$\n +set_no_embed()\n +set_remote_url(url)\n +set_intent(intent, digital_source_type)\n +add_resource(uri, stream)\n +add_ingredient(json, format, source)\n +add_action(action_json)\n +to_archive(stream)\n +with_archive(stream) Builder\n +sign(signer, format, source, dest) bytes\n +sign(format, source, dest) bytes\n +sign_file(source_path, dest_path, signer) bytes\n +close()\n }\n\n class Signer {\n +from_info(signer_info) Signer$\n +from_callback(callback, alg, certs, tsa_url) Signer$\n +reserve_size() int\n +close()\n }\n\n class C2paSignerInfo {\n <<ctypes.Structure>>\n +alg\n +sign_cert\n +private_key\n +ta_url\n }\n\n class C2paSigningAlg {\n <<IntEnum>>\n ES256\n ES384\n ES512\n PS256\n PS384\n PS512\n ED25519\n }\n\n class C2paBuilderIntent {\n <<IntEnum>>\n CREATE\n EDIT\n UPDATE\n }\n\n class C2paDigitalSourceType {\n <<IntEnum>>\n DIGITAL_CAPTURE\n DIGITAL_CREATION\n TRAINED_ALGORITHMIC_MEDIA\n ...\n }\n\n class C2paError {\n <<Exception>>\n +message str\n }\n\n class C2paError_Subtypes {\n <<nested classes>>\n ManifestNotFound\n NotSupported\n Json\n Io\n Verify\n Signature\n ...\n }\n\n ContextProvider <|-- Context : extends\n Settings --\x3e Context : optional input\n Signer --\x3e Context : optional, consumed\n C2paSignerInfo --\x3e Signer : creates via from_info\n C2paSigningAlg --\x3e C2paSignerInfo : alg field\n C2paSigningAlg --\x3e Signer : from_callback alg\n Context --\x3e Reader : context=\n Context --\x3e Builder : context=\n Signer --\x3e Builder : sign(signer)\n C2paBuilderIntent --\x3e Builder : set_intent\n C2paDigitalSourceType --\x3e Builder : set_intent\n C2paError --\x3e C2paError_Subtypes : subclasses"})]})}function p(n={}){const{wrapper:e}={...(0,o.R)(),...n.components};return e?(0,r.jsx)(e,{...n,children:(0,r.jsx)(l,{...n})}):l(n)}},8453:(n,e,t)=>{t.d(e,{R:()=>a,x:()=>i});var s=t(6540);const r={},o=s.createContext(r);function a(n){const e=s.useContext(o);return s.useMemo(function(){return"function"==typeof n?n(e):{...e,...n}},[e,n])}function i(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(r):n.components||r:a(n.components),s.createElement(o.Provider,{value:e},n.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.