Skip to content

config

This module is concerned with handling settings with environment variables.

Settings

Bases: BaseSettings

Settings summary

Attributes:

Name Type Description
db_user str

Database user name.

db_password str

Database password.

db_host str

Database host address.

db_port str

Database port number.

db_name str

Database name.

secret_key str

Secret key for token generation.

algorithm str

Algorithm used for token generation.

access_token_expire_minute int

Time in minutes for access token expiration.

minio_root_user str

The access key for MinIO.

minio_root_password str

The secret key for MinIO.

default_user str

The username for RabbitMQ.

default_pass str

The password for RabbitMQ.

Classes:

Name Description
Config: Used to load values for this class from the .env file
Source code in api/core/config.py
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
class Settings(BaseSettings):
    """
    Settings _summary_

    Attributes
    ----------
    db_user : str
        Database user name.

    db_password : str
        Database password.

    db_host : str
        Database host address.

    db_port : str
        Database port number.

    db_name : str
        Database name.

    secret_key : str
        Secret key for token generation.

    algorithm : str
        Algorithm used for token generation.

    access_token_expire_minute : int
        Time in minutes for access token expiration.

    minio_root_user : str
        The access key for MinIO.

    minio_root_password str
        The secret key for MinIO.

    default_user : str
        The username for RabbitMQ.

    default_pass : str
        The password for RabbitMQ.

    Classes
    -------
        Config: Used to load values for this class from the .env file

    """

    postgres_user: str
    postgres_password: str
    postgres_host: str
    postgres_port: str
    postgres_db: str
    secret_key: str
    algorithm: str
    access_token_expire_minute: int
    minio_root_user: str
    minio_root_password: str
    default_user: str
    default_pass: str

    model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8")