aboutsummaryrefslogtreecommitdiff
path: root/inventory-service/app/core/config.py
diff options
context:
space:
mode:
Diffstat (limited to 'inventory-service/app/core/config.py')
-rw-r--r--inventory-service/app/core/config.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/inventory-service/app/core/config.py b/inventory-service/app/core/config.py
new file mode 100644
index 0000000..df5526d
--- /dev/null
+++ b/inventory-service/app/core/config.py
@@ -0,0 +1,19 @@
+from pydantic_settings import BaseSettings
+
+
+class Settings(BaseSettings):
+ PROJECT_NAME: str = "Inventory Service"
+
+ DATABASE_URL: str
+
+ KAFKA_BOOTSTRAP_SERVERS: str = "localhost:9092"
+ KAFKA_CONSUMER_GROUP_ID: str = "inventory-service-group"
+ KAFKA_ORDERS_TOPIC: str = "orders"
+ KAFKA_INVENTORY_TOPIC: str = "inventory"
+
+ class Config:
+ env_file = ".env"
+ env_file_encoding = "utf-8"
+
+
+settings = Settings()