REST API

Subpackages

Submodules

ixmp4.server.rest.base module

class ixmp4.server.rest.base.BaseModel

Bases: BaseModel

model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'from_attributes': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

class ixmp4.server.rest.base.EnumerationOutput(results: DataFrame | DataFrame | list[EnumeratedT], *, pagination: Pagination, total: int)

Bases: BaseModel, Generic[EnumeratedT]

model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'from_attributes': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'pagination': FieldInfo(annotation=Pagination, required=True), 'results': FieldInfo(annotation=Union[DataFrame, list[TypeVar]], required=True), 'total': FieldInfo(annotation=int, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

pagination: Pagination
results: DataFrame | list[EnumeratedT]
total: int
class ixmp4.server.rest.base.EnumerationOutput(results: DataFrame | DataFrame | list[EnumeratedT], *, pagination: Pagination, total: int)

Bases: BaseModel, Generic[EnumeratedT]

model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'from_attributes': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'pagination': FieldInfo(annotation=Pagination, required=True), 'results': FieldInfo(annotation=Union[DataFrame, list[TypeVar]], required=True), 'total': FieldInfo(annotation=int, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

pagination: Pagination
results: DataFrame | list[EnumeratedT]
total: int
class ixmp4.server.rest.base.EnumerationOutput(results: DataFrame | DataFrame | list[EnumeratedT], *, pagination: Pagination, total: int)

Bases: BaseModel, Generic[EnumeratedT]

model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'from_attributes': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'pagination': FieldInfo(annotation=Pagination, required=True), 'results': FieldInfo(annotation=Union[DataFrame, list[TypeVar]], required=True), 'total': FieldInfo(annotation=int, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

pagination: Pagination
results: DataFrame | list[EnumeratedT]
total: int
class ixmp4.server.rest.base.EnumerationOutput(results: DataFrame | DataFrame | list[EnumeratedT], *, pagination: Pagination, total: int)

Bases: BaseModel, Generic[EnumeratedT]

model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'from_attributes': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'pagination': FieldInfo(annotation=Pagination, required=True), 'results': FieldInfo(annotation=Union[DataFrame, list[TypeVar]], required=True), 'total': FieldInfo(annotation=int, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

pagination: Pagination
results: DataFrame | list[EnumeratedT]
total: int
class ixmp4.server.rest.base.EnumerationOutput(results: DataFrame | DataFrame | list[EnumeratedT], *, pagination: Pagination, total: int)

Bases: BaseModel, Generic[EnumeratedT]

model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'from_attributes': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'pagination': FieldInfo(annotation=Pagination, required=True), 'results': FieldInfo(annotation=Union[DataFrame, list[TypeVar]], required=True), 'total': FieldInfo(annotation=int, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

pagination: Pagination
results: DataFrame | list[EnumeratedT]
total: int
class ixmp4.server.rest.base.EnumerationOutput(results: DataFrame | DataFrame | list[EnumeratedT], *, pagination: Pagination, total: int)

Bases: BaseModel, Generic[EnumeratedT]

model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'from_attributes': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'pagination': FieldInfo(annotation=Pagination, required=True), 'results': FieldInfo(annotation=Union[DataFrame, list[TypeVar]], required=True), 'total': FieldInfo(annotation=int, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

pagination: Pagination
results: DataFrame | list[EnumeratedT]
total: int
class ixmp4.server.rest.base.EnumerationOutput(results: DataFrame | DataFrame | list[EnumeratedT], *, pagination: Pagination, total: int)

Bases: BaseModel, Generic[EnumeratedT]

model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'from_attributes': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'pagination': FieldInfo(annotation=Pagination, required=True), 'results': FieldInfo(annotation=Union[DataFrame, list[TypeVar]], required=True), 'total': FieldInfo(annotation=int, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

pagination: Pagination
results: DataFrame | list[EnumeratedT]
total: int
class ixmp4.server.rest.base.EnumerationOutput(results: DataFrame | DataFrame | list[EnumeratedT], *, pagination: Pagination, total: int)

Bases: BaseModel, Generic[EnumeratedT]

model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'from_attributes': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'pagination': FieldInfo(annotation=Pagination, required=True), 'results': FieldInfo(annotation=Union[DataFrame, list[TypeVar]], required=True), 'total': FieldInfo(annotation=int, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

pagination: Pagination
results: DataFrame | list[EnumeratedT]
total: int
class ixmp4.server.rest.base.EnumerationOutput(results: DataFrame | DataFrame | list[EnumeratedT], *, pagination: Pagination, total: int)

Bases: BaseModel, Generic[EnumeratedT]

model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'from_attributes': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'pagination': FieldInfo(annotation=Pagination, required=True), 'results': FieldInfo(annotation=Union[DataFrame, list[TypeVar]], required=True), 'total': FieldInfo(annotation=int, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

pagination: Pagination
results: DataFrame | list[EnumeratedT]
total: int
class ixmp4.server.rest.base.EnumerationOutput(results: DataFrame | DataFrame | list[EnumeratedT], *, pagination: Pagination, total: int)

Bases: BaseModel, Generic[EnumeratedT]

model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'from_attributes': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'pagination': FieldInfo(annotation=Pagination, required=True), 'results': FieldInfo(annotation=Union[DataFrame, list[TypeVar]], required=True), 'total': FieldInfo(annotation=int, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

pagination: Pagination
results: DataFrame | list[EnumeratedT]
total: int
class ixmp4.server.rest.base.EnumerationOutput(results: DataFrame | DataFrame | list[EnumeratedT], *, pagination: Pagination, total: int)

Bases: BaseModel, Generic[EnumeratedT]

model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'from_attributes': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'pagination': FieldInfo(annotation=Pagination, required=True), 'results': FieldInfo(annotation=Union[DataFrame, list[TypeVar]], required=True), 'total': FieldInfo(annotation=int, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

pagination: Pagination
results: DataFrame | list[EnumeratedT]
total: int
class ixmp4.server.rest.base.EnumerationOutput(results: DataFrame | DataFrame | list[EnumeratedT], *, pagination: Pagination, total: int)

Bases: BaseModel, Generic[EnumeratedT]

model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'from_attributes': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'pagination': FieldInfo(annotation=Pagination, required=True), 'results': FieldInfo(annotation=Union[DataFrame, list[TypeVar]], required=True), 'total': FieldInfo(annotation=int, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

pagination: Pagination
results: DataFrame | list[EnumeratedT]
total: int
class ixmp4.server.rest.base.EnumerationOutput(results: DataFrame | DataFrame | list[EnumeratedT], *, pagination: Pagination, total: int)

Bases: BaseModel, Generic[EnumeratedT]

model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'from_attributes': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'pagination': FieldInfo(annotation=Pagination, required=True), 'results': FieldInfo(annotation=Union[DataFrame, list[TypeVar]], required=True), 'total': FieldInfo(annotation=int, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

pagination: Pagination
results: DataFrame | list[EnumeratedT]
total: int
class ixmp4.server.rest.base.EnumerationOutput(results: DataFrame | DataFrame | list[EnumeratedT], *, pagination: Pagination, total: int)

Bases: BaseModel, Generic[EnumeratedT]

model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'from_attributes': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'pagination': FieldInfo(annotation=Pagination, required=True), 'results': FieldInfo(annotation=Union[DataFrame, list[TypeVar]], required=True), 'total': FieldInfo(annotation=int, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

pagination: Pagination
results: DataFrame | list[EnumeratedT]
total: int
class ixmp4.server.rest.base.EnumerationOutput(results: DataFrame | DataFrame | list[EnumeratedT], *, pagination: Pagination, total: int)

Bases: BaseModel, Generic[EnumeratedT]

model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'from_attributes': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'pagination': FieldInfo(annotation=Pagination, required=True), 'results': FieldInfo(annotation=Union[DataFrame, list[TypeVar]], required=True), 'total': FieldInfo(annotation=int, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

pagination: Pagination
results: DataFrame | list[EnumeratedT]
total: int
class ixmp4.server.rest.base.EnumerationOutput(results: DataFrame | DataFrame | list[EnumeratedT], *, pagination: Pagination, total: int)

Bases: BaseModel, Generic[EnumeratedT]

model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'from_attributes': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'pagination': FieldInfo(annotation=Pagination, required=True), 'results': FieldInfo(annotation=Union[DataFrame, list[TypeVar]], required=True), 'total': FieldInfo(annotation=int, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

pagination: Pagination
results: DataFrame | list[EnumeratedT]
total: int
class ixmp4.server.rest.base.EnumerationOutput(results: DataFrame | DataFrame | list[EnumeratedT], *, pagination: Pagination, total: int)

Bases: BaseModel, Generic[EnumeratedT]

model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'from_attributes': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'pagination': FieldInfo(annotation=Pagination, required=True), 'results': FieldInfo(annotation=Union[DataFrame, list[TypeVar]], required=True), 'total': FieldInfo(annotation=int, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

pagination: Pagination
results: DataFrame | list[EnumeratedT]
total: int
class ixmp4.server.rest.base.EnumerationOutput(results: DataFrame | DataFrame | list[EnumeratedT], *, pagination: Pagination, total: int)

Bases: BaseModel, Generic[EnumeratedT]

model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'from_attributes': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'pagination': FieldInfo(annotation=Pagination, required=True), 'results': FieldInfo(annotation=Union[DataFrame, list[TypeVar]], required=True), 'total': FieldInfo(annotation=int, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

pagination: Pagination
results: DataFrame | list[EnumeratedT]
total: int
class ixmp4.server.rest.base.InitKwargs

Bases: TypedDict

pagination: Pagination
total: int
class ixmp4.server.rest.base.Pagination(*, limit: int = 5000, offset: int = 0)

Bases: BaseModel

limit: int
model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'from_attributes': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'limit': FieldInfo(annotation=int, required=False, default=5000, metadata=[Ge(ge=0), Le(le=10000)]), 'offset': FieldInfo(annotation=int, required=False, default=0, metadata=[Ge(ge=0)])}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

offset: int

ixmp4.server.rest.deps module

async ixmp4.server.rest.deps.do_not_validate_token(authorization: str = Header(None)) dict[str, dict[str, Any]] | None

Override dependency used for skipping authentication while testing.

async ixmp4.server.rest.deps.get_backend(platform: str = Path(PydanticUndefined), user: User = Depends(get_user)) AsyncGenerator[SqlAlchemyBackend, None]

Returns a platform backend for a platform name as a path parameter. Also checks user access permissions if in managed mode.

async ixmp4.server.rest.deps.get_managed_backend(platform: str = Path(PydanticUndefined), user: User = Depends(get_user)) AsyncGenerator[SqlAlchemyBackend, None]

Returns a platform backend for a platform name as a path parameter. Also checks user access permissions if in managed mode.

ixmp4.server.rest.deps.get_test_backend_dependency(backend: SqlAlchemyBackend, auth_params: tuple[User, ManagerConfig, ManagerPlatformInfo]) Callable[[str, User], AsyncGenerator[SqlAlchemyBackend, None]]
async ixmp4.server.rest.deps.get_toml_backend(platform: str = Path(PydanticUndefined), user: User = Depends(get_user)) AsyncGenerator[SqlAlchemyBackend, None]
async ixmp4.server.rest.deps.get_user(token: dict[str, Any] | None = Depends(validate_token)) User

Returns a user object for permission checks.

async ixmp4.server.rest.deps.get_version() str
async ixmp4.server.rest.deps.validate_token(authorization: str | None = Header(None)) dict[str, Any] | None

Validates a JSON Web Token with the secret supplied in the IXMP4_SECRET_HS256 environment variable.

ixmp4.server.rest.meta module

class ixmp4.server.rest.meta.RunMetaEntryInput(*, run__id: int, key: str, value: bool | int | float | str)

Bases: BaseModel

key: str
model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'from_attributes': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'key': FieldInfo(annotation=str, required=True), 'run__id': FieldInfo(annotation=int, required=True), 'value': FieldInfo(annotation=Union[Annotated[bool, Strict(strict=True)], Annotated[int, Strict(strict=True)], Annotated[float, Strict(strict=True)], Annotated[str, Strict(strict=True)]], required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

run__id: int
value: bool | int | float | str
ixmp4.server.rest.meta.bulk_delete(df: DataFrame, backend: SqlAlchemyBackend = Depends(get_managed_backend)) None
ixmp4.server.rest.meta.bulk_upsert(df: DataFrame, backend: SqlAlchemyBackend = Depends(get_managed_backend)) None
ixmp4.server.rest.meta.create(runmeta: RunMetaEntryInput, backend: SqlAlchemyBackend = Depends(get_managed_backend)) RunMetaEntry
ixmp4.server.rest.meta.delete(id: int = Path(PydanticUndefined), backend: SqlAlchemyBackend = Depends(get_managed_backend)) None
ixmp4.server.rest.meta.query(filter: RunMetaEntryFilter = Body(None), join_run_index: bool | None = Query(False), table: bool | None = Query(False), pagination: Pagination = Depends(NoneType), backend: SqlAlchemyBackend = Depends(get_managed_backend)) EnumerationOutput[RunMetaEntry]

ixmp4.server.rest.model module

class ixmp4.server.rest.model.ModelInput(*, name: 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] = {'arbitrary_types_allowed': True, 'from_attributes': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'name': FieldInfo(annotation=str, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

name: str

ixmp4.server.rest.region module

class ixmp4.server.rest.region.RegionInput(*, name: str, hierarchy: str)

Bases: BaseModel

hierarchy: str
model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'from_attributes': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'hierarchy': 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] objects.

This replaces Model.__fields__ from Pydantic V1.

name: str
ixmp4.server.rest.region.delete(id: int = Path(PydanticUndefined), backend: SqlAlchemyBackend = Depends(get_managed_backend)) None

ixmp4.server.rest.run module

class ixmp4.server.rest.run.RunInput(*, model_name: str, scenario_name: 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] = {'arbitrary_types_allowed': True, 'from_attributes': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'name_of_model': FieldInfo(annotation=str, required=True, alias='model_name', alias_priority=2), 'scenario_name': FieldInfo(annotation=str, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

name_of_model: str
scenario_name: str
ixmp4.server.rest.run.create(run: RunInput, backend: SqlAlchemyBackend = Depends(get_managed_backend)) Run
ixmp4.server.rest.run.query(filter: ~ixmp4.data.db.run.filter.RunFilter = Body(id=None version=None default_only=True is_default=None model=None scenario=None id__in=None version__gt=None version__lte=None version__lt=None version__in=None version__gte=None iamc=None), table: bool | None = Query(False), pagination: ~ixmp4.server.rest.base.Pagination = Depends(NoneType), backend: ~ixmp4.data.backend.db.SqlAlchemyBackend = Depends(get_managed_backend)) EnumerationOutput[Run]
ixmp4.server.rest.run.set_as_default_version(id: int = Path(PydanticUndefined), backend: SqlAlchemyBackend = Depends(get_managed_backend)) None
ixmp4.server.rest.run.unset_as_default_version(id: int = Path(PydanticUndefined), backend: SqlAlchemyBackend = Depends(get_managed_backend)) None

ixmp4.server.rest.scenario module

class ixmp4.server.rest.scenario.ScenarioInput(*, name: 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] = {'arbitrary_types_allowed': True, 'from_attributes': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'name': FieldInfo(annotation=str, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

name: str

ixmp4.server.rest.unit module

class ixmp4.server.rest.unit.UnitInput(*, name: 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] = {'arbitrary_types_allowed': True, 'from_attributes': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'name': FieldInfo(annotation=str, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

name: str
ixmp4.server.rest.unit.create(unit: UnitInput, backend: SqlAlchemyBackend = Depends(get_managed_backend)) Unit
ixmp4.server.rest.unit.delete(id: int = Path(PydanticUndefined), backend: SqlAlchemyBackend = Depends(get_managed_backend)) None

Module contents

class ixmp4.server.rest.APIInfo(*, name: str, version: str, is_managed: bool, manager_url: None | str, utcnow: datetime)

Bases: BaseModel

is_managed: bool
manager_url: None | str
model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'from_attributes': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'is_managed': FieldInfo(annotation=bool, required=True), 'manager_url': FieldInfo(annotation=Union[NoneType, str], required=True), 'name': FieldInfo(annotation=str, required=True), 'utcnow': FieldInfo(annotation=datetime, required=True), 'version': FieldInfo(annotation=str, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

name: str
utcnow: datetime
version: str
async ixmp4.server.rest.http_exception_handler(request: Request, exc: IxmpError) JSONResponse
ixmp4.server.rest.root(platform: str = Path(PydanticUndefined), version: str = Depends(get_version)) APIInfo