A Python API for Stanford Explore Courses
Project description
# Stanford Explore Courses Python API #
This package is a Python API for Stanford's Explore Courses site, which enables users to search through Stanford's catalog of over **13,000 courses**.
## Installation ##
Type the following command in terminal to install:
`pip install explorecourses`
## Usage ##
Import the package into your Python program:
`from explorecourses import *`
Create a new CourseConnection:
`connect = CourseConnection()`
Query the Explore Courses database by department code:
`courses = connect.get_courses_by_department("MATH", year="2017-2018")`
Apply filters to your query:
`courses = connect.get_courses_by_query("all courses", filters.AUTUMN, filters.WAY_AII)`
## Sample Program ##
```python
from explorecourses import *
connect = CourseConnection()
# Print out all courses for 2017-2018.
year = "2017-2018"
for school in connect.get_schools(year):
for dept in school.departments:
courses = connect.get_courses_by_department(dept.code, year=year)
for course in courses:
print(course)
```
## Thanks ##
Thanks to Jim Sproch who wrote Stanford's Explore Courses Java API.
This package is a Python API for Stanford's Explore Courses site, which enables users to search through Stanford's catalog of over **13,000 courses**.
## Installation ##
Type the following command in terminal to install:
`pip install explorecourses`
## Usage ##
Import the package into your Python program:
`from explorecourses import *`
Create a new CourseConnection:
`connect = CourseConnection()`
Query the Explore Courses database by department code:
`courses = connect.get_courses_by_department("MATH", year="2017-2018")`
Apply filters to your query:
`courses = connect.get_courses_by_query("all courses", filters.AUTUMN, filters.WAY_AII)`
## Sample Program ##
```python
from explorecourses import *
connect = CourseConnection()
# Print out all courses for 2017-2018.
year = "2017-2018"
for school in connect.get_schools(year):
for dept in school.departments:
courses = connect.get_courses_by_department(dept.code, year=year)
for course in courses:
print(course)
```
## Thanks ##
Thanks to Jim Sproch who wrote Stanford's Explore Courses Java API.
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
explorecourses-1.0.0.tar.gz
(11.7 kB
view hashes)
Built Distribution
Close
Hashes for explorecourses-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7ea3442bc747064404515c9cef6f160c5bc6043f24b93662bff005d218f2858 |
|
MD5 | 7a461b3bb7e452a1e2797cf3339e764d |
|
BLAKE2b-256 | c09d8fd8204a6caf63ca1052165e7b11924da75f645fee50713c6ecef5129392 |