Skip to content

[FR] Use dotenv to populate user settings and credentials #36

@erdincka

Description

@erdincka

Is your feature request related to a problem? Please describe.
Instead of user editing .venv/bin/activate script we can use Python dotenv library to automatically load API key and other variables specific to the user.

Describe the solution you'd like
Simply adding this code in ./self_serve_platform/system/config.py, we would be automatically load required/customised variables to the app's running environment.

from os.path import join, dirname
from dotenv import load_dotenv

dotenv_path = join(dirname(__file__), '.env')
load_dotenv(dotenv_path)

This would require change to the documentation to inform user that they should create an .env file with the content for their API keys and endpoints etc.

Describe alternatives you've considered

Current method works fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions