ADR on Python Public API conventions in Learning Core

I recently created a PR proposing a new Python API layer for Learning Core:

The short version is that Learning Core is going to have many apps, and having consumers import from each app’s module (as specified in OEP-49) is going to be cumbersome. So this ADR proposes an additional layer on top that will aggregate those individual app API modules into a separate package space for public APIs.

So say we have these app API modules:

  • openedx_learning.apps.authoring.assets.api
  • openedx_learning.apps.authoring.components.api
  • openedx_learning.apps.authoring.contents.api
  • openedx_learning.apps.authoring.publishing.api
  • openedx_learning.apps.authoring.units.api

These API modules would be used internally, but consumers of Learning Core would import these functions from openedx_learning.api.authoring.

There’s more to it than that, but if you’re interested in the rationale and potential consequences, please comment on the PR. I’ll hold this ADR open until at least May 6th to give people a chance to look at it.

Thanks folks.

1 Like