ctdclient.model.near_real_time_publication module¶
- ctdclient.model.near_real_time_publication.instantiate_near_real_time_target(*args, frequency_of_action='23:59:00', **kwargs)[source]¶
- Return type:
- class ctdclient.model.near_real_time_publication.NRTList(*args, **kwargs)[source]¶
Bases:
UserList
- class ctdclient.model.near_real_time_publication.NearRealTimeTarget(recipient_address, target_file_suffix, target_file_directory='', geo_filter='', email_info={}, file_path='', active=False, **kwargs)[source]¶
Bases:
object
Stores information for near-real-time distribution of latest CTD data files. Can work in two modes: email or rsync/copy. Will distinguish between these by checking ‘recipient_adress’ for an ‘@’.
- create_email_message(target_files, to_address='', from_address='', subject='', body='')[source]¶
Creates an email with target files attached.
- create_email_draft(msg, file_path='')[source]¶
Creates an email .eml draft file, that can be opened by common email programs.
- Return type:
Path
- get_target_files(target_file=PosixPath('.'))[source]¶
Creates a list of paths to files that are meant to be published.
- Return type:
list
[Path
]
- class ctdclient.model.near_real_time_publication.DailyPublication(*args, time_to_run_at='23:59:30', single_run=False, **kwargs)[source]¶
Bases:
NearRealTimeTarget