Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 81 for sqlmodel (0.05 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

  1. docs/ja/docs/tutorial/sql-databases.md

    これはとてもシンプルで短いチュートリアルです。データベースや SQL、より高度な機能について学びたい場合は、[SQLModel のドキュメント](https://sqlmodel.tiangolo.com/)をご覧ください。
    
    ## `SQLModel` のインストール { #install-sqlmodel }
    
    まずは [仮想環境](../virtual-environments.md) を作成・有効化し、`sqlmodel` をインストールします:
    
    <div class="termy">
    
    ```console
    $ pip install sqlmodel
    ---> 100%
    ```
    
    </div>
    
    ## 単一モデルでアプリ作成 { #create-the-app-with-a-single-model }
    
    まずは最も簡単な、単一の SQLModel モデルだけを使うバージョンを作ります。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:07:17 GMT 2026
    - 18K bytes
    - Click Count (0)
  2. docs/en/docs/tutorial/sql-databases.md

    ## Install `SQLModel` { #install-sqlmodel }
    
    First, make sure you create your [virtual environment](../virtual-environments.md), activate it, and then install `sqlmodel`:
    
    <div class="termy">
    
    ```console
    $ pip install sqlmodel
    ---> 100%
    ```
    
    </div>
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Mar 07 09:29:03 GMT 2026
    - 15.3K bytes
    - Click Count (0)
  3. docs_src/sql_databases/tutorial001_an_py310.py

    from typing import Annotated
    
    from fastapi import Depends, FastAPI, HTTPException, Query
    from sqlmodel import Field, Session, SQLModel, create_engine, select
    
    
    class Hero(SQLModel, table=True):
        id: int | None = Field(default=None, primary_key=True)
        name: str = Field(index=True)
        age: int | None = Field(default=None, index=True)
        secret_name: str
    
    
    sqlite_file_name = "database.db"
    sqlite_url = f"sqlite:///{sqlite_file_name}"
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Oct 09 19:44:42 GMT 2024
    - 1.7K bytes
    - Click Count (0)
  4. docs_src/sql_databases/tutorial002_py310.py

    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
    
    
    class HeroCreate(HeroBase):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Oct 09 19:44:42 GMT 2024
    - 2.5K bytes
    - Click Count (0)
  5. docs_src/dependencies/tutorial014_an_py310.py

    import time
    from typing import Annotated
    
    from fastapi import Depends, FastAPI, HTTPException
    from fastapi.responses import StreamingResponse
    from sqlmodel import Field, Session, SQLModel, create_engine
    
    engine = create_engine("postgresql+psycopg://postgres:postgres@localhost/db")
    
    
    class User(SQLModel, table=True):
        id: int | None = Field(default=None, primary_key=True)
        name: str
    
    
    app = FastAPI()
    
    
    def get_session():
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Mon Sep 29 03:29:38 GMT 2025
    - 957 bytes
    - Click Count (0)
  6. docs/zh-hant/docs/tutorial/sql-databases.md

    ///
    
    這是一份非常簡短的教學,如果你想更全面學習資料庫、SQL,或更進階的功能,請參考 [SQLModel 文件](https://sqlmodel.tiangolo.com/)。
    
    ## 安裝 `SQLModel` { #install-sqlmodel }
    
    首先,請先建立你的[虛擬環境](../virtual-environments.md)、啟用它,然後安裝 `sqlmodel`:
    
    <div class="termy">
    
    ```console
    $ pip install sqlmodel
    ---> 100%
    ```
    
    </div>
    
    ## 建立只有單一模型的應用 { #create-the-app-with-a-single-model }
    
    我們先用單一 SQLModel 模型建立這個應用的最簡版。
    
    接著我們會在下方用多個模型來提升安全性與彈性。🤓
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 14.8K bytes
    - Click Count (0)
  7. docs/zh/docs/tutorial/sql-databases.md

    ///
    
    这是一个非常简单和简短的教程。如果你想了解一般的数据库、SQL 或更高级的功能,请查看 [SQLModel 文档](https://sqlmodel.tiangolo.com/)。
    
    ## 安装 `SQLModel` { #install-sqlmodel }
    
    首先,确保你创建并激活了[虚拟环境](../virtual-environments.md),然后安装 `sqlmodel`:
    
    <div class="termy">
    
    ```console
    $ pip install sqlmodel
    ---> 100%
    ```
    
    </div>
    
    ## 创建含有单一模型的应用 { #create-the-app-with-a-single-model }
    
    我们先创建应用的最简单的第一个版本,只有一个 **SQLModel** 模型。
    
    稍后我们将通过下面的**多个模型**提高其安全性和多功能性。🤓
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 15.4K bytes
    - Click Count (0)
  8. 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
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Oct 09 19:44:42 GMT 2024
    - 2.5K bytes
    - Click Count (0)
  9. docs_src/dependencies/tutorial013_an_py310.py

    import time
    from typing import Annotated
    
    from fastapi import Depends, FastAPI, HTTPException
    from fastapi.responses import StreamingResponse
    from sqlmodel import Field, Session, SQLModel, create_engine
    
    engine = create_engine("postgresql+psycopg://postgres:postgres@localhost/db")
    
    
    class User(SQLModel, table=True):
        id: int | None = Field(default=None, primary_key=True)
        name: str
    
    
    app = FastAPI()
    
    
    def get_session():
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Mon Sep 29 03:29:38 GMT 2025
    - 937 bytes
    - Click Count (0)
  10. fastapi/.agents/skills/fastapi/references/other-tools.md

        return f"Hello {name}"
    
    
    @app.get("/items/")
    def read_items():
        result = syncify(do_async_work)(name="World")
        return {"message": result}
    ```
    
    ## SQLModel for SQL databases
    
    When working with SQL databases, prefer using SQLModel as it is integrated with Pydantic and will allow declaring data validation with the same models.
    
    Prefer it over SQLAlchemy.
    
    ## HTTPX
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 01 10:05:57 GMT 2026
    - 1.5K bytes
    - Click Count (0)
Back to Top