Settings
Settings
Bases: BaseSettings
Configuration settings for the application.
This class is used to define and validate application settings using
Pydantic's BaseSettings functionality. Settings are loaded from an
environment file specified in the configuration.
Attributes:
| Name | Type | Description |
|---|---|---|
API_KEY |
str
|
The API key used for authentication. |
USER_AGENT |
str
|
The user agent string to be used in HTTP requests. |
Config
env_fileis '.env': Path to the environment file from which to load the settings. In this case, it will need to be created a '.env' file in project root.extrais 'ignored': How to handle extra fields. In this case, extra fields in the environment file will be ignored.
Source code in pylastfmapi/settings.py
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | |