Helper to flatten models into dicts for rendering.
The following conversions are applied:
- datetime.date, datetime.datetime, datetime.time are converted into ISO8601 UTC strings
Takes a file path and returns a Base64-encoded string which can be provided as the value of the
user_datakey in the
metadatadictionary when launching an instance(see
LaunchInstanceDetailsfor more information).
Parameters: file_path (str) – The path to the file whose contents will be Base64-encoded Returns: The Base64-encoded string Return type: str
Named singletons for clear docstrings. Also used to differentiate an explicit param of None from a lack of argument.
>>> missing = Sentinel("Missing", False) >>> also_missing = Sentinel("Missing", False) >>> assert missing is also_missing >>> repr(missing) <Missing> >>> assert bool(missing) is False