Skip to main content

A Python library to access information via https://uims.cuchd.in

Project description

PyPi License: MIT

uims-api

This is a Python library which scrapes https://uims.cuchd.in for account information. Our goal is to wrap commonly used web functionality as easy-to-use methods.

Installation

$ pip install uims-api

Running locally:

You need to have Python 3 installed on your system. Python 2 might work but we won't provide any support for it. You also need to have the command-line version for git installed, otherwise you could directly download and extract the ZIP file of this repository and follow along.

Open up a terminal and run: (The $ sign indicates the commands are to be run in a shell. It is not supposed to be a part of the command)

$ git clone https://github.com/cu-unofficial/uims-api
$ cd uims-api
$ pip install -e .

Usage Examples

from uims_api import SessionUIMS

# replace these with your credentials
my_account = SessionUIMS("YourUID", "YourPass")

# `my_acc.attendance` returns attendance info for available subjects in JSON format
subjects = my_account.attendance

# display attendance for each subject
for subject in subjects:
    subject_attendance = "{} - {}%".format(subject["Title"], subject["TotalPercentage"])
    print(subject_attendance)

Available Methods

Methods Description
full_name returns user's full name
attendance returns user's minimal attendance
full_attendance returns user's attendance including day-wise marked report history for each subject
timetable returns user's timetable
available_sessions returns user's available sessions
marks(session) returns marks for the session provided as argument

Documentation

Coming soon?

Contributing

Let's keep this as minimal as possible using requests and BeatifulSoup libraries.

Relying on browser automation tools (selenium) could work but isn't a very portable solution. It is slower and takes up more processing power. Also, setting up such tools could end up being a nightmare when attempting them to run on headless devices (such as a Raspberry Pi).

That said, if you know Python, any pull requests to enhance capabilities or cover up more end points that make use of requests and BeautifulSoup libraries are most welcome! Otherwise if you don't know Python, you could help me complete my assignments!

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

uims-api-0.1.1.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

uims_api-0.1.1-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file uims-api-0.1.1.tar.gz.

File metadata

  • Download URL: uims-api-0.1.1.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for uims-api-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a51b13aa155aae4d63ae2ae589d106330012f1ad4859ce0df97caa315bb2b6d8
MD5 85055a10a1a6ce21ceb6d0f214cfaf05
BLAKE2b-256 4cdec96eeb32b1f960ca40fa2667810ad1e357e453fd85f4bbf3f5870336c919

See more details on using hashes here.

File details

Details for the file uims_api-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: uims_api-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for uims_api-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 aba86cedcace5f2e1a03b9c9b58da83b0f3aebe0af15651e328cf60eef91ec18
MD5 2d82f0c2569cbb53074302f05cffc8f3
BLAKE2b-256 817493bcc3de571e04086d8a4c84271b7b0c44ef61a9651acd260c6b06206bc9

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