Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inline model creation #113

samuelcolvin opened this issue Jan 6, 2018 · 0 comments

inline model creation #113

samuelcolvin opened this issue Jan 6, 2018 · 0 comments


Copy link

@samuelcolvin samuelcolvin commented Jan 6, 2018

class LabelModel(BaseModel):
    name: str
    machine_name: str

class XModel(BaseModel):
    labels1: List[LabelModel]
    labels2: List[create_model('LabelModel', name=(str, ...), machine_name=(str, ...))]

Here labels1 is the same as labels2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

1 participant