explore-courses-api

所属分类:Python编程
开发工具:Python
文件大小:0KB
下载次数:0
上传日期:2021-04-24 19:01:34
上 传 者sh-1993
说明:  斯坦福探索课程的Python API,
(A Python API for Stanford s Explore Courses,)

文件列表:
LICENSE (1080, 2021-04-24)
explorecourses/ (0, 2021-04-24)
explorecourses/__init__.py (495, 2021-04-24)
explorecourses/classes.py (18571, 2021-04-24)
explorecourses/course_connection.py (3606, 2021-04-24)
explorecourses/filters.py (1848, 2021-04-24)
setup.cfg (21, 2021-04-24)
setup.py (801, 2021-04-24)
tests/ (0, 2021-04-24)
tests/__init__.py (0, 2021-04-24)
tests/test_attribute.py (917, 2021-04-24)
tests/test_course.py (46209, 2021-04-24)
tests/test_course_connection.py (1321, 2021-04-24)
tests/test_department.py (606, 2021-04-24)
tests/test_instructor.py (1123, 2021-04-24)
tests/test_learning_objective.py (1191, 2021-04-24)
tests/test_schedule.py (1964, 2021-04-24)
tests/test_school.py (1396, 2021-04-24)
tests/test_section.py (3847, 2021-04-24)
tests/test_tag.py (732, 2021-04-24)

# 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'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 ## ```python 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: print(course) ``` ## Thanks ## Thanks to Jim Sproch who wrote Stanford's Explore Courses Java API.

近期下载者

相关文件


收藏者