pydantic-sqlalchemy icon indicating copy to clipboard operation
pydantic-sqlalchemy copied to clipboard

Tools to convert SQLAlchemy models to Pydantic models

Results 49 pydantic-sqlalchemy issues
Sort by recently updated
recently updated
newest added

Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 4. Release notes Sourced from actions/checkout's releases. v4.0.0 What's Changed Update default runtime to node20 by @​takost in actions/checkout#1436 Support fetching without the --progress option...

dependencies
github_actions

While testing your project I ran into this issue. Not sure where the column.type.python_test exists because when I was checking the sqlalchemy table declaration there was no reference to it....

investigate

I have created my model from pre-existing MySQL database everything working fine butt when I add DateTime: str gives error. str type expected (type=type_error.str)

Hi, thanks for this function just as I started putting together one of my own. Regarding this code: https://github.com/tiangolo/pydantic-sqlalchemy/blob/8667e213a6ad8e62288fad2a6621958e8ab0b688/pydantic_sqlalchemy/main.py#L24-L30 Have you looked at the [typing.get_type_hints()](https://docs.python.org/3/library/typing.html#typing.get_type_hints) function? Perhaps ```python else: python_types...

import peewee as pw class Order(pw.Model): project_id = pw.CharField(null=True, max_length=255, verbose_name="") order_id = pw.CharField(null=True, max_length=255, index=True, verbose_name="") pydanticA = sqlalchemy_to_pydantic(Order)

error msg: ``` from sqlalchemy import select from sqlalchemy.ext.asyncio import AsyncSession from sqlalchemy.ext.asyncio import create_async_engine from pydantic_sqlalchemy import sqlalchemy_to_pydantic engine = create_async_engine('postgresql+asyncpg://postgres:[email protected]/postgres') session = AsyncSession(engine) stmt = select(Subjob).where(Subjob.id.in_([1, 2])) result...

investigate

hi there :) ```python PydanticUser = sqlalchemy_to_pydantic(User) class PydanticUser2(sqlalchemy_to_pydantic(User)): pass print(PydanticUser, PydanticUser2, User) ``` the output is: ```python ``` If we directly use `sqlalchemy_to_pydantic`, actually we create another `User` class...

investigate

📝 Add deprecation notice to README, move to SQLModel

looking at the script, I would expect orm_mode to be turned on by default, but when using the model I am getting the usual "AttributeError: 'dict' object has no attribute...

Bugfix: give actual `pydantic` model class a `__name__` attribute. Some other libraries seem to expect that these pydantic models have `__name__`s.

investigate