Skip to main content

A simple Python package with some functionalities to interact with moodle-based LMS.

Project description

moodle-kit

A small Python package with some functionalities to deal with moodle-based LMS.

Installation

# New installation
pip3 install moodle-kit

or

# Upgrade installation
pip3 install moodle-kit --upgrade

Usage

# Import Moodle class from package
from moodle_kit import Moodle

# Instantiate an object from Moodle class
moodle = Moodle()

Available features

  • Login
login_url = 'https://example.com/login/index.php'
username = 'your_username'
password = 'your_password'

moodle.login(login_url, username, password)

# The response object is automatically saved in moodle.response property. 
print(moodle.response.status_code)

# However, you can also assign a varible to it.
response = moodle.login(login_url, username, password)
print(moodle.response.status_code)
  • Logout
moodle.logout()

# After logging out, the moodle.response property is updated. So, you can verify if it's successful or not by printing the url.
print(moodle.response.url)

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

moodle-kit-0.1.7.tar.gz (2.8 kB view hashes)

Uploaded Source

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