Skip to content

Releases: amaanjaved1/Rate-My-Professors-API-Client-Python

v3.0.0 Release

25 Apr 22:57

Choose a tag to compare

Changelog

3.0.0

Breaking Changes

  • RMPClientConfig.from_env() removed. Pass RMPClientConfig() directly; there is no longer an env-var-driven constructor.
  • RMPClientConfig.rate_limit_per_minute removed. Rate limiting is now handled internally by a fixed-capacity TokenBucket and is no longer configurable via config.
  • School model: city, state, country replaced by location. The three separate fields are merged into a single location: Optional[str] (e.g. "Toronto, ON, Canada").
  • ProfessorSearchResult and SchoolSearchResult: page field removed. Both result types are now cursor-only — the page: int field is gone.
  • search_schools() and search_professors(): page parameter removed, cursor parameter added. Paginate by passing cursor=result.next_cursor.
  • Professor.url field removed.
  • RatingSummary model removed.

New Features

  • Full school support: get_school(), get_compare_schools(), get_school_ratings_page(), iter_school_ratings().
  • New models: SchoolRating, SchoolRatingsPage, CompareSchoolsResult.
  • Iterators: iter_professors_for_school(), iter_professor_ratings() — both handle cursor pagination automatically.
  • get_professor_ratings_page() now accepts a course_filter parameter.
  • Rating gains details, thumbs_up, thumbs_down fields.
  • extras module (all re-exported from rmp_client): analyze_sentiment, SentimentResult, is_valid_comment, normalize_comment, ValidationResult, CommentIssue, build_course_mapping, clean_course_label.
  • TokenBucket is now publicly exported from rmp_client.

2.1.2

  • Docs favicon and README badge cache updates.

2.1.0

  • Helpers (formerly dedupe): normalize_comment strips HTML by default and supports strip_punctuation; is_valid_comment returns a ValidationResult with valid and issues instead of a boolean, checking for empty, too short, all caps, excessive repeats, and no alphabetic characters.
  • Ingest example: Updated to use is_valid_comment(...).valid for the new return type.

v2.1.2

19 Mar 03:59

Choose a tag to compare

Fix versioning

v2.1.1

19 Mar 03:52

Choose a tag to compare

Minor enhancements in the README + added favicons to docs

v2.1.0 - Improve helper functions and docs

19 Mar 03:31

Choose a tag to compare

Changelog

2.1.0

  • Helpers (formerly dedupe): normalizeComment now strips HTML by default and supports optional stripPunctuation; isValidComment returns a ValidationResult with valid and issues instead of a boolean, checking for empty, too short, all caps, excessive repeats, and no alphabetic characters.
  • Sentiment: analyzeSentiment now uses the sentiment package (AFINN-165) directly—no callback required. Returns score, comparative, and label.

v2.0.0 - Major Rework

18 Mar 03:11

Choose a tag to compare

v2.0.0 — Pure GraphQL

v2 is a complete rewrite of how the client talks to RateMyProfessors. The public API (method names, return types) is largely the same, but the internals are fundamentally different.

Replaced HTML scraping with direct GraphQL

In v1, every request worked by fetching an RMP HTML page, parsing out the embedded window.__RELAY_STORE__ JSON blob, and walking the Relay graph to resolve __ref pointers. This was fragile — any change to RMP's page structure or Relay store shape could break the client.

v2 sends GraphQL POST requests directly to https://www.ratemyprofessors.com/graphql, using the same operation names and fragment names the RMP frontend uses. This is simpler, faster, and far less likely to break.

  • Deleted relay_store.py (~516 lines of Relay store graph traversal)
  • Deleted test_relay_store.py (~312 lines of tests for the above)
  • Added queries.py — all GraphQL query strings in one place
  • Rewrote client.py from ~1,288 lines down to ~774 lines

Simplified configuration

Removed the page-URL config fields. The only URL config is now base_url (the GraphQL endpoint).

Simplified HTTP client

Removed the get_html() method. The client no longer fetches HTML pages at all — only post_json() for GraphQL requests.

Consolidated redundant queries

GET_TEACHER_QUERY and GET_SCHOOL_QUERY have been removed. get_professor() and get_school() now reuse the ratings list queries with a minimal page size, returning the same data in fewer round trips.

Documentation

  • Updated README with full API reference
  • Updated all docstrings throughout source files
  • Updated MkDocs documentation

Testing

  • All tests now run against the live RMP GraphQL API
  • Removed relay store tests and extras tests

Migration from v1

The public method signatures are unchanged: search_schools, search_professors, get_professor, get_school, get_professor_ratings_page, get_school_ratings_page, iterators, and raw_query all work the same way. No code changes needed for the core API. The only breaking changes are:

  • The page-URL config fields are removed from RMPClientConfig
  • relay_store module is removed (was not part of the public API)

v1.0.0 - First working release

08 Mar 19:09
9b6097c

Choose a tag to compare

Merge pull request #1 from amaanjaved1/feature/Major-code-changes

Feature/major code changes

v0.1.0 - First Partial Release

07 Mar 01:59

Choose a tag to compare

Partial Release

  • First partial release to get pypi package setup in place
  • Setup github actions deployment workflow

Installation

pip install ratemyprofessors-client