The Grades code currently lives in a django app within edx-platform. Long-term, it's possible for the Grades project to be in its own repo. However, currently, it depends on various other modules in the edX platform, including Enrollments, BlockStructures, Modulestore, Courseware Student Module, and Submissions. Once those modules are extracted into their own repos, it would be possible to do the same for Grades.
The Grades Python API was designed with simplicity and usability in mind. It uses the Factory design pattern to (1) create a simple interface for the caller and (2) optimize the factory by caching data for subsequent calls. A Class hierarchy is used to reduce code duplication and clarify separation of concerns between parent and child implementations.