seismometer.configuration.model.DictionaryItem

pydantic model seismometer.configuration.model.DictionaryItem

Defines a generic dictionary item.

Show Entity Relationship Diagram
digraph "Entity Relationship Diagram created by erdantic" {
   graph [fontcolor=gray66,
      fontname="Times New Roman,Times,Liberation Serif,serif",
      fontsize=9,
      nodesep=0.5,
      rankdir=LR,
      ranksep=1.5
   ];
   node [fontname="Times New Roman,Times,Liberation Serif,serif",
      fontsize=14,
      label="\N",
      shape=plain
   ];
   edge [dir=both];
   "seismometer.configuration.model.DictionaryItem"   [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>DictionaryItem</b></td></tr><tr><td>name</td><td port="name">str</td></tr><tr><td>display_name</td><td port="display_name">str</td></tr><tr><td>dtype</td><td port="dtype">Optional[str]</td></tr><tr><td>definition</td><td port="definition">Optional[str]</td></tr></table>>,
      tooltip="seismometer.configuration.model.DictionaryItem&#xA;&#xA;Defines a generic dictionary item.&#xA;"];
}

Show JSON schema
{
   "title": "DictionaryItem",
   "description": "Defines a generic dictionary item.",
   "type": "object",
   "properties": {
      "name": {
         "title": "Name",
         "type": "string"
      },
      "display_name": {
         "default": "",
         "title": "Display Name",
         "type": "string"
      },
      "dtype": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Dtype"
      },
      "definition": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Definition"
      }
   },
   "required": [
      "name"
   ]
}

Fields:
Validators:
field definition: str | None = None

The definition of the item.

field display_name: str = ''

The name to display for the item, defaults to name, currently ignored.

Validated by:
field dtype: str | None = None

The pandas-compatible type of data, currently ignored.

field name: str [Required]

The source name of the item, should match raw data.

validator default_display_name  »  display_name

Ensures that the display_name is set to the name if not provided.

Parameters:
  • display_name (str) – The display name of the item.

  • values (dict) – The values of the instance.

Returns:

The resolved display name.

Return type:

str