Source Dir

Loads files from a directory

class dffml.source.dir.DirectorySource(config)[source]

Source to read files in a folder.

CONFIG

alias of DirectorySourceConfig

class dffml.source.dir.DirectorySourceConfig(foldername: str, feature: str, labels: List[str] = <factory>, save: dffml.source.source.BaseSource = None)[source]
no_enforce_immutable()

By default, all properties of a config object are immutable. If you would like to mutate immutable properties, you must explicitly call this method using it as a context manager.

Examples

>>> from dffml import config
>>>
>>> @config
... class MyConfig:
...     C: int
>>>
>>> config = MyConfig(C=2)
>>> with config.no_enforce_immutable():
...     config.C = 1
exception dffml.source.dir.FolderNotFoundError[source]

Folder doesn’t exist.