vptstools.bin namespace
Submodules
vptstools.bin.click_exception module
Utility to support SNS topic publishing on failed CLI commands
- vptstools.bin.click_exception.catch_all_exceptions(cls, handler)[source]
Catch exceptions raised by a click CLI command to override exception handler.
Credits to https://stackoverflow.com/questions/52213375/python-click-exception-handling-under-setuptools
- vptstools.bin.click_exception.report_click_exception_to_sns(cmd, info_name, exc, aws_sns_topic, subject, profile_name=None, region_name=None)[source]
Push exceptions from click to SNS topic, used as handler for click applications
- Parameters:
cmd (Click handler arguments)
info_name (Click handler arguments)
exc (Click handler arguments)
aws_sns_topic (str) – arn of the AWS SNS topic
subject (str) – Mail subject when sending notifications,
profile_name (aws profile (optional)) – AWS profile
region_name (aws region (optional)) – AWS region
vptstools.bin.transfer_baltrad module
- vptstools.bin.transfer_baltrad.extract_metadata_from_filename(filename: str) tuple [source]
Extract the metadata from the filename (format such as ‘fropo_vp_20220809T051000Z_0xb’)
All returned values are strings, month and days are 0-prefixed if they are single-digit.
- Parameters:
filename (str) – Filename of a HDF5 incoming file from FTP