{
  "__type": "IngestedDoc",
  "__tag": 4010,
  "_content": {
    "Notes": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Warns": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Raises": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Yields": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Methods": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Returns": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Create a dict trait type from a Python dict."
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Receives": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Warnings": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Attributes": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Parameters": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Parameters",
          "__tag": 4026,
          "children": [
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "value_trait",
              "annotation": "TraitType [ optional ]",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The specified trait type to check and use to restrict the values of the dict. If unspecified, values are not checked."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "per_key_traits",
              "annotation": "Dictionary of {keys:trait types} [ optional, keyword-only ]",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "A Python dictionary containing the types that are valid for restricting the values of the dict on a per-key basis. Each value in this dict should be a Trait for validating"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "key_trait",
              "annotation": "TraitType [ optional, keyword-only ]",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The type for restricting the keys of the dict. If unspecified, the types of the keys are not checked."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "default_value",
              "annotation": "SequenceType [ optional, keyword-only ]",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The default value for the Dict.  Must be dict, tuple, or None, and will be cast to a dict if not None. If any key or value traits are specified, the "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "default_value"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " must conform to the constraints."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Extended Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "The default value is created by doing "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "dict(default_value)"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", which creates a copy of the "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "default_value"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "."
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Other Parameters": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    }
  },
  "_ordered_sections": [
    "Summary",
    "Extended Summary",
    "Parameters",
    "Attributes",
    "Methods",
    "Returns",
    "Yields",
    "Receives",
    "Other Parameters",
    "Raises",
    "Warns",
    "Warnings",
    "Notes"
  ],
  "item_file": "/traitlets/traitlets.py",
  "item_line": 3860,
  "item_type": "function",
  "aliases": [
    "traitlets.Dict.__init__"
  ],
  "example_section_data": {
    "__type": "Section",
    "__tag": 4015,
    "children": [
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "a dict whose values must be text\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "d = Dict(Unicode())\n",
        "execution_status": "none"
      },
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "\nd2['n'] must be an integer\nd2['s'] must be text\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "d2 = Dict(per_key_traits={\"n\": Integer(), \"s\": Unicode()})\n",
        "execution_status": "none"
      },
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "\nd3's keys must be text\nd3's values must be integers\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "d3 = Dict(value_trait=Integer(), key_trait=Unicode())\n",
        "execution_status": "none"
      }
    ],
    "title": [],
    "level": 0,
    "target": null
  },
  "see_also": [],
  "signature": {
    "__type": "SignatureNode",
    "__tag": 4029,
    "kind": "function",
    "parameters": [
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "self",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": {
          "__type": "Empty",
          "__tag": 4031
        }
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "value_trait",
        "annotation": "TraitType[t.Any, t.Any] | dict[K, V] | Sentinel | None",
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "None"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "per_key_traits",
        "annotation": "t.Any",
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "None"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "key_trait",
        "annotation": "TraitType[t.Any, t.Any] | None",
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "None"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "default_value",
        "annotation": "dict[K, V] | Sentinel | None",
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "traitlets.Undefined"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "kwargs",
        "annotation": "t.Any",
        "kind": "VAR_KEYWORD",
        "default": {
          "__type": "Empty",
          "__tag": 4031
        }
      }
    ],
    "return_annotation": "None",
    "target_name": "__init__"
  },
  "references": null,
  "qa": "traitlets.traitlets:Dict.__init__",
  "arbitrary": [],
  "local_refs": [
    "default_value",
    "key_trait",
    "per_key_traits",
    "value_trait"
  ]
}