Skip to content

Commit f90b488

Browse files
Update application.md
1 parent f5ffc60 commit f90b488

1 file changed

Lines changed: 19 additions & 13 deletions

File tree

blacksheep/docs/application.md

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,25 +49,25 @@ the environment variable `APP_SHOW_ERROR_DETAILS` to control whether the
4949
application displays detailed error information. Setting
5050
`APP_SHOW_ERROR_DETAILS=1` or `APP_SHOW_ERROR_DETAILS=True` enables this
5151
feature.
52+
5253
///
5354

5455
/// admonition | Settings strategy
5556

5657
BlackSheep project templates include a strategy to handle application
5758
settings and configuration roots. Refer to [_Getting started with the MVC project template_](./mvc-project-template.md)
5859
for more information.
60+
5961
///
6062

6163
## EnvironmentSettings
6264

63-
/// admonition | New in BlackSheep 2.4.4
64-
type: info
65-
66-
Starting from BlackSheep 2.4.4, the `Application` object includes an `env_settings` property that provides runtime access to environment-based configuration settings.
67-
68-
///
69-
70-
The `Application` object automatically attaches an `EnvironmentSettings` instance that contains configuration values read from environment variables. This feature provides transparency and enables runtime inspection of the application's configuration, which is useful for debugging, testing, and administrative purposes.
65+
Starting from BlackSheep 2.4.4, the `Application` object includes an `env_settings`
66+
property that provides runtime access to environment-based configuration settings.
67+
The `Application` object automatically attaches an `EnvironmentSettings` instance that
68+
contains configuration values read from environment variables. This feature provides
69+
transparency and enables runtime inspection of the application's configuration, which
70+
is useful for debugging, testing, and administrative purposes.
7171

7272
### Accessing Environment Settings
7373

@@ -88,11 +88,17 @@ print(f"HTTP scheme: {app.env_settings.http_scheme}")
8888

8989
The `EnvironmentSettings` object includes the following properties (all read-only):
9090

91-
| Property | Environment Variable | Type | Description |
92-
| -------------------- | ------------------------ | ------------ | --------------------------------------------- |
93-
| `show_error_details` | `APP_SHOW_ERROR_DETAILS` | `bool` | Whether to display detailed error information |
94-
| `force_https` | `APP_FORCE_HTTPS` | `bool` | Whether to force HTTPS scheme and enable HSTS |
95-
| `http_scheme` | `APP_HTTP_SCHEME` | `str | None` | Explicitly set request scheme (`http` or `https`) |
91+
| Property | Environment Variable | Type | Default | Description |
92+
| -------------------- | ------------------------ | ------------ | ------- | --------------------------------------------- |
93+
| `env` | `APP_ENV` | `str` | `"production"` | Application environment (e.g., "local", "dev", "production") |
94+
| `show_error_details` | `APP_SHOW_ERROR_DETAILS` | `bool` | `False` | Whether to display detailed error information |
95+
| `mount_auto_events` | `APP_MOUNT_AUTO_EVENTS` | `bool` | `True` | Whether to automatically mount application events |
96+
| `use_default_router` | `APP_DEFAULT_ROUTER` | `bool` | `True` | Whether to use the default router |
97+
| `add_signal_handler` | `APP_SIGNAL_HANDLER` | `bool` | `False` | Whether to add signal handlers for graceful shutdown |
98+
| `http_scheme` | `APP_HTTP_SCHEME` | `str | None` | `None` | Explicitly set request scheme (`http` or `https`) |
99+
| `force_https` | `APP_FORCE_HTTPS` | `bool` | `False` | Whether to force HTTPS scheme and enable HSTS |
100+
101+
Refer to [_Settings_](./settings.md) for more information.
96102

97103
### Practical Use Cases
98104

0 commit comments

Comments
 (0)