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.2.tar.gz (8.7 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.2-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: uims-api-0.1.2.tar.gz
  • Upload date:
  • Size: 8.7 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.2.tar.gz
Algorithm Hash digest
SHA256 7999d73a08aa449fdb72d8c4bad5b594deeb275deffb4423a6f78f465bdd2aaa
MD5 1860f81b3fe677bac3549af8e91a4a6c
BLAKE2b-256 99de63c163f3024c9a6e0adea270cb5b0ab22a7d9d23a4eff06b218753cf2104

See more details on using hashes here.

File details

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

File metadata

  • Download URL: uims_api-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0a470b9a3eaafaa363fea6709e242198598b820ff652f6306ca2eeb4e3c8670e
MD5 213cfa976441c6215cd5b120e36329f0
BLAKE2b-256 02a559f4c54e7b830cb86f1d9c772578b57459d6e747c472a98e47daa539247c

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