-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
39 lines (31 loc) · 954 Bytes
/
config.py
1
2
3
4
5
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
'''
LOKAL for Kafka (LfK), v1. May 2024.
@author: Dr J.
Except for absolutely necessary classes, LfK tries to stick to a functional programming paradigm.
Any classes must be justified exceptionally well.
Copyright (c) 2024 Jose A Bolanos / Polyzentrik Tmi.
SPDX-License-Identifier: Apache-2.0.
'''
# ..................
# SECTION: TOP-LEVEL IMPORTS
# ..................
import os
from dotenv import load_dotenv
# ..................
# SECTION: ENVIRONMENT
# ..................
load_dotenv()
# ..................
# SECTION: CONFIGS
# ..................
config = {
'bootstrap.servers': os.getenv('BOOTSTRAP_SERVERS'),
'security.protocol': 'SASL_SSL',
'sasl.mechanisms': 'PLAIN',
'sasl.username': os.getenv('API_KEY'),
'sasl.password': os.getenv('API_SECRET')
}
sr_config = {
'url': os.getenv('SCHEMA_REGISTRY_URL'),
'basic.auth.user.info': f'{os.getenv("SCHEMA_REGISTRY_KEY")}:{os.getenv("SCHEMA_REGISTRY_SECRET")}'
}