Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

An API to easily get data from the University of Pittsburgh

License

NotificationsYou must be signed in to change notification settings

pittcsc/PittAPI

Repository files navigation

Build StatusLicensePython VersionPypi Version

The Pitt API is an unofficial Python API made by Ritwik Gupta at the University of Pittsburgh in an effort to get more open data from Pitt.

Installation

The Pitt API can be installed using the Python package managerpip. To make your development easier, you can run the pip commands in a virtual environment.

  1. Installpipenv using theinstructions for your operating system, pipenv is a tool which manages your python virtual environments for you.
  2. Run the commandspipenv sync --dev andpipenv shell to create and setup the virtual environment.
  3. Install the PittAPI in the new virtual environmentpip install PittAPI, see the usage guide below for further information.

Usage examples

frompittapiimportcourse,dining,lab,laundry,library,news,people,shuttle,textbook### Courses# Returns a dictionary of all courses for a given subjectcs_subject=course.get_subject_courses(subject='CS')courses_dict=cs_subject.courses# Returns a list of sections of a course during a given termcs_course=course.get_course_details(term='2244',subject='CS',course='1501')section_list=cs_course.sections### Textbook# Returns a list of dictionaries containing textbooks for a class# Term number comes from pitt.verbacompare.comsmall_dict=textbook.get_textbook(term="3150",department="CS",course="445",instructor="RAMIREZ")### Library# Returns a dictionary containing results from querybig_dict=library.get_documents(query="computer")### News# Returns a list of dictionaries containing news from main news feedmedium_dict=news.get_news()### Laundry# Returns a dictionary with number of washers and dryers in use vs.# total washers and dryers in buildingsmall_dict=laundry.get_status_simple(building_name="TOWERS")### Computer Lab# Returns a dictionary with status of the lab and number of open machinessmall_dict=lab.get_status(lab_name="ALUMNI")### Shuttle# Returns a list of dictionaries containing routes of shuttlesbig_dict=shuttle.get_routes()### People# Returns a list of people based on the querylist_of_peeps=people.get_person(query="Smith")### Dining# Returns a dictionary of dictionaries containing each dining location with its# name and open/closed statusmedium_dict=dining.get_locations()# Returns a dictionary of a dining location with its hours for a given dayhours=dining.get_location_hours("The Eatery",datetime.datetime(2024,4,12))

Contributing

Read ourcontributing guidelines to learn how to contribute to the Pitt API.

License

This project is licensed under the terms of theGPLv2 license.

About

An API to easily get data from the University of Pittsburgh

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors25


[8]ページ先頭

©2009-2025 Movatter.jp