geoips.filenames package#
Submodules#
geoips.filenames.base_paths module#
Deprecated – use geoips.config instead.
This module exists for backward compatibility and will be removed in
a future release. The PATHS dictionary is now populated from the
new geoips.config.GeoIPSConfig singleton.
- geoips.filenames.base_paths.cast_string_to_bool_or_none(value)[source]#
Cast string environment variables to True, False, or None.
Deprecated: Handled automatically by
geoips.config.GeoIPSConfig.
- geoips.filenames.base_paths.get_env_var(var_name, default, rstrip_path=True)[source]#
Retrieve environment variable or provided default.
Deprecated: Use
geoips.config.GeoIPSConfiginstead.
geoips.filenames.duplicate_files module#
Module to handle removing duplicate files, based on filename formats.
If an individual filename format has a method named
"<filename_formatter>_remove_duplicates"
defined, use that method to remove duplicates for the given current filename.
- geoips.filenames.duplicate_files.remove_duplicates(fnames, remove_files=False)[source]#
Remove duplicate files from all filenames included in dict fnames.
- Parameters:
fnames (dict) – Dictionary with individual filenames as keys, and a field named “filename_formatter” which indicates the filename format used to generate the given filename.
remove_files (bool, optional) – Specify whether to remove files (True), or just list what would have been removed, default to False
- Returns:
removed_files (list) – List of files that were removed.
saved_files (list) – List of files that were not removed.
Module contents#
geoips.filenames init file.