# Runtime Control in Python

> The startup procedure that initializes the eXtremeDB runtime environment in Python applications is implemented in the exdb.init_runtime() method which must be called before any database operations can be performed. The exdb.init_runtime() method accepts the following arguments to set runtime options to and to load specific eXtremeDB libraries:

> is_disk | A boolean (`True` or `False`) value; if `True` load disk (persistent storage) versions of libraries; default value is `False` which means initialize the in-memory runtime
> tmgr | A string specifying which transaction manager to use: valid values are 'mursiw' or 'mvcc'; default is 'mursiw' (MURSIW transaction manager)
> is_shm | A boolean (`True` or `False`) value; if `True` the shared-memory runtime is to be used; default is `False`; i.e. use conventional (“in-process” or “local”) memory
> is_debug | A boolean (`True` or `False`) value; if `True` the debug version of the runtime is to be used.; default is `False`; i.e. use the release (optimized “no-debug”) runtime
> cluster | A boolean (`True` or `False`) value; if `True` the cluster runtime is to be loaded; default is `False`; i.e.do not load the cluster runtime. (Note that this flag is mutually exclusive with ha)
> ha | A boolean (`True` or `False`) value; if `True` the High Availability (HA) runtime is to be loaded; default is `False`; i.e. do not load the HA runtime. (Note that this flag is mutually exclusive with cluster)
> options | Specifies runtime options; the options can be specified either by an “options=(option,value)” tuple or as a list of “options=(option,value)” tuples (Please refer to the Reference Guide page `mco_runtime_setoption()` for the list of actual runtime options)
> DiskCompression | A boolean (`True` or `False`) value; if `True` the low level file access library with disk compression enabled is to be used; default is `False`; i.e. do not to use low level disk compression library (Note that this flag is mutually exclusive with UseAsyncIO)
> UsePosixLibraries | A boolean (`True` or `False`) value; if `True` the low level posix synchronization primitives library is to be used; default is `False`; i.e. use the SystemV synchronization primitives library
> UseAsyncIO | A boolean (`True` or `False`) value; if `True` the asynchronous disk IO library; default is `False`; i.e. use the standard synchronous IO library (eg. `libmcofu98` on Linux, `mcofw32.lib` on Windows. Note that Windows only supports synchronous IO so `True` is not a valid choice for this option on Windows).
> iot | A boolean (`True` or `False`) value; if `True` the IoT communication is enabled (see the Active Data Replication page)

> The typical sequence of API calls would look like the following:

>         ...
>         is_disk = False
>         tmgr = 'mvcc'
>         is_shm = True
>         is_debug = True

>         #Load Runtime configuration specified by parameters
>         exdb.init_runtime(is_disk, tmgr, is_shm, is_debug)
>         ...

> ## Persistent Databases

> For persistent databases, the exdb.init_runtime() method is called exactly as for an in-memory database except that the argument `is_disk=True` and possibly the two other arguments: `DiskCompression` and `UseAsyncIO` (see table above ). The typical sequence of API calls for a persistent database application would look like the following:

>         ...
>         is_disk = True
>         tmgr = 'mvcc'
>         is_shm = False
>         is_debug = True

>         #Load Runtime configuration specified by parameters
>         exdb.init_runtime(is_disk, tmgr, is_shm, is_debug)
>         ...

> (Please refer to SDK sample python/open for an example.)