Skip to main content

Python wrapper for the RateMyProfessors GraphQL API

Project description

rmp-api

A Python library for querying the RateMyProfessors GraphQL API. Search for professors, fetch their ratings, and compute quality signals from the data.

No API key required. No scraping. Requires Python 3.10+.


Installation

pip install git+https://github.com/AidenTran900/rmp-api.git

Or clone and install locally:

git clone https://github.com/AidenTran900/rmp-api.git
cd rate-my-prof-api
pip install -e .

Quick start

from rmp_api import search_schools, search_professors, get_all_ratings, compute_score

schools = search_schools("UC Berkeley")
school_id = schools[0].id

professors = search_professors("John DeNero", school_id)
professor_id = professors[0].id

ratings = get_all_ratings(professor_id)
score = compute_score(ratings)

print(score.composite_score)     # 0.82
print(score.raw_avg_rating)      # 4.1
print(score.top_tags[:3])        # [('Respected', 14), ('Clear grading', 11), ...]

What it does

  • Search for schools and professors by name
  • Fetch individual student ratings with comments, grades, tags, and difficulty scores
  • Compute quality signals: recency-weighted rating, reliability score, easiness, would-take-again rate
  • Compare multiple professors side-by-side on any signal
  • Track how a professor's score has changed over time (by year, semester, or quarter)
  • Filter ratings by course code, keyword, or delivery format

Documentation

Full docs at docs.aidentran.dev/rmp-api (Getting Started, API Reference, Examples, Troubleshooting).


Notes

  • Uses RateMyProfessors' public GraphQL endpoint. No auth required.
  • This wraps an unofficial API!!! It may break if RMP changes their internal schema.
  • Ratings are returned newest first.
  • Results are cached per process. Call .cache_clear() on search_schools, search_professors, or get_courses to invalidate.
  • RMP may rate-limit heavy requests. Add time.sleep(0.5) between calls when fetching many professors.

Built off snow4060/rmp-api.

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

rmp_api-0.1.1.tar.gz (37.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rmp_api-0.1.1-py3-none-any.whl (20.7 kB view details)

Uploaded Python 3

File details

Details for the file rmp_api-0.1.1.tar.gz.

File metadata

  • Download URL: rmp_api-0.1.1.tar.gz
  • Upload date:
  • Size: 37.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rmp_api-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5b5d9c19c5c75f0dd6defe2ed6f97cd21fa23b6b28f4cc4f8d27001eda28f257
MD5 ab6c24235c5730cb2be7fd58c55c1404
BLAKE2b-256 3260ac9de020aa24be3a7c0e5824d76bb1f9d98f2035cc34ad0b2ad01d025ade

See more details on using hashes here.

Provenance

The following attestation bundles were made for rmp_api-0.1.1.tar.gz:

Publisher: release.yml on AidenTran900/rmp-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rmp_api-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: rmp_api-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 20.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rmp_api-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0992794126626314791ee17990042ee239e3f854514ab05c87ac1c0353d52741
MD5 b138e9d700e8afe56f49201080513f21
BLAKE2b-256 8cd80be5078a3810d26f851cd090712c0a25d25cd8c6722ffe9cdec1c14faa83

See more details on using hashes here.

Provenance

The following attestation bundles were made for rmp_api-0.1.1-py3-none-any.whl:

Publisher: release.yml on AidenTran900/rmp-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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