Skip to main content

Download Moodle Course content.

Project description

My Moodle

A Python package to download data from Moodle.

Sample Usage

The following is a sample usage of the package:

%pip install my-moodle

from my_moodle import (ConfigUtility, MoodleDataDownloader)

def main() -> None:
    """Main function"""

    program, server, token = ConfigUtility.check_and_read_config()

    moodle_data_downloader: MoodleDataDownloader = MoodleDataDownloader(
        program, server, token, data_dir=""
    )
    moodle_data_downloader.download_my_data()


# Call the main function
if __name__ == "__main__":
    main()

Get Moodle Token

Using https://moodle.maynoothuniversity.ie as an example:

  1. Open https://moodle.maynoothuniversity.ie/user/managetoken.php
  2. Copy the key for Moodle mobile web service.
  3. Place it in file config.ini
[App]
program = Content Management Systems
server = https://moodle.maynoothuniversity.ie
token = INSERT_YOUR_TOKEN # e.g. 63c1774a3eaf47db816c57ba1abafd40

Note: The token is a secret key, do not share it with anyone.


Copyright © 2024 Mark Crowe https://github.com/marcocrowe. All rights reserved.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

my_moodle-0.4.6.tar.gz (9.7 kB view hashes)

Uploaded Source

Built Distribution

my_moodle-0.4.6-py3-none-any.whl (16.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page