Skip to main content

A python wrapper for UIUC's official REST API for querying course data.

Project description

About

uiuc-api is a simple python package which wraps UIUC's official REST API for querying data about courses. In addition, it deals with some of the annoyances of using the official API by providing some convient structures. Data from the official API is available in XML form, however, it is in an inconvienent-to-parse format. For instance, take the XML data for CS 173:

<label>Discrete Structures</label>

<description>Discrete mathematical structures frequently encountered in the study of Computer Science. Sets, propositions, Boolean algebra, induction, recursion, relations, functions, and graphs. Credit is not given for both CS 173 and MATH 213. Prerequisite: One of CS 125, ECE 220; one of MATH 220, MATH 221.</description>

<creditHours>3 hours.</creditHours>

<courseSectionInformation>Credit is not given for both CS 173 and MATH 213. Prerequisite: One of CS 125, ECE 220; one of MATH 220, MATH 221.</courseSectionInformation>

<classScheduleInformation>Students must register for a lecture and discussion section.</classScheduleInformation>

It is tedious, for example, to accurately parse out the prerequisites in a easy-to-manipulate form. uiuc-api does this for the user:

>>> import uiuc_api as ua
>>> ua.get_course("CS 173").serialize()

Output:

CS 173:
  subject: CS
  number: '173'
  hours: 3
  label: Discrete Structures
  description: 'Discrete mathematical structures frequently encountered in the study
    of Computer Science. Sets, propositions, Boolean algebra, induction, recursion,
    relations, functions, and graphs. Credit is not given for both CS 173 and MATH
    213. Prerequisite: One of CS 125, ECE 220; one of MATH 220, MATH 221.'
  schedule_info: 'Credit is not given for both CS 173 and MATH 213. Prerequisite:
    One of CS 125, ECE 220; one of MATH 220, MATH 221.'
  prereqs:
  - !!python/object/apply:builtins.frozenset
    - - ECE 220
      - CS 125
  - !!python/object/apply:builtins.frozenset
    - - MATH 220
      - MATH 221
  coreqs: []
  constraints: []

Installation

Install the uiuc_api module via pip (uiuc-api also works):

pip install uiuc_api

Documentation

See https://uiuc-api.readthedocs.io/.

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

uiuc-api-0.1.4.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

uiuc_api-0.1.4-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file uiuc-api-0.1.4.tar.gz.

File metadata

  • Download URL: uiuc-api-0.1.4.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.10

File hashes

Hashes for uiuc-api-0.1.4.tar.gz
Algorithm Hash digest
SHA256 01c7abd06aadca27976b9fe06b49eb9769a3ef30c37aaa9d65159a7b62d5e892
MD5 064f1c1cb0c272e6a1e4145523944784
BLAKE2b-256 d474e38c58dc831b5740a7f48c2ac0824712e208182fb8cd37889aadce501abb

See more details on using hashes here.

File details

Details for the file uiuc_api-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: uiuc_api-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.10

File hashes

Hashes for uiuc_api-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 544c48ba23e37545b1c2dd13e27d2018556d75896bcefab1e17608dd9075e67e
MD5 4d321989f0d9527104d48510f6bcf149
BLAKE2b-256 0b175659152d0309a4ce048c3bd4f23de69cfaebdee4b96e7dc9270fc1e263e2

See more details on using hashes here.

Supported by

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