Configuration
All configuration is centralized in a single Settings object, exposed as the
euroflood.settings singleton. Every field is set by an EUROFLOOD_<FIELD>
environment variable (or by mutating euroflood.settings at runtime).
import euroflood as ef
ef.settings.output_dir = "results/" # runtime override
# equivalently: export EUROFLOOD_OUTPUT_DIR=results/
The table below (from the field descriptions) documents every setting and its
EUROFLOOD_* variable.
Settings
Bases: BaseSettings
Global application settings and configuration.
Every field is set by an EUROFLOOD_<FIELD> environment variable (e.g.
EUROFLOOD_OUTPUT_DIR) or by mutating the settings
singleton at runtime. See each field's description below (or
help(euroflood.settings) / the Configuration reference) for what it does.
Note
See https://docs.pydantic.dev/latest/concepts/pydantic_settings/ for environment-variable precedence.
Methods:
| Name | Description |
|---|---|
get_inventory_path |
Return the full path to the inventory CSV file. |
get_index_tif_path |
Return the full path to the global index raster file. |
get_dictionary_path |
Return the full path to the flood event dictionary JSON file. |
get_manifest_path |
Return the full path to the cache manifest (version + grid fingerprint). |
get_hazard_dir |
Return the cache directory for GLOFAS hazard artefacts (index + tiles). |
get_hazard_index_path |
Return the path to the cached GLOFAS tile-extents GeoJSON. |
get_hazard_tiles_dir |
Return the cache directory for downloaded GLOFAS hazard tiles. |
get_hazard_manifest_path |
Return the path to the hazard reference manifest. |
get_dictionary_parquet_path |
Return the path to the single combo_id-sorted Parquet dictionary file. |
get_dictionary_meta_path |
Return the path to the small dictionary metadata JSON sidecar. |
get_events_path |
Return the path to the normalized per-event metadata Parquet table. |
source_coop_base_url |
Public HTTPS base URL of a published index version (immutable |
ensure_dirs |
Create necessary directories if they don't exist. |
Methods:
get_inventory_path
Return the full path to the inventory CSV file.
Returns:
| Name | Type | Description |
|---|---|---|
Path |
Path
|
The absolute path to the inventory.csv file within the cache directory. |
get_index_tif_path
Return the full path to the global index raster file.
Returns:
| Name | Type | Description |
|---|---|---|
Path |
Path
|
The absolute path to the index TIF file within the cache directory. |
get_dictionary_path
Return the full path to the flood event dictionary JSON file.
Returns:
| Name | Type | Description |
|---|---|---|
Path |
Path
|
The absolute path to the dictionary JSON file within the cache directory. |
get_manifest_path
Return the full path to the cache manifest (version + grid fingerprint).
Returns:
| Name | Type | Description |
|---|---|---|
Path |
Path
|
The absolute path to the manifest JSON within the cache directory. |
get_hazard_dir
Return the cache directory for GLOFAS hazard artefacts (index + tiles).
get_hazard_index_path
Return the path to the cached GLOFAS tile-extents GeoJSON.
Honours hazard_index_path if set (skips the download), otherwise
places it under get_hazard_dir.
get_hazard_tiles_dir
Return the cache directory for downloaded GLOFAS hazard tiles.
get_hazard_manifest_path
Return the path to the hazard reference manifest.
get_dictionary_parquet_path
Return the path to the single combo_id-sorted Parquet dictionary file.
get_dictionary_meta_path
Return the path to the small dictionary metadata JSON sidecar.
get_events_path
Return the path to the normalized per-event metadata Parquet table.
source_coop_base_url
Public HTTPS base URL of a published index version (immutable vX.Y.Z).