- Sort Score
- Result 10 results
- Languages All
Results 11 - 12 of 12 for create_engine (0.04 sec)
-
docs_src/sql_databases/tutorial002_an_py310.py
from typing import Annotated from fastapi import Depends, FastAPI, HTTPException, Query from sqlmodel import Field, Session, SQLModel, create_engine, select class HeroBase(SQLModel): name: str = Field(index=True) age: int | None = Field(default=None, index=True) class Hero(HeroBase, table=True): id: int | None = Field(default=None, primary_key=True) secret_name: str class HeroPublic(HeroBase): id: int
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Oct 09 19:44:42 UTC 2024 - 2.5K bytes - Viewed (0) -
tests/test_tutorial/test_sql_databases/test_tutorial002.py
import warnings import pytest from dirty_equals import IsInt from fastapi.testclient import TestClient from inline_snapshot import Is, snapshot from sqlalchemy import StaticPool from sqlmodel import SQLModel, create_engine from sqlmodel.main import default_registry from tests.utils import needs_py310 def clear_sqlmodel(): # Clear the tables in the metadata for the default base model SQLModel.metadata.clear()
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 17.9K bytes - Viewed (0)