pyfileconf.basemodels package¶
Submodules¶
pyfileconf.basemodels.collection module¶
pyfileconf.basemodels.config module¶
- 
class 
pyfileconf.basemodels.config.ConfigBase(d=None, name=None, annotations=None, imports=None, _file=None, begin_assignments=None, klass=None, always_import_strs=None, always_assign_strs=None, **kwargs)[source]¶ Bases:
dict- 
__init__(d=None, name=None, annotations=None, imports=None, _file=None, begin_assignments=None, klass=None, always_import_strs=None, always_assign_strs=None, **kwargs)[source]¶ Initialize self. See help(type(self)) for accurate signature.
- 
as_imports_and_assignments()[source]¶ - Return type
 Tuple[ImportStatementContainer,AssignmentStatementContainer]
- 
change_from_refresh()[source]¶ Determines whether refresh would actually cause a change in the config and returns a dictionary of what would be updated
- 
config_file_class¶ 
- 
classmethod 
from_file(filepath, name=None, klass=None, always_import_strs=None, always_assign_strs=None)[source]¶ 
- 
refresh()[source]¶ Reloads from the existing, then re-applies any config updates. Useful for when this config depends on the attribute of some other config which was updated. :rtype:
Dict[str,Any] :return: The updates made to the config
- 
 
pyfileconf.basemodels.container module¶
- 
class 
pyfileconf.basemodels.container.Container[source]¶ Bases:
object- 
add_if_missing(item)[source]¶ Checks if item is in container. If so, doesn’t do anything.
Assuming item is not in container, checks for prefer_beginning attribute of item. If True, insert at position 0. If False, or doesn’t have attr, append to end.
- 
items: List[Any] = []¶ 
- 
 
pyfileconf.basemodels.file module¶
- 
class 
pyfileconf.basemodels.file.ConfigFileBase(filepath, name=None, klass=None, always_import_strs=None, always_assign_strs=None)[source]¶ Bases:
object- 
__init__(filepath, name=None, klass=None, always_import_strs=None, always_assign_strs=None)[source]¶ Initialize self. See help(type(self)) for accurate signature.
- 
always_assign_with_names_dict: Dict[str, List[pyfileconf.assignments.models.statement.AssignmentStatement]] = {}¶ 
- 
always_assigns: List[pyfileconf.assignments.models.statement.AssignmentStatement] = []¶ 
- 
always_imports: List[Union[pyfileconf.imports.models.statements.module.ModuleImportStatement, pyfileconf.imports.models.statements.obj.ObjectImportStatement]] = []¶ 
-