Skip to main content

Python tools for building Penn-related applications

Project description

Penn SDK is the Python library for writing code that interfaces with University of Pennsylvania data. It consists of wrappers for the Registrar, Dining, and Directory API’s

Getting an API key

To use these libraries, you must first obtain an API token and password, which can be done here. There are separate API tokens and password for each of dining, registrar, news/events/maps, transit, and directory.

There is also a Laundry API, Study Spaces API, and Calendar, which don’t need a key.


The full API documentation can be found at

Documentation for the wrapper can be found at


You can install PennSDK easily using pip

$ sudo pip install PennSDK

easy_install also works

# sudo easy_install PennSDK

Getting Started

Once you have an API token and Password, you can use the wrapper as follows.

from penn import Registrar



cis120 = r.course('cis', '120')

# cis120 is a dictionary parsed from the API json
my_data = cis120['result_data']

All of other services (Dining, Directory, Transit, News, Map) follow this same basic format, except for the Laundry, Study Spaces, and Calendar API’s, which don’t need a username and password passed in at initialization. Refer to the wrapper documentation at for more info.

Running Tests

Once you have an API token and password, you can run the tests by creating a tests/ file with them as constants. Depending on what you want to test, include the following variables. They will be retrieved from your environment variables by default.





Then run make test to run all tests in your shell.

Contributing & Bug Reporting

If you find a bug, please submit it through the GitHub issues page.

Pull requests are welcome!

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

PennSDK-1.5.1.tar.gz (12.6 kB view hashes)

Uploaded Source

Built Distributions

PennSDK-1.5.1-py3-none-any.whl (16.9 kB view hashes)

Uploaded Python 3

PennSDK-1.5.1-py2-none-any.whl (16.9 kB view hashes)

Uploaded Python 2

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page