Skip to main content

OurvleApi

Unofficial API to interface with OurVle through python

Getting Started:

Install package with pip
pip install OurvleApi
Import the package
from OurvleApi import ourvle

Features:

Without Login

  • View and read news
  • Get help information
  • login

With Login:

  • View all your courses
  • Get detailed information about your courses, including the lecturers, resources. news and links

Functions:

Without Login

ourvle.news()
  • Returnts a list of News objects (sourced from the front page)
news_list = ourvle.news()
ourvle.help()
  • Prints a string of helpful information
ourvle.login(username,password)
  • Accepts strings for username and password
  • Returns a Client object
  • Prints the name of the user
client = login(username,password)
  ==> Alexander McIntosh

With Login

Client:

Client.session
  • Returns a session object with the necessary cookies to traverse the website
Client.course_list
  • Returns a list of Course objects
my_courses = client.course_list
print(my_courses)
  ==> [COMP1161, COMP1210,...]
print(my_courses[1])
  ==> COMP1210 | S2_2022/23 Mathematics for Computing ['Fake Name', 'Faker Name']
Client.user
  • Returns a string of the name of the current user
client.user
  ==> Alexander McIntosh

Course:

Course.name
  • Returns a string of the course name
test_course = my_courses[1]
test_course.name
  ==> S2_2022/23 Mathematics for Computing
Course.code
  • Returns a string of the course code
test_course.code
  ==> COMP1210
Course.link
  • Returns a string of the link to the course page
  ==> https://ourvle.mona.uwi.edu/course/....
Course.teachers
  • Returns a list of dictionaries with the course teachers' information
test_course.teachers
  ==> [{'role': 'Lecturer', 'name': 'Fake Name', 'profile_link': 'https://ourvle.mona.uwi.edu/user....'}, {'role': 'Tutor', 'name': 'Faker Name', 'profile_link': 'https://ourvle.mona.uwi.edu/user....'}]
Course.resources()
  • returns a list of dictionaries with the course resources organized by topic (or section)
test_course.resources()
  ==> [{'section_name': 'NOTICE', 'resources': [Course Outline File, TEXTBOOK (New Elementary Approach to Japanese)  Units 1-2 File, Textbook Units 1-5 File,...]}...]
Course.links()
  • returnsa a list of dictionaries with the course links organized by topic (or section) including links to online classes.
test_course.links()
  ==> [{'section_name': 'General', 'links': []}, {'section_name': 'COURSE OUTLINE', 'links': []}, {'section_name': 'ZOOM ONLINE TEACHING CORNER', 'links': [{'name': 'ZOOM LECTURES  (ONLINE) - Mona and WJC_Tuesdays', 'link': 'https://ourvle.mona.uwi.edu/....}]

(experimental)

Course.blocks()
  • Returns a list of dictionaries with information in blocks located around the course page (if any)
test_course.blocks()
  ==> []
Course.news()
  • Returns a list of dictionaries with information about items in the course news block (if any)
test_course.news()
  ==> [{'date': '31 Jan, 21:55', 'author': Fake Name, 'topic': 'ONLINE Tutorial', 'link': 'https://ourvle.mona.uwi.edu/...}]

Resource

Resource.name
  • Returns a string with the name of the Resource
resource.name
  ==> 'Course Outline File'
Resource.details
  • Returns a string with the Resource details
resource.details
  ==> '15KB Word document'
Resource.link
  • Returns a string with the link to the resource
resource.link
  ==>'https://ourvle.mona.uwi.edu/mod/resource/view....'
Resource.download(*name)
  • Downloads the resource
  • If no name is passed, uses the resource name
  • File extension should not be included when passing the name
resource.download("outline")

News:

News.topic
  • Returns the topic of the news post as a string
test_news = news_list[0]
test_news.topic
  ==> 'Unavailability of UWI Mona ICT Services; December 28 - 31, 2022'
News.author
  • Returns the author of the news post as a string
test_news.author
  ==> 'OurVle Administrator'
News.date
  • Returns the date the news was posted as a string
test_news.date
  ==>'Tue, 27 Dec 2022, 1:32 PM'
News.link
  • Returns the link to the news post as a string
test_news.link
  ==> 'https://ourvle.mona.uwi.edu/mod/forum/....'
News.content()
  • Reuturns the content of the news post as a string
test_news.content()
  ==> 'TO WHOM IT MAY CONCERN\n\xa0\nGood day.\nAs per a Mona Messaging announcement sent on Dec.... Regards,'

DISCLAIMER:

This API is not affiliated with, endorsed by, or sponsored by the University of the West Indies (UWI) or OurVle. The information provided through this API is intended for educational and informational purposes only and is not guaranteed to be accurate or up-to-date. The University of the West Indies and OurVle are the sole owners of all rights, title, and interest in OurVle. Use of this API is subject to the terms and conditions outlined by the University of the West Indies and OurVle. By using this API, you agree to indemnify and hold harmless the University of the West Indies and OurVle for any and all claims arising from your use of this API.

Metadata

Release files for OurvleApi 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for OurvleApi 0.3.1
File Size Uploaded
OurvleApi-0.3.1.tar.gz 6.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for OurvleApi 0.3.1
File Interpreter ABI Platform
OurvleApi-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 13.1 kB

Release files / OurvleApi-0.3.1.tar.gz

Download URL OurvleApi-0.3.1.tar.gz
Size 6.4 kB
Tags Source
SHA-256 checksum
How to use checksums
2480de43a15d8af87b7f6f4a634c0cc7e2094d74f1ac97b67ed0297d31124c52
BLAKE2b-256 checksum
How to use checksums
a3eaca5216d772ecd3cfb83c08dece6642f9f58f7062dc72b93d1784c6aeeb7d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.7

Release files / OurvleApi-0.3.1-py3-none-any.whl

Download URL OurvleApi-0.3.1-py3-none-any.whl
Size 6.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b26e57dcda8d34a77c6d463cb1d76e2f1c37b75d1a1203211b5c56f412d1de66
BLAKE2b-256 checksum
How to use checksums
edad47d70e8dda8a33861756e02387fac58b8c8cdb61655c7fcc69fae712dbc8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.7

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files

0.2.5

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page