Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 14 of 14 for create_engine (0.09 sec)

  1. docs_src/sql_databases/tutorial002.py

    from typing import List, Union
    
    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: Union[int, None] = Field(default=None, index=True)
    
    
    class Hero(HeroBase, table=True):
        id: Union[int, None] = Field(default=None, primary_key=True)
        secret_name: str
    
    
    class HeroPublic(HeroBase):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Oct 09 19:44:42 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  2. 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 Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Oct 09 19:44:42 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_sql_databases/test_tutorial001.py

    import warnings
    
    import pytest
    from dirty_equals import IsDict, IsInt
    from fastapi.testclient import TestClient
    from inline_snapshot import snapshot
    from sqlalchemy import StaticPool
    from sqlmodel import SQLModel, create_engine
    from sqlmodel.main import default_registry
    
    from tests.utils import needs_py39, needs_py310
    
    
    def clear_sqlmodel():
        # Clear the tables in the metadata for the default base model
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Oct 09 19:44:42 UTC 2024
    - 14.8K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_sql_databases/test_tutorial002.py

    import warnings
    
    import pytest
    from dirty_equals import IsDict, IsInt
    from fastapi.testclient import TestClient
    from inline_snapshot import snapshot
    from sqlalchemy import StaticPool
    from sqlmodel import SQLModel, create_engine
    from sqlmodel.main import default_registry
    
    from tests.utils import needs_py39, needs_py310
    
    
    def clear_sqlmodel():
        # Clear the tables in the metadata for the default base model
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Oct 09 19:44:42 UTC 2024
    - 19.9K bytes
    - Viewed (0)
Back to top