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 details)

Uploaded Source

File details

Details for the file moodle-kit-0.1.7.tar.gz.

File metadata

  • Download URL: moodle-kit-0.1.7.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.5

File hashes

Hashes for moodle-kit-0.1.7.tar.gz
Algorithm Hash digest
SHA256 308ef0247d571b638fc72e3083660f5d62c0046587aa1a858dca00effd47d3ac
MD5 a55e8973dd047ee47c185b5d11ca8f55
BLAKE2b-256 d3c652db3ade8b2ab12483a62bd9e15bdc573faf87c2f484796838c393340514

See more details on using hashes here.

Supported by

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