A django app plugin to add a new API to Open edX to export courses to S3 buckets
Project description
Course Export S3 Plugin
A django app plugin to add a new API to Open edX to export courses to S3 buckets.
Installation
You can install this plugin into any Open edX instance by using the following method:
Install from PyPI
# If running devstack in docker, first open a shell in CMS (make studio-shell)
pip install -e git+https://github.com/edly-io/openedx_course_export.git@0.1.0#egg=openedx_course_export
Configuration
1) edx-platform configuration
For testing, you might need to add the following configuration values to the config file in Open edX. For any release after Juniper, that config file is /edx/etc/studio.yml.
AWS_ACCESS_KEY_ID: <your aws access id>
AWS_SECRET_ACCESS_KEY: <your api access key>
COURSE_IMPORT_EXPORT_BUCKET: <bucket name to export the courses to>
How To Use
The API supports a POST API call that accepts the list of course Ids and returns the uploaded paths of the courses on S3
To call the API, Send a POST request to <STUDIO_BASE>/api/courses/v0/export/ with the a payload with a list of course IDs that might look like:
{
"courses": ["course-v1:edX+DemoX+Demo_Course"]
}
The successful response would look like:
With 200
{
"successful_uploads": {
"course-v1:edX+DemoX+Demo_Course": "https://bucket_name.s3.amazonaws.com/course-v1:edX+DemoX+Demo_Course.tar.gz",
"course-v1:edX+Test+Test_Course": "https://bucket_name.s3.amazonaws.com/course-v1:edX+Test+Test_Course.tar.gz"
},
"failed_uploads": {}
}
With 400
{
"successful_uploads": {
"course-v1:edX+DemoX+Demo_Course": "https://bucket_name.s3.amazonaws.com/course-v1:edX+DemoX+Demo_Course.tar.gz",
},
"failed_uploads": {
"course-v1:edX+Test+Test_Course": "Error message"
}
}
The response will contain either the s3 bucket url for successful uploads and/or an error message for failed uploads.
Change Log
Unreleased
[0.1.0] - 2023-02-24
Added
First release on PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for openedx_course_export-0.1.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4664b74469e860acbb28bf36df2f188a70a77bd1c1b3aa09d310b82a9bba76c |
|
MD5 | e5269942786045e61df9dfebacb43049 |
|
BLAKE2b-256 | fef3a1e030adc9b071f78000dcee549bc63da14549667e0daf20911055b954f9 |
Hashes for openedx_course_export-0.1.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50cd4a452a020b2c9a9b8540c8fc8a1981bdee8f478ca6709e67d7f4e147d1c8 |
|
MD5 | 643a21cf5753a82947838f7e0d62efde |
|
BLAKE2b-256 | fb14ebf963a40e641ca001069f24c6118f018f653cc60e491fadf4e7e1f745b2 |