App Engine Python SDK  v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
google.appengine.ext.bulkload.simpletext_connector.SimpleTextConnector Class Reference
Inheritance diagram for google.appengine.ext.bulkload.simpletext_connector.SimpleTextConnector:
google.appengine.ext.bulkload.connector_interface.ConnectorInterface

Public Member Functions

def create_from_options
 
def __init__
 
def initialize_export
 
def write_dict
 
def finalize_export
 
- Public Member Functions inherited from google.appengine.ext.bulkload.connector_interface.ConnectorInterface
def generate_import_record
 
def initialize_export
 
def write_dict
 
def finalize_export
 

Public Attributes

 template
 
 prolog
 
 epilog
 
 mode
 
 export_file_pointer
 
 bulkload_state
 

Static Public Attributes

tuple VALID_MODES = ('text', 'nonewline', 'binary')
 

Detailed Description

Write a text file from dicts for each record. Does not support import.

Constructor & Destructor Documentation

def google.appengine.ext.bulkload.simpletext_connector.SimpleTextConnector.__init__ (   self,
  template,
  prolog = None,
  epilog = None,
  mode = 'text',
  name = '' 
)
Constructor.

Args:
  template: A Python dict-interpolation string.
  prolog: written before the per-record output.
  epilog: written after the per-record output.
  mode: one of the following, default is 'text'
text: text file mode, newlines between records.
nonewline: text file mode, no added newlines.
binary: binary file mode, no added newlines.

Member Function Documentation

def google.appengine.ext.bulkload.simpletext_connector.SimpleTextConnector.create_from_options (   cls,
  options,
  name 
)
Factory using an options dictionary.

Args:
  options: Dictionary of options containing:
template: A Python dict-interpolation string. Required.
prolog: written before the per-record output.
epilog: written after the per-record output.
mode: one of the following, default is 'text'
  text: text file mode, newlines between records.
  nonewline: text file mode, no added newlines.
  binary: binary file mode, no added newlines.
  name: The name of this transformer, for use in error messages.

Returns:
  SimpleTextConnector object described by the specified options.

Raises:
  InvalidConfiguration: If the config is invalid.
def google.appengine.ext.bulkload.simpletext_connector.SimpleTextConnector.finalize_export (   self)
Write epliog and close file after every record is written.
def google.appengine.ext.bulkload.simpletext_connector.SimpleTextConnector.initialize_export (   self,
  filename,
  bulkload_state 
)
Open file and write prolog.
def google.appengine.ext.bulkload.simpletext_connector.SimpleTextConnector.write_dict (   self,
  dictionary 
)
Write one record for the specified entity.

The documentation for this class was generated from the following file: