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": {
         "additionalProperties": true,
         "title": "Params",
         "type": "object"
      },
      "depends": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "title": "Depends"
      },
      "obj": {
         "default": false,
         "title": "Obj",
         "type": "boolean"
      },
      "stored_at": {
         "default": -1,
         "title": "Stored At",
         "type": "integer"
      }
   },
   "$defs": {
      "AssetScope": {
         "enum": [
            "runner",
            "process",
            "node"
         ],
         "title": "AssetScope",
         "type": "string"
      },
      "AssetSpecification": {
         "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"
                  },
                  {
                     "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": [
            "id",
            "type",
            "scope"
         ],
         "title": "AssetSpecification",
         "type": "object"
      }
   },
   "additionalProperties": false,
   "required": [
      "id",
      "spec",
      "scope",
      "depends"
   ]
}

Config:
  • extra: str = forbid

Fields:
field obj: bool = False

Instantiated asset instance

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