A Python API Client for RateMyProfessors.
Project description
RateMyProfessors API Client
Typed, retrying, rate-limited unofficial client for RateMyProfessors, with optional helpers for ingestion workflows (sentiment, dedupe, course-code normalization).
Note: This library is unofficial and may break if RMP changes their internal API. This library has been made open-source so that if/when there are any changes, someone is able to take note of these changes and help to contribute an update.
Installation
pip install ratemyprofessors-client
With optional sentiment extras (TextBlob):
pip install 'ratemyprofessors-client[sentiment]'
Quickstart
from rmp_client import RMPClient
SCHOOL_ID = 1466 # example: Queen's University ID on RMP
with RMPClient() as client:
for prof in client.iter_professors_for_school(SCHOOL_ID, page_size=20):
print(prof.name, prof.overall_rating, prof.num_ratings)
Fetch details and iterate ratings incrementally:
from datetime import date
from rmp_client import RMPClient
with RMPClient() as client:
professor = client.get_professor("PROFESSOR_ID")
for rating in client.iter_professor_ratings(professor.id, since=date(2024, 1, 1)):
print(rating.date, rating.quality, rating.comment)
Extras
Optional helpers live under rmp_client.extras:
rmp_client.extras.sentiment.analyze_sentimentrmp_client.extras.dedupe.normalize_comment/is_valid_commentrmp_client.extras.course_codes.build_course_mapping
See docs/ and examples/ for more. This repo also includes an
examples/ingest_supabase.py script that mirrors a Supabase-centric
scraping pipeline using this client.
Publishing to PyPI
This project follows the Python Packaging User Guide and uses PyPI Trusted Publishing with GitHub Actions.
- One-time setup: On pypi.org add a trusted publisher for this repo (workflow
publish-to-pypi.yml, environmentpypi). Create apypienvironment in the repo and enable “Required reviewers” for production releases. - Release: Create and push a tag (e.g.
v0.1.0). The workflow builds both a wheel and an sdist and publishes to PyPI. Any push builds and publishes to TestPyPI (use thetestpypienvironment).
Local build (no publish):
pip install build
python -m build
# Outputs in dist/: .whl (wheel) and .tar.gz (sdist)
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ratemyprofessors_client-0.1.0.tar.gz.
File metadata
- Download URL: ratemyprofessors_client-0.1.0.tar.gz
- Upload date:
- Size: 11.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12a4d14c94fcea4d16cc5e40d4f2732c8644d72c304f7082b5fe79ba11c99007
|
|
| MD5 |
0075c2f0a1ff3e9002e32d7fc0a2a127
|
|
| BLAKE2b-256 |
7491a17b106af10c0f71504eab62a30bee60894b5207fdd09fc8d32c8eddb76b
|
Provenance
The following attestation bundles were made for ratemyprofessors_client-0.1.0.tar.gz:
Publisher:
publish-to-pypi.yml on amaanjaved1/Rate-My-Professors-API-Client-Python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ratemyprofessors_client-0.1.0.tar.gz -
Subject digest:
12a4d14c94fcea4d16cc5e40d4f2732c8644d72c304f7082b5fe79ba11c99007 - Sigstore transparency entry: 1053956742
- Sigstore integration time:
-
Permalink:
amaanjaved1/Rate-My-Professors-API-Client-Python@e5c96360c7429326a8368dcfda691ccbd3ffc68a -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/amaanjaved1
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@e5c96360c7429326a8368dcfda691ccbd3ffc68a -
Trigger Event:
release
-
Statement type:
File details
Details for the file ratemyprofessors_client-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ratemyprofessors_client-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7a78d9b66677f7a1051765076e1cfa72c6441aec1e909a3900a4e2d250aec83
|
|
| MD5 |
7c622d1c8a74813dac7cbb6764afb418
|
|
| BLAKE2b-256 |
59b214c9e1226101aeb0d9c99d28599623d20348ba268258d856f80767978d75
|
Provenance
The following attestation bundles were made for ratemyprofessors_client-0.1.0-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on amaanjaved1/Rate-My-Professors-API-Client-Python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ratemyprofessors_client-0.1.0-py3-none-any.whl -
Subject digest:
c7a78d9b66677f7a1051765076e1cfa72c6441aec1e909a3900a4e2d250aec83 - Sigstore transparency entry: 1053956754
- Sigstore integration time:
-
Permalink:
amaanjaved1/Rate-My-Professors-API-Client-Python@e5c96360c7429326a8368dcfda691ccbd3ffc68a -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/amaanjaved1
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@e5c96360c7429326a8368dcfda691ccbd3ffc68a -
Trigger Event:
release
-
Statement type: