credmark.cmf.types.compose.MapInputsInput

DTO class MapInputsInput(*, modelInputs, modelSlug, modelVersion=None)[source]

Bases: BaseModel

Input for the compose.map-inputs model.

Show JSON schema
{
   "title": "MapInputsInput",
   "description": "Input for the compose.map-inputs model.",
   "type": "object",
   "properties": {
      "modelInputs": {
         "title": "Modelinputs",
         "description": "A list of inputs. The specified model will be run once with each input.",
         "type": "array",
         "items": {
            "anyOf": [
               {
                  "type": "object"
               },
               {
                  "$ref": "#/definitions/BaseModel"
               },
               {
                  "type": "integer"
               },
               {
                  "type": "string"
               },
               {
                  "type": "number"
               }
            ]
         }
      },
      "modelSlug": {
         "title": "Modelslug",
         "description": "Slug of model to run with each input.",
         "type": "string"
      },
      "modelVersion": {
         "title": "Modelversion",
         "description": "Optional version of the model to run. Normally you should not set this.",
         "type": "string"
      }
   },
   "required": [
      "modelInputs",
      "modelSlug"
   ],
   "examples": [
      {
         "modelSlug": "price.quote",
         "modelInputs": [
            {
               "base": {
                  "address": "0xD533a949740bb3306d119CC777fa900bA034cd52"
               }
            },
            {
               "base": {
                  "address": "0x4e3FBD56CD56c3e72c1403e103b45Db9da5B9D2B"
               }
            }
         ]
      }
   ],
   "definitions": {
      "BaseModel": {
         "title": "BaseModel",
         "type": "object",
         "properties": {}
      }
   }
}

Config
  • schema_extra: dict = {‘examples’: [{‘modelSlug’: ‘price.quote’, ‘modelInputs’: [{‘base’: {‘address’: ‘0xD533a949740bb3306d119CC777fa900bA034cd52’}}, {‘base’: {‘address’: ‘0x4e3FBD56CD56c3e72c1403e103b45Db9da5B9D2B’}}]}]}

Fields
Parameters
Return type

None

field modelInputs: List[Union[dict, BaseModel, IntDTO, StrDTO, FloatDTO]] [Required]

A list of inputs. The specified model will be run once with each input.

field modelSlug: str [Required]

Slug of model to run with each input.

field modelVersion: Optional[str] = None

Optional version of the model to run. Normally you should not set this.