c2pa.lib¶
Library loading utilities
Takes care only on loading the needed compiled library.
Attributes¶
Classes¶
CPU architecture enum for platform-specific identifiers. |
Functions¶
Get the platform identifier (arch-os) for the current system, |
|
|
Load the dynamic library containing the C-API based on the platform. |
Module Contents¶
- c2pa.lib.DEBUG_LIBRARY_LOADING = False¶
- c2pa.lib.logger¶
- class c2pa.lib.CPUArchitecture¶
Bases:
enum.Enum
CPU architecture enum for platform-specific identifiers.
- AARCH64 = 'aarch64'¶
- X86_64 = 'x86_64'¶
- ARM64 = 'arm64'¶
- c2pa.lib.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)
- Return type:
str
- c2pa.lib.dynamically_load_library(lib_name=None)¶
Load the dynamic library containing the C-API based on the platform.
- Parameters:
lib_name (Optional[str]) – Optional specific library name to load. If provided, only this library will be loaded.
libraries (This enables to potentially load wrapper)
name (of the C-API that may have an other)
nevertheless ((the presence of required symbols will)
loaded). (be verified once the library is)
- Returns:
The loaded library or None if loading failed
- Return type:
Optional[ctypes.CDLL]