|
| app_id |
|
| host_port |
|
| host |
|
| url_path |
|
| kind |
|
| throttle |
|
| batch_size |
|
| secure |
|
| authenticated |
|
| auth_called |
|
| parallel_download |
|
| email |
|
| passin |
|
| mapper |
|
| dry_run |
|
A class which wraps a connection to the server.
def google.appengine.tools.bulkloader.RequestManager.__init__ |
( |
|
self, |
|
|
|
app_id, |
|
|
|
host_port, |
|
|
|
url_path, |
|
|
|
kind, |
|
|
|
throttle, |
|
|
|
batch_size, |
|
|
|
secure, |
|
|
|
email, |
|
|
|
passin, |
|
|
|
dry_run = False , |
|
|
|
server = None , |
|
|
|
throttle_class = None |
|
) |
| |
Initialize a RequestManager object.
Args:
app_id: String containing the application id for requests.
host_port: String containing the "host:port" pair; the port is optional.
url_path: partial URL (path) to post entity data to.
kind: Kind of the Entity records being posted.
throttle: A Throttle instance.
batch_size: The number of entities to transfer per request.
secure: Use SSL when communicating with server.
email: If not none, the username to log in with.
passin: If True, the password will be read from standard in.
server: An existing AbstractRpcServer to reuse.
throttle_class: A class to use instead of the default
ThrottledHttpRpcServer.
def google.appengine.tools.bulkloader.RequestManager.Authenticate |
( |
|
self | ) |
|
Invoke authentication if necessary.
def google.appengine.tools.bulkloader.RequestManager.AuthFunction |
( |
|
self, |
|
|
|
raw_input_fn = raw_input , |
|
|
|
password_input_fn = getpass.getpass |
|
) |
| |
Prompts the user for a username and password.
Caches the results the first time it is called and returns the
same result every subsequent time.
Args:
raw_input_fn: Used for dependency injection.
password_input_fn: Used for dependency injection.
Returns:
A pair of the username and password.
def google.appengine.tools.bulkloader.RequestManager.EncodeContent |
( |
|
self, |
|
|
|
rows, |
|
|
|
loader = None |
|
) |
| |
Encodes row data to the wire format.
Args:
rows: A list of pairs of a line number and a list of column values.
loader: Used for dependency injection.
Returns:
A list of datastore.Entity instances.
Raises:
ConfigurationError: if no loader is defined for self.kind
def google.appengine.tools.bulkloader.RequestManager.GetEntities |
( |
|
self, |
|
|
|
key_range_item, |
|
|
|
key_factory = datastore.Key , |
|
|
|
keys_only = False , |
|
|
|
retry_parallel = False |
|
) |
| |
Gets Entity records from a remote endpoint over HTTP.
Args:
key_range_item: Range of keys to get.
key_factory: Used for dependency injection.
keys_only: bool, default False, only get keys values
retry_parallel: bool, default False, to try a parallel download despite
past parallel download failures.
Returns:
A DownloadResult instance.
Raises:
ConfigurationError: if no Exporter is defined for key_range_item.kind
def google.appengine.tools.bulkloader.RequestManager.GetMapper |
( |
|
self, |
|
|
|
kind |
|
) |
| |
Returns a mapper for the registered kind.
Returns:
A Mapper instance.
Raises:
ConfigurationError: if no Mapper is defined for kind
def google.appengine.tools.bulkloader.RequestManager.GetSchemaKinds |
( |
|
self | ) |
|
Returns the list of kinds for this app.
There can be 3 possible cases using namespaces:
a.) No namespace specified and Datastore has only default namespace ->
Query GlobalStat and KindStat.
b.) No namespace specified but Datastore has multiple namespace ->
Query NamespaceGlobalStat and NamespaceKindStat.
c.) Namespace specified and Datastore has multiple namespaces ->
Query NamespaceGlobalStat and NamespaceKindStat.
Returns:
A list of kinds.
def google.appengine.tools.bulkloader.RequestManager.PostEntities |
( |
|
self, |
|
|
|
entities |
|
) |
| |
Posts Entity records to a remote endpoint over HTTP.
Args:
entities: A list of datastore entities.
def google.appengine.tools.bulkloader.RequestManager.ReserveKeys |
( |
|
self, |
|
|
|
keys |
|
) |
| |
Reserve all ids in the paths of the given keys.
Args:
keys: A list of keys with ids in their paths, for which the corresponding
id sequences should be advanced to prevent id collisions.
The documentation for this class was generated from the following file:
- code/googleappengine-read-only/python/google/appengine/tools/bulkloader.py