Monte Carlo Benchmarking Engine
High-performance SIMD Monte Carlo engine (AVX2/NEON) with custom memory allocators and perf logging.
 
Loading...
Searching...
No Matches
config.py
Go to the documentation of this file.
1# ===========================================
2# config.py
3# ===========================================
4
5
27
28
29from dotenv import load_dotenv
30from pathlib import Path
31import os
32
33
34load_dotenv()
35
36def env(key, default=None):
37 """!Retrieve an environment variable with an optional default.
38
39 @param key The environment variable key to read.
40 @param default The fallback value to use if the variable is not set.
41
42 @return The environment value as a string, or the default if not found.
43 """
44 return os.getenv(key, default)
45
46CLICKHOUSE_HOST = env("CLICKHOUSE_HOST", "localhost")
47CLICKHOUSE_TCP_PORT = int(env("CLICKHOUSE_TCP_PORT", 9000))
48CLICKHOUSE_HTTP_PORT = int(env("CLICKHOUSE_HTTP_PORT", 8123))
49CLICKHOUSE_USER = env("CLICKHOUSE_USER", "default")
50CLICKHOUSE_PASSWORD = env("CLICKHOUSE_PASSWORD", "")
51CLICKHOUSE_HOST_DOCKER = env("CLICKHOUSE_HOST_DOCKER", "clickhouse")
52CLICKHOUSE_TCP_PORT_DOCKER = int(env("CLICKHOUSE_TCP_PORT_DOCKER", 9000))
53CLICKHOUSE_HTTP_PORT_DOCKER = int(env("CLICKHOUSE_HTTP_PORT_DOCKER", 8123))
54load_dotenv()
55
56DB_PATH = Path(env("DB_PATH", "db/db.parquet"))
57SAMPLE_PATH = Path(env("SAMPLE_PATH", "samples/db_sample.parquet"))
env(key, default=None)
Retrieve an environment variable with an optional default.
Definition config.py:36