Main¶
-
class
ffflash.main.FFFlash(args)[source]¶ This is the main object, which stores all relevant information, and the
ffflash.lib.api.FFApiitself.Parameters: args – Namespaceobject fromffflash.lib.args.parsed_args()-
access_for(name)[source]¶ Check if it is save to access the api and/or depending files.
Parameters: name – String specifier of part to access. Returns: TrueorFalse
-
load_api()[source]¶ Populate
apiwithffflash.lib.api.FFApiwith content loaded fromlocation.apiis populated only once, this prevents accidental reloads.
-
log(message, level=True)[source]¶ Very advanced Logger. For professional use only.
Parameters: - message – Some message string to display
- level –
Severity of message. Can be anything as this is also the return value. There are three predefined rules:
True: info (is dismissed unless--verbosewas given)None: warnFalse: error
Returns: level
-
save()[source]¶ Save content from
api(ffflash.lib.api.FFApi) intolocation. Affflash.lib.api.FFApi.timestamp()is triggered before saving.
-
set_timestamp()[source]¶ Inject
ffflash.lib.clock.get_iso_timestamp()intostate.lastchange.
-
Info¶
To share common values like the package name or release string between setuptools, sphinx and the code itself, the info module is used.