Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

moodlepy

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

moodlepy

Python wrapper for moodle web service.

  • 0.24.1
  • PyPI
  • Socket score

Maintainers
1

moodlepy

PyPi Package Version Supported Python versions LICENSE Tests codecov pre-commit Mypy

Python wrapper for moodle web service.

Introduction

This library provide a pure Python interface for Moodle Web Service. It's compatible with Python versions 3.8+

Install moodlepy<=0.22.2 for python 3.6 support. Install moodlepy<=0.23.8 for python 3.7 support.

Installing

You can install or upgrade moodlepy with:

pip install moodlepy --upgrade

Or you can install from source with:

git clone https://github.com/hexatester/moodlepy
cd moodlepy
python setup.py install

Usage

Example usage

from moodle import Moodle
url = 'https://my.domain/webservice/rest/server.php'
token = 'super secret token'
moodle = Moodle(url, token)
dict_site_info = moodle('core_webservice_get_site_info')
site_info = moodle.core.webservice.get_site_info()  # return typed site_info

print(dict_site_info)
print(site_info)

# or
from moodle import Mdl
from moodle.core.webservice import BaseWebservice

moodle = Mdl(url, token)
webservice = BaseWebservice(moodle)
site_info2 = webservice.get_site_info()

assert site_info == site_info2

❗️ If the function area does not have a type in the support table, the return value is in accordance with the Moodle web service documentation, wich mostly dict.

In the future all of Web service functions will be covered by moodlepy.

Moodle Web Service support

AreaFunctionsTypesTestsStatus
auth_emailAA
blockAA
core_authAA
core_backupAA
core_badgeAAA
core_blogAAA
core_calendarAA
core_cohortAA
core_commentAA
core_competency
core_completionAA
core_course
core_customfieldAA
core_enrol
core_fetch
core_files
core_filters
core_form
core_get
core_gradesA
core_grading
core_group
core_h5p
core_messageA
core_notesAA
core_output
core_question
core_rating
core_role
core_search
core_session
core_tag
core_update
core_user
core_webserviceAAAA
enrol_guestAA
enrol_manualAA
enrol_selfAA
gradereport_overview
gradereport_user
gradingform_guide
gradingform_rubric
local_mobile
message_airnotifier
message_popup
mod_assign
mod_book
mod_chatA
mod_choice
mod_dataA
mod_feedback
mod_folderAA
mod_forum
mod_glossary
mod_imscp
mod_label
mod_lesson
mod_lti
mod_pageAA
mod_quiz
mod_resourceAA
mod_scorm
mod_survey
mod_urlAA
mod_wiki
mod_workshopA
report_competency
report_insights
tool_analytics
tool_lp
tool_mobileAA
tool_templatelibrary
tool_usertours
tool_xmldb

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc