dbprocessing.inspector¶
Support for inspectors, which determine product type for a given file.
To write an inspector, create a Python module (i.e. a .py file).
This file will need to import
inspector
andVersion
(since it must create aVersion
).This file may import
DBlogging
to permit logging of its work.This file must contain a single class
The class must be named
Inspector
and inherit frominspector
.The class must have a class member
code_name
with the name of the inspector fileThe class must implement the
inspect()
method (see that documentation for details).
A inspector
record must also then be created referencing the
inspector file and with any necessary keywords.
See Also¶
Functions
|
Go through the filename and pull out the first valid vX.Y.Z |
|
Go through the filename and extract the first valid YYYYMM as a datetime |
|
Go through the filename and extract the first valid YYYYMMDD as a datetime |
|
Checks if input is valid YYYYMMDD |
Classes
Dict-like with defaults for the special fields used by DBformatter |
|
Formatter that passes through any missing fields |
|
|
ABC for inspectors to be sure the user has implemented what is required |
- dbprocessing.inspector.extract_Version(filename, basename=False)[source]¶
Go through the filename and pull out the first valid vX.Y.Z
- dbprocessing.inspector.extract_YYYYMM(filename)[source]¶
Go through the filename and extract the first valid YYYYMM as a datetime
Release: 0.1.0 Doc generation date: Feb 10, 2022