Elliana May
Elliana May
Looks like sqlalchemy 2 is finally on pypi, I'll see if this is possible to implement now
On hold till sqlalchemy 2 is closer to being released
Also blocked by https://github.com/duckdb/duckdb/issues/1768
Try this: ```python import inspect from typing import Dict, Type, TypeVar, Protocol, Generic, NewType from fastapi import Depends, FastAPI, File, Form from pydantic import BaseModel, validator, BaseSettings, Json app =...
That snippet alone isn't really sufficient, as it doesn't include any pydantic validation. But feel free to submit a pr with appropriate documentation and tests if you think it's worth...
@thiras I can't really answer your question without knowing how you are building your form - as in, what the post body actually looks like
```python @router.post("/user/", response_class=HTMLResponse) async def admin_create_user( request: Request, db: AsyncSession = Depends(deps.get_db), user: schemas.User = Depends(deps.get_current_admin_user), permissions: schemas.Permission = Depends(schemas.Permission.as_form), form_data: schemas.UserCreate = Depends(schemas.UserCreate.as_form), ): ... ``` ?
@thiras again, I can't really answer your question without knowing how you are building your form - as in, what the post body actually looks like
@thiras I'm honestly not sure why you're asking for that, as that isn't a list at all, just a series of named form fields. You should really consider at that...
Can't use dataclasses as request body and response_model, even in different path operation functions
@ringsaturn you misunderstand, pydantic also has support for dataclasses as well as `BaseModel`