We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5ce7540 commit 298ea23Copy full SHA for 298ea23
config-management-basics/env-vars/examples.py
@@ -9,6 +9,11 @@
9
10
print(f"Connecting to {database_host}:{database_port}")
11
12
+database_port = int(os.environ.get('DATABASE_PORT', '5432'))
13
+max_connections = int(os.environ.get('MAX_CONNECTIONS', '10'))
14
+
15
+total_capacity = database_port + max_connections # Now this works with integers
16
17
# Set an environment variable
18
os.environ['APP_ENV'] = 'development'
19
os.environ['MAX_CONNECTIONS'] = '100'
0 commit comments