You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
however modules can have a .setup() method to run any setup code
18
23
(e.g. logging in to a site, spinning up a browser etc.)
19
24
20
-
See BaseModule.MODULE_TYPES for the types of modules you can create, noting that
25
+
See consts.MODULE_TYPES for the types of modules you can create, noting that
21
26
a subclass can be of multiple types. For example, a module that extracts data from
22
27
a website and stores it in a database would be both an 'extractor' and a 'database' module.
23
28
24
29
Each module is a python package, and should have a __manifest__.py file in the
25
30
same directory as the module file. The __manifest__.py specifies the module information
26
-
like name, author, version, dependencies etc. See BaseModule._DEFAULT_MANIFEST for the
31
+
like name, author, version, dependencies etc. See DEFAULT_MANIFEST for the
27
32
default manifest structure.
28
33
29
34
"""
30
35
31
-
MODULE_TYPES= [
32
-
'feeder',
33
-
'extractor',
34
-
'enricher',
35
-
'database',
36
-
'storage',
37
-
'formatter'
38
-
]
39
-
40
-
_DEFAULT_MANIFEST= {
41
-
'name': '', # the display name of the module
42
-
'author': 'Bellingcat', # creator of the module, leave this as Bellingcat or set your own name!
43
-
'type': [], # the type of the module, can be one or more of BaseModule.MODULE_TYPES
44
-
'requires_setup': True, # whether or not this module requires additional setup such as setting API Keys or installing additional softare
45
-
'description': '', # a description of the module
46
-
'dependencies': {}, # external dependencies, e.g. python packages or binaries, in dictionary format
47
-
'entry_point': '', # the entry point for the module, in the format 'module_name::ClassName'. This can be left blank to use the default entry point of module_name::ModuleName
48
-
'version': '1.0', # the version of the module
49
-
'configs': {} # any configuration options this module has, these will be exposed to the user in the config file or via the command line
50
-
}
36
+
MODULE_TYPES=CONF_MODULE_TYPES
51
37
38
+
# NOTE: these here are declard as class variables, but they are overridden by the instance variables in the __init__ method
52
39
config: Mapping[str, Any]
53
40
authentication: Mapping[str, Mapping[str, str]]
54
41
name: str
42
+
module_factory: ModuleFactory
55
43
56
44
# this is set by the orchestrator prior to archiving
'author': 'Bellingcat', # creator of the module, leave this as Bellingcat or set your own name!
16
+
'type': [], # the type of the module, can be one or more of MODULE_TYPES
17
+
'requires_setup': True, # whether or not this module requires additional setup such as setting API Keys or installing additional softare
18
+
'description': '', # a description of the module
19
+
'dependencies': {}, # external dependencies, e.g. python packages or binaries, in dictionary format
20
+
'entry_point': '', # the entry point for the module, in the format 'module_name::ClassName'. This can be left blank to use the default entry point of module_name::ModuleName
21
+
'version': '1.0', # the version of the module
22
+
'configs': {} # any configuration options this module has, these will be exposed to the user in the config file or via the command line
23
+
}
There was a problem loading the remainder of the diff.
0 commit comments