Platform

IXMP4 provides a CLI for platform creation, deletion, etc.:

# list all existing databases
ixmp4 platforms list

# run all migrations on all existing databases
ixmp4 platforms upgrade

# create a new database or register it
ixmp4 platforms add <database-name> [--dsn sqlite://my/database/file.db]

# delete a database
ixmp4 platforms delete <database-name>

In development mode additional commands are available:

# set the revision hash of all databases
# without running migrations
ixmp4 platforms stamp <revision-hash>
class ixmp4.core.platform.Platform(name: str | None = None, _backend: Backend | None = None, _auth: BaseAuth | None = None)

Bases: object

A modeling platform instance as a connection to a data backend. Enables the manipulation of data via the Run class and Repository instances.

backend: Backend

Provides a unified data interface for the platform. Using it directly is not recommended.

iamc: PlatformIamcData
meta: MetaRepository
models: ModelRepository
regions: RegionRepository
runs: RunRepository
scenarios: ScenarioRepository
units: UnitRepository