Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 82 for Database (0.18 sec)

  1. docs/em/docs/advanced/testing-database.md

        ├── __init__.py
        ├── crud.py
        ├── database.py
        ├── main.py
        ├── models.py
        ├── schemas.py
        └── tests
            ├── __init__.py
            └── test_sql_app.py
    ```
    
    ## ✍ 🆕 💽 🎉
    
    🥇, 👥 ✍ 🆕 💽 🎉 ⏮️ 🆕 💽.
    
    💯 👥 🔜 ⚙️ 📁 `test.db` ↩️ `sql_app.db`.
    
    ✋️ 🎂 🎉 📟 🌅 ⚖️ 🌘 🎏, 👥 📁 ⚫️.
    
    ```Python hl_lines="8-13"
    {!../../../docs_src/sql_databases/sql_app/tests/test_sql_app.py!}
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Apr 01 09:26:04 GMT 2023
    - 2.6K bytes
    - Viewed (0)
  2. docs/en/docs/advanced/testing-database.md

    .
    └── sql_app
        ├── __init__.py
        ├── crud.py
        ├── database.py
        ├── main.py
        ├── models.py
        ├── schemas.py
        └── tests
            ├── __init__.py
            └── test_sql_app.py
    ```
    
    ## Create the new database session
    
    First, we create a new database session with the new database.
    
    We'll use an in-memory database that persists during the tests instead of the local file `sql_app.db`.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 3.5K bytes
    - Viewed (0)
  3. docs/zh/docs/advanced/testing-database.md

    └── sql_app
        ├── __init__.py
        ├── crud.py
        ├── database.py
        ├── main.py
        ├── models.py
        ├── schemas.py
        └── tests
            ├── __init__.py
            └── test_sql_app.py
    ```
    
    ## 创建新的数据库会话
    
    首先,为新建数据库创建新的数据库会话。
    
    测试时,使用 `test.db` 替代 `sql_app.db`。
    
    但其余的会话代码基本上都是一样的,只要复制就可以了。
    
    ```Python hl_lines="8-13"
    {!../../../docs_src/sql_databases/sql_app/tests/test_sql_app.py!}
    ```
    
    !!! tip "提示"
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Jan 28 18:09:26 GMT 2024
    - 2.8K bytes
    - Viewed (0)
  4. docs/zh/docs/tutorial/sql-databases.md

    ---> 100%
    ```
    
    </div>
    
    ## 创建 SQLAlchemy 部件
    
    让我们转到文件`sql_app/database.py`。
    
    ### 导入 SQLAlchemy 部件
    
    ```Python hl_lines="1-3"
    {!../../../docs_src/sql_databases/sql_app/database.py!}
    ```
    
    ### 为 SQLAlchemy 定义数据库 URL地址
    
    ```Python hl_lines="5-6"
    {!../../../docs_src/sql_databases/sql_app/database.py!}
    ```
    
    在这个例子中,我们正在“连接”到一个 SQLite 数据库(用 SQLite 数据库打开一个文件)。
    
    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/how-to/nosql-databases-couchbase.md

    They are generally all related to the same application.
    
    The analogy in the relational database world would be a "database" (a specific database, not the database server).
    
    The analogy in **MongoDB** would be a "collection".
    
    In the code, a `Bucket` represents the main entrypoint of communication with the database.
    
    This utility function will:
    
    * Connect to a **Couchbase** cluster (that might be a single machine).
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Jan 16 13:23:25 GMT 2024
    - 6K bytes
    - Viewed (0)
  6. docs/en/docs/how-to/async-sql-encode-databases.md

    {!../../../docs_src/async_sql_databases/tutorial001.py!}
    ```
    
    !!! tip
        Notice that all this code is pure SQLAlchemy Core.
    
        `databases` is not doing anything here yet.
    
    ## Import and set up `databases`
    
    * Import `databases`.
    * Create a `DATABASE_URL`.
    * Create a `database` object.
    
    ```Python hl_lines="3  9  12"
    {!../../../docs_src/async_sql_databases/tutorial001.py!}
    ```
    
    !!! tip
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_query_params_str_validations/test_tutorial010_an.py

                        "operationId": "read_items_items__get",
                        "parameters": [
                            {
                                "description": "Query string for the items to search in the database that have a good match",
                                "required": False,
                                "deprecated": True,
                                "schema": IsDict(
                                    {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  8. docs/em/docs/tutorial/sql-databases.md

    $ pip install sqlalchemy
    
    ---> 100%
    ```
    
    </div>
    
    ## ✍ 🇸🇲 🍕
    
    ➡️ 🔗 📁 `sql_app/database.py`.
    
    ### 🗄 🇸🇲 🍕
    
    ```Python hl_lines="1-3"
    {!../../../docs_src/sql_databases/sql_app/database.py!}
    ```
    
    ### ✍ 💽 📛 🇸🇲
    
    ```Python hl_lines="5-6"
    {!../../../docs_src/sql_databases/sql_app/database.py!}
    ```
    
    👉 🖼, 👥 "🔗" 🗄 💽 (📂 📁 ⏮️ 🗄 💽).
    
    📁 🔜 🔎 🎏 📁 📁 `sql_app.db`.
    
    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_src/query_params_str_validations/tutorial010.py

    @app.get("/items/")
    async def read_items(
        q: Union[str, None] = Query(
            default=None,
            alias="item-query",
            title="Query string",
            description="Query string for the items to search in the database that have a good match",
            min_length=3,
            max_length=50,
            pattern="^fixedquery$",
            deprecated=True,
        ),
    ):
        results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
        if q:
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 24 20:26:06 GMT 2023
    - 574 bytes
    - Viewed (0)
  10. docs/en/docs/tutorial/security/oauth2-jwt.md

        So, you would be able to, for example, share the same data from a Django application in a database with a FastAPI application. Or gradually migrate a Django application using the same database.
    
        And your users would be able to login from your Django app or from your **FastAPI** app, at the same time.
    
    ## Hash and verify the passwords
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 13K bytes
    - Viewed (0)
Back to top