Components for loading and unloading data using the Google App Engine Datastore.

Added in version 1.1

class fixture.loadable.google_datastore_loadable.GoogleDatastoreFixture(env=None, **kw)

Bases: fixture.loadable.loadable.EnvLoadableFixture

A fixture that knows how to load DataSet objects into Google Datastore Entity objects.

>>> from fixture import GoogleDatastoreFixture

See Using Fixture With Google App Engine for a complete example.

Keyword Arguments:

A Style object to translate names with
A dict or module that contains Entity classes. This will be searched when Style translates DataSet names into storage media. See EnvLoadableFixture.attach_storage_medium for details on how env works.
SuperSet class to represent loaded data with
A custom StorageMediumAdapter class to instantiate when storing a DataSet. By default, an Entity adapter will be used so you should only set a custom medium if you know what you doing.

Added in version 1.1

class fixture.loadable.google_datastore_loadable.EntityMedium(medium, dataset)

Bases: fixture.loadable.loadable.StorageMediumAdapter

Adapts google.appengine.api.datastore.Entity objects and any other object that is an instance of Entity

save(row, column_vals)
Save this entity to the Datastore
Delete this entity from the Datastore

Previous topic


Next topic