Metadata-Version: 2.1
Name: my-moodle
Version: 0.4.6
Summary: Download Moodle Course content.
Home-page: https://github.com/marcocrowe/my-moodle-py-pi/
Author: Mark Crowe
Author-email: 66536097+marcocrowe@users.noreply.github.com
Project-URL: Bug Tracker, https://github.com/marcocrowe/my-moodle-py-pi/issues
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: license
Requires-Dist: requests==2.32.2


# [My Moodle](https://pypi.org/project/my-moodle/ "My Moodle")

A Python package to download data from Moodle.

## Sample Usage

The following is a sample usage of the package:

```python

%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](config.ini)

```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 &copy; 2024 Mark Crowe <https://github.com/marcocrowe>. All rights reserved.
