Skip to content

Limit for nesting Dict objects #61

@lokitorin

Description

@lokitorin

Describe the bug:

It seems that nested models with field of type 'Dict' limits data generation:

изображение

Steps to reproduce the issue:

script to reproduce (run with streamlit run)

from typing import (Text, Dict)
from pydantic import BaseModel
import streamlit_pydantic as sp

class first(BaseModel):
    item: Dict[Text, int]

class second(BaseModel):
    item2: Dict[Text, first]

class third(BaseModel):
    item3: Dict[Text, second]

if __name__ == '__main__':

    data = sp.pydantic_input(key="test", model=third)
    pass

Technical details:

  • Host Machine OS: windows 10
  • Browser: any

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions