Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 29 for refresh (0.17 sec)

  1. docs_src/sql_databases/sql_app_py39/crud.py

        db.add(db_user)
        db.commit()
        db.refresh(db_user)
        return db_user
    
    
    def get_items(db: Session, skip: int = 0, limit: int = 100):
        return db.query(models.Item).offset(skip).limit(limit).all()
    
    
    def create_user_item(db: Session, item: schemas.ItemCreate, user_id: int):
        db_item = models.Item(**item.dict(), owner_id=user_id)
        db.add(db_item)
        db.commit()
        db.refresh(db_item)
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 1K bytes
    - Viewed (0)
  2. docs_src/sql_databases/sql_app_py310/crud.py

        db.add(db_user)
        db.commit()
        db.refresh(db_user)
        return db_user
    
    
    def get_items(db: Session, skip: int = 0, limit: int = 100):
        return db.query(models.Item).offset(skip).limit(limit).all()
    
    
    def create_user_item(db: Session, item: schemas.ItemCreate, user_id: int):
        db_item = models.Item(**item.dict(), owner_id=user_id)
        db.add(db_item)
        db.commit()
        db.refresh(db_item)
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 1K bytes
    - Viewed (0)
  3. fastapi/security/oauth2.py

                    """
                ),
            ],
            refreshUrl: Annotated[
                Optional[str],
                Doc(
                    """
                    The URL to refresh the token and obtain a new one.
                    """
                ),
            ] = None,
            scheme_name: Annotated[
                Optional[str],
                Doc(
                    """
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 21.1K bytes
    - Viewed (1)
  4. docs/zh/docs/tutorial/sql-databases.md

    ### 创建数据
    
    现在创建实用程序函数来创建数据。
    
    它的步骤是:
    
    * 使用您的数据创建一个 SQLAlchemy 模型*实例。*
    * 使用`add`来将该实例对象添加到您的数据库。
    * 使用`commit`来对数据库的事务提交(以便保存它们)。
    * 使用`refresh`来刷新您的数据库实例(以便它包含来自数据库的任何新数据,例如生成的 ID)。
    
    ```Python hl_lines="18-24  31-36"
    {!../../../docs_src/sql_databases/sql_app/crud.py!}
    ```
    
    !!! tip
        SQLAlchemy 模型`User`包含一个`hashed_password`,它应该是一个包含散列的安全密码。
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 27K bytes
    - Viewed (0)
  5. docs/en/docs/tutorial/static-files.md

    You can read more about this in the [Advanced User Guide](../advanced/index.md){.internal-link target=_blank}.
    
    ## Details
    
    The first `"/static"` refers to the sub-path this "sub-application" will be "mounted" on. So, any path that starts with `"/static"` will be handled by it.
    
    The `directory="static"` refers to the name of the directory that contains your static files.
    
    The `name="static"` gives it a name that can be used internally by **FastAPI**.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 19:56:09 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  6. docs/de/docs/tutorial/dependencies/sub-dependencies.md

        ```Python hl_lines="1"
        async def needy_dependency(fresh_value: Annotated[str, Depends(get_value, use_cache=False)]):
            return {"fresh_value": fresh_value}
        ```
    
    === "Python 3.8+ nicht annotiert"
    
        !!! tip "Tipp"
            Bevorzugen Sie die `Annotated`-Version, falls möglich.
    
        ```Python hl_lines="1"
        async def needy_dependency(fresh_value: str = Depends(get_value, use_cache=False)):
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 18:09:48 GMT 2024
    - 6.3K bytes
    - Viewed (0)
  7. docs/en/docs/advanced/dataclasses.md

    8. Notice that this *path operation function* uses regular `def` instead of `async def`.
    
        As always, in FastAPI you can combine `def` and `async def` as needed.
    
        If you need a refresher about when to use which, check out the section _"In a hurry?"_ in the docs about [`async` and `await`](../async.md#in-a-hurry){.internal-link target=_blank}.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  8. docs/em/docs/tutorial/sql-databases.md

    ### ✍ 💽
    
    🔜 ✍ 🚙 🔢 ✍ 💽.
    
    🔁:
    
    * ✍ 🇸🇲 🏷 *👐* ⏮️ 👆 📊.
    * `add` 👈 👐 🎚 👆 💽 🎉.
    * `commit` 🔀 💽 (👈 👫 🖊).
    * `refresh` 👆 👐 (👈 ⚫️ 🔌 🙆 🆕 📊 ⚪️➡️ 💽, 💖 🏗 🆔).
    
    ```Python hl_lines="18-24  31-36"
    {!../../../docs_src/sql_databases/sql_app/crud.py!}
    ```
    
    !!! tip
        🇸🇲 🏷 `User` 🔌 `hashed_password` 👈 🔜 🔌 🔐 #️⃣ ⏬ 🔐.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 25.2K bytes
    - Viewed (1)
  9. docs/en/docs/tutorial/first-steps.md

    Here the `app` variable will be an "instance" of the class `FastAPI`.
    
    This will be the main point of interaction to create all your API.
    
    ### Step 3: create a *path operation*
    
    #### Path
    
    "Path" here refers to the last part of the URL starting from the first `/`.
    
    So, in a URL like:
    
    ```
    https://example.com/items/foo
    ```
    
    ...the path would be:
    
    ```
    /items/foo
    ```
    
    !!! info
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 12K bytes
    - Viewed (0)
  10. docs/em/docs/advanced/nosql-databases.md

    **FastAPI** 💪 🛠️ ⏮️ 🙆 <abbr title="Distributed database (Big Data), also 'Not Only SQL'">☁</abbr>.
    
    📥 👥 🔜 👀 🖼 ⚙️ **<a href="https://www.couchbase.com/" class="external-link" target="_blank">🗄</a>**, <abbr title="Document here refers to a JSON object (a dict), with keys and values, and those values can also be other JSON objects, arrays (lists), numbers, strings, booleans, etc.">📄</abbr> 🧢 ☁ 💽.
    
    👆 💪 🛠️ ⚫️ 🙆 🎏 ☁ 💽 💖:
    
    * **✳**
    * **👸**
    * **✳**
    Plain Text
    - Registered: Sun Mar 31 07:19:09 GMT 2024
    - Last Modified: Sat Apr 01 09:26:04 GMT 2023
    - 4.8K bytes
    - Viewed (0)
Back to top