English ▼
Skip to page content Skip to main navigation
e.g. "templates" or "datastore"

# Property Classes

#### Experimental!

Conversion is an experimental, innovative, and rapidly changing new feature for App Engine. Unfortunately, being on the bleeding edge means that we may make backwards-incompatible changes to Conversion. We will inform the community when this feature is no longer experimental.

The following property classes are defined in the module `google.appengine.api.conversion`:

- class Asset
- class ConversionOutput

## class Asset

Class `Asset` represents a single asset in a search request.

An asset is a generic blob of data. A conversion request must contain at least one asset, typically the document contents. Additional assets are those needed for the conversion (such as images in HTML).

### Constructor

The constructor for class `Asset` is defined as follows:

Asset(mime_type,, data, name = None)

Construct an instance of class `Asset`.

  Arguments

    mime_type
      String denoting MIME type of asset.
    data
      String containing data to be converted.
    name
      Name of asset.

  Result value

    A new instance of class `Asset`.

  Exceptions

    TypeError
      A parameter has an invalid type.

### Properties

An instance of class `Asset` has the following properties:

mime_type
  String denoting MIME type of asset.
data
  String containing data to be converted.
name
  Name of asset.

## class ConversionOutput

### Constructor

The constructor for class `ConversionOutput` is defined as follows:

ConversionOutput(conversion_output_proto)

Construct an instance of class `ConversionOutput`.

  Argument

    conversion_output_proto
      Conversion output protocol buffer.

  Result value

    A new instance of class `ConversionOutput`.

  Exception

    AssertionError
      Argument not a conversion output protocol buffer.

### Properties

An instance of class `ConversionOutput` has the following properties:

error_code
  Error code from conversion.
error_text
  Error message if conversion fails.
assets
  List of converted assets (`Asset` instances).