Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

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.


Type the following command in terminal to install:

pip install explorecourses


Import the package's classes into your Python program:

from explorecourses import *

Import the filters module if you would like to use search filters:

from explorecourses import filters

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

from explorecourses import *
from explorecourses import filters

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:


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.

Files for explorecourses, version 1.0.6
Filename, size File type Python version Upload date Hashes
Filename, size explorecourses-1.0.6-py3-none-any.whl (18.5 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size explorecourses-1.0.6.tar.gz (13.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page