bids.layout.Config

class Config(name, entities=None, default_path_patterns=None, session=None)[source]

Container for BIDS configuration information.

Parameters:
  • name (str) – The name to give the Config (e.g., ‘bids’).

  • entities (list) – A list of dictionaries containing entity configuration information.

  • default_path_patterns (list) – Optional list of patterns used to build new paths.

  • session (sqlalchemy.orm.session.Session or None) – An optional SQLAlchemy session. If passed, the session is used to update the database with any newly created Entity objects. If None, no database update occurs.

Attributes:
entities
name

Methods

load(config[, session])

Load a Config instance from the passed configuration data.

__init__(name, entities=None, default_path_patterns=None, session=None)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

Methods

__init__(name[, entities, ...])

A simple constructor that allows initialization from kwargs.

load(config[, session])

Load a Config instance from the passed configuration data.

Attributes

entities

metadata

name

registry