openedx.core.lib.blockstore_api package#

Submodules#

openedx.core.lib.blockstore_api.db_routers module#

Blockstore database router.

Blockstore started life as an IDA, but is now a Django app plugin within edx-platform. This router exists to smooth blockstore’s transition into edxapp.

class openedx.core.lib.blockstore_api.db_routers.BlockstoreRouter#

Bases: object

A Database Router that uses the blockstore database, if it’s configured in settings.

DATABASE_NAME = 'blockstore'#
ROUTE_APP_LABELS = {'bundles'}#
allow_migrate(db, app_label, model_name=None, **hints)#

Ensure the blockstore tables only appear in the blockstore database.

allow_relation(obj1, obj2, **hints)#

Allow relations if both objects are blockstore app models.

db_for_read(model, **hints)#

Use the BlockstoreRouter.DATABASE_NAME when reading blockstore app tables.

db_for_write(model, **hints)#

Use the BlockstoreRouter.DATABASE_NAME when writing to blockstore app tables.

Module contents#

API Client for Blockstore

TODO: This should all get ripped out.

TODO: This wrapper is extraneous now that Blockstore-as-a-service isn’t supported.

This whole directory tree should be removed by openedx/blockstore#296.