assets

class counter(start: int = 0)[source]

custom generator because itertools is removing deepcopy in 3.14 https://docs.python.org/3/deprecations/pending-removal-in-3.14.html

send(_: Any) int[source]
throw(type: Any = None, value: Any = None, traceback: Any = None) None[source]
property current: int
pydantic model Initializer[source]

True when initialized, false when deinitialized

Show JSON schema
{
   "title": "Initializer",
   "description": "True when initialized, false when deinitialized",
   "type": "object",
   "properties": {
      "id": {
         "title": "Id",
         "type": "string"
      },
      "spec": {
         "$ref": "#/$defs/AssetSpecification"
      },
      "scope": {
         "$ref": "#/$defs/AssetScope"
      },
      "params": {
         "anyOf": [
            {
               "additionalProperties": true,
               "type": "object"
            },
            {
               "items": {},
               "type": "array"
            }
         ],
         "title": "Params"
      },
      "depends": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "title": "Depends"
      },
      "obj": {
         "default": false,
         "title": "Obj",
         "type": "boolean"
      },
      "stored_at": {
         "default": [
            [
               "tube",
               -1
            ]
         ],
         "items": {
            "$ref": "#/$defs/EpochSegment"
         },
         "title": "Stored At",
         "type": "array"
      }
   },
   "$defs": {
      "AssetScope": {
         "enum": [
            "runner",
            "process",
            "node"
         ],
         "title": "AssetScope",
         "type": "string"
      },
      "AssetSpecification": {
         "additionalProperties": false,
         "description": "Specification for a single asset within a tube .yaml file.",
         "properties": {
            "id": {
               "title": "Id",
               "type": "string"
            },
            "type": {
               "title": "Type",
               "type": "string"
            },
            "scope": {
               "$ref": "#/$defs/AssetScope"
            },
            "params": {
               "anyOf": [
                  {
                     "additionalProperties": true,
                     "type": "object"
                  },
                  {
                     "items": {},
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Params"
            },
            "depends": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Depends"
            },
            "description": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Description"
            }
         },
         "required": [
            "type",
            "scope"
         ],
         "title": "AssetSpecification",
         "type": "object"
      },
      "EpochSegment": {
         "maxItems": 2,
         "minItems": 2,
         "prefixItems": [
            {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "const": "tube",
                     "type": "string"
                  }
               ],
               "title": "Node Id"
            },
            {
               "title": "Epoch",
               "type": "integer"
            }
         ],
         "type": "array"
      }
   },
   "additionalProperties": false,
   "required": [
      "id",
      "spec",
      "scope",
      "depends"
   ]
}

Config:
  • extra: str = forbid

  • arbitrary_types_allowed: bool = True

Fields:
field obj: bool = False

Instantiated asset instance

deinit() None[source]
init() None[source]