Skip to content

Commit 1e98765

Browse files
authored
Create shared/config.py
1 parent eb02571 commit 1e98765

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

shared/config.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
from pydantic import BaseSettings
2+
3+
4+
class Settings(BaseSettings):
5+
APP_NAME: str = "RideSharingPlatform"
6+
ENVIRONMENT: str = "development"
7+
8+
# Kafka
9+
KAFKA_BOOTSTRAP_SERVERS: str = "localhost:9092"
10+
KAFKA_TOPIC_RIDE_REQUESTED: str = "ride_requested"
11+
KAFKA_TOPIC_DRIVER_ASSIGNED: str = "driver_assigned"
12+
13+
# Database
14+
DATABASE_URL: str = "postgresql://postgres:postgres@localhost:5432/rides"
15+
16+
# Redis
17+
REDIS_HOST: str = "localhost"
18+
REDIS_PORT: int = 6379
19+
20+
# Observability
21+
ENABLE_METRICS: bool = True
22+
23+
class Config:
24+
env_file = ".env"
25+
26+
27+
settings = Settings()

0 commit comments

Comments
 (0)