Configuration
Module contents
Submodules
ixmp4.conf.auth module
ixmp4.conf.base module
- class ixmp4.conf.base.Config(*args, **kwargs)
Bases:
Protocol
- get_platform(key: str) PlatformInfo
- list_platforms() list[PlatformInfo]
- class ixmp4.conf.base.PlatformInfo(*, name: str, dsn: str)
Bases:
BaseModel
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'dsn': FieldInfo(annotation=str, required=True), 'name': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
ixmp4.conf.credentials module
ixmp4.conf.manager module
- class ixmp4.conf.manager.ManagerConfig(url: str, auth: BaseAuth, remote: bool = False)
Bases:
Config
- fetch_group_permissions(group_id: int, platform: ManagerPlatformInfo, **kwargs) DataFrame
- fetch_platforms(**kwargs) list[ManagerPlatformInfo]
- fetch_user_permissions(user: User, platform: ManagerPlatformInfo, **kwargs) DataFrame
- get_platform(key: str, **kwargs) ManagerPlatformInfo
- list_platforms(**kwargs) list[ManagerPlatformInfo]
- template_pattern = re.compile('(\\{env\\:(\\w+)\\})')
- class ixmp4.conf.manager.ManagerPlatformInfo(*, slug: str, dsn: str, id: int, management_group: int, access_group: int, url: str, notice: str | None = None, accessibility: Accessibilty)
Bases:
PlatformInfo
- class Accessibilty(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
-
- GATED = 'GATED'
- PRIVATE = 'PRIVATE'
- PUBLIC = 'PUBLIC'
- accessibility: Accessibilty
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'access_group': FieldInfo(annotation=int, required=True), 'accessibility': FieldInfo(annotation=ManagerPlatformInfo.Accessibilty, required=True), 'dsn': FieldInfo(annotation=str, required=True), 'id': FieldInfo(annotation=int, required=True), 'management_group': FieldInfo(annotation=int, required=True), 'name': FieldInfo(annotation=str, required=True, alias='slug', alias_priority=2), 'notice': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'url': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class ixmp4.conf.manager.MockManagerConfig(platforms: list[ManagerPlatformInfo], permissions: DataFrame)
Bases:
ManagerConfig
- fetch_group_permissions(group_id: int, platform: ManagerPlatformInfo, **kwargs) DataFrame
- fetch_platforms() list[ManagerPlatformInfo]
- fetch_user_permissions(user: User, platform: ManagerPlatformInfo, **kwargs) DataFrame
ixmp4.conf.toml module
- class ixmp4.conf.toml.TomlConfig(toml_file: Path, user: User)
Bases:
Config
- dump()
- get_platform(key: str) TomlPlatformInfo
- list_platforms() list[TomlPlatformInfo]
- platforms: dict[str, TomlPlatformInfo]
- class ixmp4.conf.toml.TomlPlatformInfo(*, name: str, dsn: str)
Bases:
PlatformInfo
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'dsn': FieldInfo(annotation=str, required=True), 'name': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
ixmp4.conf.user module
- class ixmp4.conf.user.User(*, id: int | None = None, username: str, email: str | None = None, is_staff: bool = False, is_superuser: bool = False, is_verified: bool = False, is_authenticated: bool = True, groups: list[int] = [], jti: str | None = None)
Bases:
BaseModel
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'email': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'groups': FieldInfo(annotation=list[int], required=False, default=[]), 'id': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'is_authenticated': FieldInfo(annotation=bool, required=False, default=True), 'is_staff': FieldInfo(annotation=bool, required=False, default=False), 'is_superuser': FieldInfo(annotation=bool, required=False, default=False), 'is_verified': FieldInfo(annotation=bool, required=False, default=False), 'jti': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'username': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.