rcmpy.config package — docs

Skip to main content
`Ctrl`+`K`

# rcmpy.config package

## Submodules

## rcmpy.config.file module

A module implementing an interface for package-managed files.

class rcmpy.config.file.ManagedFile(template: str, extra_templates: Set[str], directory: Path, name: str, link: bool, executable: bool, condition: str, platforms: Set[str])

  Bases: `object`

  A data structure for managed files specified in the configuration data.

  condition: str
  directory: Path
  evaluate(env: Dict[str, Any]) → bool

    Determine if this file should be handled.

  executable: bool
  extra_templates: Set[str]
  link: bool
  name: str
  property output: Path

    Get the full output path.

  property platform: bool

    Determine if the platform is correct for handling this file.

  platforms: Set[str]
  property present: bool

    Determine if this file is currently present in the file system.

  template: str
  update(source: Path, logger: Logger | LoggerAdapter[Any]) → None

    Update this managed file based on the provided source file.

  update_root(root: Path) → None

    If the output directory is a relative path, update it to be an absolute one based on the provided root directory.

## Module contents

A module implementing a configuration interface for the package.

class rcmpy.config.Config(data: dict[str, str | int | float | bool | None | dict[str, str | int | float | bool | None] | list[str | int | float | bool | None]] = None, schemas: SchemaMap = None, dest_attr: str = 'data', verify: bool = True)

  Bases: `RcmpyDictCodec`, `BasicDictCodec`

  The top-level configuration object for the package.

  init(data: dict[str, str | int | float | bool | None | dict[str, str | int | float | bool | None] | list[str | int | float | bool | None]]) → None

    Initialize this instance.

  update_root(root: Path) → None

    Call ‘update_root’ for each managed file.

class rcmpy.config.ManagedFile(template: str, extra_templates: Set[str], directory: Path, name: str, link: bool, executable: bool, condition: str, platforms: Set[str])

  Bases: `object`

  A data structure for managed files specified in the configuration data.

  condition: str
  directory: Path
  evaluate(env: Dict[str, Any]) → bool

    Determine if this file should be handled.

  executable: bool
  extra_templates: Set[str]
  link: bool
  name: str
  property output: Path

    Get the full output path.

  property platform: bool

    Determine if the platform is correct for handling this file.

  platforms: Set[str]
  property present: bool

    Determine if this file is currently present in the file system.

  template: str
  update(source: Path, logger: Logger | LoggerAdapter[Any]) → None

    Update this managed file based on the provided source file.

  update_root(root: Path) → None

    If the output directory is a relative path, update it to be an absolute one based on the provided root directory.