IO

Asset

class adobe.pdfservices.operation.io.asset.Asset

Bases: ABC

Represents the basic contract for the assets to be used with PDFServicesJob

CloudAsset

class adobe.pdfservices.operation.io.cloud_asset.CloudAsset(asset_id, download_uri=None)

Bases: Asset

This class represents an asset stored in Adobe internal storage.

Constructs an instance of CloudAsset.

Parameters:
  • asset_id (str) – assetId of the asset.

  • download_uri (str) – downloadURI of the asset.

get_asset_id()
Returns:

the assetId of the asset.

Return type:

str

get_download_uri()
Returns:

the downloadURI of the asset.

Return type:

str

ExternalAsset

class adobe.pdfservices.operation.io.external_asset.ExternalAsset(uri: str, *, external_storage_type: ExternalStorageType = None)

Bases: Asset

This class represents an asset stored in an external storage.

Constructs an instance of ExternalAsset.

Parameters:
  • uri (str) – URI of the external asset, can not be None.

  • external_storage_type (ExternalStorageType) – external storage type. (Optional, use key-value)

get_external_storage_type()
Returns:

the externalStorageType of the external asset.

Return type:

ExternalStorageType

get_uri()
Returns:

the URI of the external asset.

Return type:

str

ExternalStorageType

class adobe.pdfservices.operation.io.external_storage_type.ExternalStorageType(value, names=None, *values, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

Represents external storage types.

BLOB = 'BLOB'

Represents Blob storage.

DROPBOX = 'DROPBOX'

Represents Dropbox storage.

S3 = 'S3'

Represents S3 storage.

SHAREPOINT = 'SHAREPOINT'

Represents Sharepoint storage.

classmethod get(storage_type: str)

Returns ExternalStorageType instance for its string representation.

Parameters:

storage_type (str) – Storage type code

StreamAsset

class adobe.pdfservices.operation.io.stream_asset.StreamAsset(input_stream, mime_type)

Bases: object

This class encapsulates input stream and the media type of Asset.

Constructs an instance of StreamAsset.

Parameters:
  • input_stream – input stream of the asset; can not be None.

  • mime_type (str) – mime type of the input stream; can not be None.

get_input_stream()
Returns:

the input stream of the asset.

get_mime_type()
Returns:

the mime type of the asset.

Return type:

str