clean credentials.py

This commit is contained in:
Diogo Sousa
2023-07-21 18:11:54 +01:00
parent e07e543b9e
commit b8ff87bae1

View File

@@ -3,13 +3,15 @@ from pydantic import create_model
from openbb_core.app.provider_interface import get_provider_interface
# Here we create the BaseModel from the provider credentials.
# Here we create the BaseModel from the provider required credentials.
# This means that if a new provider extension is installed, the required
# credentials will be automatically added to the Credentials model.
class Config:
validate_assignment = True
required_credentials = get_provider_interface().credentials
Credentials = create_model( # type: ignore