Skip to main content
1 vote
0 answers
69 views

I have a sqlmodel defined database and I'm having issues with how to use sqlmodel. This is a two-table reduction of my DB. from __future__ import annotations import uuid from datetime import datetime ...
mmachenry's user avatar
  • 1,992
0 votes
0 answers
32 views

I have an ai agent made with Python Llamaindex, FastAPI and SqlModel. I want to log the ToolCall in "search_documents" function but it never works. The only problem is that ToolCall is not ...
Joe's user avatar
  • 23
0 votes
0 answers
122 views

I'm developing a FastAPI application, a file manager system, and I'm using PostgreSQL as the database. To define database entity models in my code, I previously used SQLAlchemy, but now I switched to ...
stam's user avatar
  • 106
0 votes
2 answers
211 views

How can I create a view in SQLModel? For instance, starting from this example taken from the user guide, which creates a table for Hero and a table for Team, where a Team can contain multiple Heros: ...
robertspierre's user avatar
2 votes
2 answers
309 views

I'm currently working on an api using fastapi and sqlmodel. I'm new to these two and I might have missed something. I have a user model with an e-mail field. So no email outside my organization is ...
somedev's user avatar
  • 49
0 votes
0 answers
54 views

The context is a menu-like hierarchy eg: parent > child > grandchild in a recursive manner (eg. child can have children), they are linked by the menu_parent_id. The top-most MenuGroup has no ...
Jacob David C. Cunningham's user avatar
1 vote
2 answers
308 views

I'm writing integration tests with pytest for my FastAPI/SQLModel app, and I was looking for a way to freeze time directly inside the app. While freezegun works fine in basic scenarios like unit tests,...
Mister Balise's user avatar
1 vote
1 answer
233 views

What is best way to convert a FastAPI query into a Polars (or pandas) dataframe. Co-pilot give this. with Session(engine) as session: questions = session.exec(select(Questions)).all() ...
diogenes's user avatar
  • 2,189
0 votes
0 answers
102 views

I have a database table with an Enum column. My application does transforms with polars, so I'm reading with the pl.read_database() method. However reading the table when schema_overrides is supplied ...
eldrly's user avatar
  • 326
0 votes
1 answer
116 views

I want to do a unittest with pytest for this method: class UserService: @classmethod async def get_user_by_login(cls, session: SessionDep, login: str) -> Optional[User]: sql = ...
Mister Balise's user avatar
0 votes
1 answer
99 views

I would like to save objects like this to a local database. The object is a dictionary with various entries. For instance, the first entries are like: "id": "https://openalex.org/...
robertspierre's user avatar
1 vote
1 answer
122 views

My user model inherits from fastapi-users lib. When I try to log into the admin panel I get an error "User model is not registered." from core.models import Base from fastapi_users.db import ...
Roman Golubnikov's user avatar
0 votes
1 answer
116 views

I'm trying to get an azure sql db working. I am using FastAPI, SQLModel and SQLAlchemy from sqlmodel import create_engine, SQLModel, Session def init_db(settings: SqlDBSettings = SqlDBSettings()): ...
J-H's user avatar
  • 1,901
1 vote
2 answers
215 views

almost exact question, 2 years old, no responses: Deep nesting response model in fastapi using sqlmodel My question is like this one but I have an error: Not able to get data for joining two tables in ...
soylentkim's user avatar
2 votes
1 answer
262 views

I have a script that needs to query some data, process it, and then update some columns in the row I read. My code looks like this: def query_data(param1): with Session(engine) as session: ...
BBloggsbott's user avatar

15 30 50 per page
1
2 3 4 5
17