Main¶
-
class
ffflash.main.
FFFlash
(args)[source]¶ This is the main object, which stores all relevant information, and the
ffflash.lib.api.FFApi
itself.Parameters: args – Namespace
object 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: True
orFalse
-
load_api
()[source]¶ Populate
api
withffflash.lib.api.FFApi
with content loaded fromlocation
.api
is 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--verbose
was 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.