Metadata-Version: 2.1
Name: openedx-course-export
Version: 0.1.4
Summary: A django app plugin to add a new API to Open edX to export courses to S3 buckets
Home-page: https://github.com/openedx/openedx_course_export
Author: edX
Author-email: oscm@edx.org
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: Django
Classifier: Framework :: Django :: 3.2
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Requires-Python: >=3.5
License-File: LICENSE.txt

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**

.. code-block::

    pip install 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``.

.. code-block::


    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:


.. code-block::


    {
       "courses": ["course-v1:edX+DemoX+Demo_Course"]
    }


The successful response would look like:


.. code-block::

    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
##########

..
   All enhancements and patches to openedx_course_export will be documented
   in this file.  It adheres to the structure of https://keepachangelog.com/ ,
   but in reStructuredText instead of Markdown (for ease of incorporation into
   Sphinx documentation and the PyPI description).

   This project adheres to Semantic Versioning (https://semver.org/).

.. There should always be an "Unreleased" section for changes pending release.

Unreleased
**********

*

[0.1.0] - 2023-02-24
************************************************

Added
=====

* First release on PyPI.
