用于与veracross api交互的简单库
veracross-api的Python项目详细描述
veracross api python库
提供了从python中的veracross api获取信息的简单方法。
将自动处理速率限制和分页。
用法示例:
importveracross_apiasvc={'school_short_name':'abc','vcuser':'username','vcpass':'password'}# Create a new object with libraryvc=v.Veracross(c)# Follow the guidelines specified here: https://api.veracross.com/docs# Specify the endpoint documented in the api or just one record from that target.# Examples of endpoint are: facstaff, students, classes, courses, course_schedules, enrollments, etc.# To return one record from that target, just specify the id number.# Additional parameters are passed using a dictionary.# Return all faculty and staffdata=vc.pull("facstaff")print(data)# Return one faculty and staff member by iddata=vc.pull("facstaff/99999")print(data)# Pass url parameters in a dictionary to the pull method.# Return all faculty staff updated after 2019-01-01param={"updated_after":"2019-01-01"}data=vc.pull("facstaff",parameters=param)print(data)# Return the amount of requests left in rate limitingvc.rate_limit_remaining# Return the amount of time left before the limit is resetvc.rate_limit_reset
所有数据都将作为字典返回。