Add custom env variable through plugin

How can I set a custom environment variable in my plugin ?

For instance FOO = "bar"

Is it in openedx-lms-common-settings portion of a plugin ?

I want to use that later in a custom class for instance :

class FooClass():
    foo = os.environ["FOO"]

I believe Plugin API — Tutor documentation is what you’re looking for.

Are you trying to define a new environment variable in the lms container? If yes, I suggest that you implement the “openedx-lms-common-settings” patch:

os.environ["KEY"] = "value"

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.