c2pa.lib ======== .. py:module:: c2pa.lib .. autoapi-nested-parse:: Library loading utilities Takes care only on loading the needed compiled library. Attributes ---------- .. autoapisummary:: c2pa.lib.DEBUG_LIBRARY_LOADING c2pa.lib.logger Classes ------- .. autoapisummary:: c2pa.lib.CPUArchitecture Functions --------- .. autoapisummary:: c2pa.lib.get_platform_identifier c2pa.lib.dynamically_load_library Module Contents --------------- .. py:data:: DEBUG_LIBRARY_LOADING :value: False .. py:data:: logger .. py:class:: CPUArchitecture Bases: :py:obj:`enum.Enum` CPU architecture enum for platform-specific identifiers. .. py:attribute:: AARCH64 :value: 'aarch64' .. py:attribute:: X86_64 :value: 'x86_64' .. py:attribute:: ARM64 :value: 'arm64' .. py:function:: get_platform_identifier() Get the platform identifier (arch-os) for the current system, matching the downloaded identifiers used by the Github publisher. Returns one of: - universal-apple-darwin (for Mac universal) - aarch64-apple-darwin (for Mac ARM64) - x86_64-apple-darwin (for Mac x86_64) - x86_64-pc-windows-msvc (for Windows 64-bit) - x86_64-unknown-linux-gnu (for Linux 64-bit) - aarch64-unknown-linux-gnu (for Linux ARM) .. py:function:: dynamically_load_library(lib_name = None) Load the dynamic library containing the C-API based on the platform. :param lib_name: Optional specific library name to load. If provided, only this library will be loaded. :param This enables to potentially load wrapper libraries: :param of the C-API that may have an other name: :param (the presence of required symbols will nevertheless: :param be verified once the library is loaded).: :returns: The loaded library or None if loading failed