You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONFIG.md
+15-33Lines changed: 15 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,11 @@
1
1
# Configuration System
2
2
3
-
This Python template includes a Laravel-inspired configuration system that allows you to manage application settings through Python files and settings overrides.
3
+
This Python template includes a Laravel-inspired configuration system that allows you to manage application settings through Python files and environment variable overrides.
4
4
5
5
## Features
6
6
7
7
-**Multiple Config Files**: Organize your configuration into separate Python files (e.g., `app.py`)
8
-
-**Settings Overrides**: Use `config/settings.py` file or environment variables to override config values
9
-
-**Bundled Settings**: Settings are bundled with the application binary (no external .env files needed)
8
+
-**Environment Overrides**: Use `.env` file or environment variables to override config values
@@ -129,11 +112,10 @@ value = helpers.env('app.name') # Falls back to config if no env var
129
112
## Best Practices
130
113
131
114
1.**Organize by Feature**: Create separate config files for different aspects (database, mail, cache, etc.)
132
-
2.**Use Settings File**: For non-sensitive application-specific overrides that should be bundled
133
-
3.**Use Environment Variables**: For sensitive data and deployment-specific settings
134
-
4.**Provide Defaults**: Always provide sensible default values
135
-
5.**Document Settings**: Add comments to explain complex configuration options
136
-
6.**Validate Config**: Add validation for critical configuration values in your application startup
115
+
2.**Use Environment Variables**: For sensitive data and environment-specific settings
116
+
3.**Provide Defaults**: Always provide sensible default values
117
+
4.**Document Settings**: Add comments to explain complex configuration options
118
+
5.**Validate Config**: Add validation for critical configuration values in your application startup
137
119
138
120
## Example: Full Configuration Workflow
139
121
@@ -159,4 +141,4 @@ if helpers.get_config('app.env') == 'testing':
159
141
helpers.set_config('database.default', 'sqlite')
160
142
```
161
143
162
-
This configuration system provides the flexibility of Laravel's config system while maintaining Python's simplicity and power. Settings are now bundled with the application for easier distribution.
144
+
This configuration system provides the flexibility of Laravel's config system while maintaining Python's simplicity and power.
0 commit comments