A library that provides an XBlock runtime environment which uses the Google App Engine datastore.
- 2013-12-16: Change Datastore entities to persist data in JSON blobs. NOTE: This is incompatible with previous versions.
- 2013-12-10 and 2013-11-05: Upate the version of XBlock
- 2013-10-24: Initial relaese.
In addition to App Engine itself, this relies on edX's XBlock project.
The library is bundled with a simple App Engine application which enables a user to:
- Install a XBlock usage from a snippet of XML
- View and interact with the given XBlock
To run the application on common Linux distributions, execute:
sh ./scripts/run_example.sh
This will install all the dependencies and start the server. If this script cannot be run on your platform, follow the steps below:
- Download the XBlock repo from GitHub into the
examples/lib/
folder. For consistency, you should check out commit2daa4e541c1613a703262c9dcd6be9c1928b1299
.- In the
examples/lib/XBlock
folder, execute:python setup.py egg_info
- In the
examples/lib/XBlock/thumbs
folder, execute:python setup.py egg_info
- Create a folder
examples/lib/appengine_xblock_runtime
and copyappengine_xblock_runtime
andsetup.py
into it.- In
examples/lib/appengine_xblock_runtime
execute:python setup.py egg_info
- Start the App Engine development server in the
examples/
folder:PATH_TO_GAE_SDK/dev_appserver.py .
To install on production App Engine, follow the steps above and then:
- Create a new application on App Engine (https://appengine.google.com/) with a name that matches the application name in
app.yaml
(e.g. 'xblock-example')- Deploy with the command
$APP_ENGINE_SDK/appcfg.py update .
To run the tests on common Linux distributions, execute:
sh ./scripts/tests.sh
If this script cannot be run on your platform, follow the steps in _Examples. Ensure that the following packages are on your `PYTHONPATH
:
- The App Engine SDK
- WebOb (available the
`lib
folder in the App Engine SDK)- XBlock
To run the test suite: nosetests tests
To use the library in a Google App Engine application, you should follow these steps:
- Create a
lib/
folder in your application.- Download the XBlock repo from GitHub into your
lib/
folder.- In the
lib/XBlock
folder, execute:python setup.py egg_info
- Download this runtime package into your
lib/
folder.- In the
lib/appengine_xblock_runtime
folder, execute:python setup.py egg_info
- Register the two packages by including in your application code:
pkg_resources.working_set.add_entry(
path_to_XBlock)
andpkg_resources.working_set.add_entry(
path_to_this_pkg)