Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 49 for KSession (0.15 sec)

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

        └── 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`.
    
    But the rest of the session code is more or less the same, we just copy it.
    
    ```Python hl_lines="8-13"
    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)
  2. .github/workflows/latest-changes.yml

            with:
              # To allow latest-changes to commit to the main branch
              token: ${{ secrets.FASTAPI_LATEST_CHANGES }}
          # Allow debugging with tmate
          - name: Setup tmate session
            uses: mxschmitt/action-tmate@v3
            if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }}
            with:
              limit-access-to-actor: true
    Others
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Jan 09 14:57:33 GMT 2024
    - 1.4K bytes
    - Viewed (0)
  3. docs/zh/docs/tutorial/sql-databases.md

    ### 创建一个`SessionLocal`类
    
    每个实例`SessionLocal`都会是一个数据库会话。当然该类本身还不是数据库会话。
    
    但是一旦我们创建了一个`SessionLocal`类的实例,这个实例将是实际的数据库会话。
    
    我们命名它是`SessionLocal`为了将它与我们从 SQLAlchemy 导入的`Session`区别开来。
    
    稍后我们将使用`Session`(从 SQLAlchemy 导入的那个)。
    
    要创建`SessionLocal`类,请使用函数`sessionmaker`:
    
    ```Python hl_lines="11"
    {!../../../docs_src/sql_databases/sql_app/database.py!}
    ```
    
    ### 创建一个`Base`类
    
    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)
  4. docs/vi/docs/features.md

    * API keys in:
        * Headers.
        * Các tham số trong query string.
        * Cookies, etc.
    
    Cộng với tất cả các tính năng bảo mật từ Starlette (bao gồm **session cookies**).
    
    Tất cả được xây dựng dưới dạng các công cụ và thành phần có thể tái sử dụng, dễ dàng tích hợp với hệ thống, kho lưu trữ dữ liệu, cơ sở dữ liệu quan hệ và NoSQL của bạn,...
    
    ### Dependency Injection
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  5. docs/en/docs/tutorial/testing.md

    </div>
    
    It will detect the files and tests automatically, execute them, and report the results back to you.
    
    Run the tests with:
    
    <div class="termy">
    
    ```console
    $ pytest
    
    ================ test session starts ================
    platform linux -- Python 3.6.9, pytest-5.3.5, py-1.8.1, pluggy-0.13.1
    rootdir: /home/user/code/superawesome-cli/app
    plugins: forked-1.1.3, xdist-1.31.0, cov-2.8.1
    collected 6 items
    
    ---> 100%
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  6. docs/en/docs/alternatives.md

    * Seriously impressive performance.
    * WebSocket support.
    * In-process background tasks.
    * Startup and shutdown events.
    * Test client built on HTTPX.
    * CORS, GZip, Static Files, Streaming responses.
    * Session and Cookie support.
    * 100% test coverage.
    * 100% type annotated codebase.
    * Few hard dependencies.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 23.2K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_cookie_params/test_tutorial001_py310.py

            ("/items", {"ads_id": "ads_track"}, 200, {"ads_id": "ads_track"}),
            (
                "/items",
                {"ads_id": "ads_track", "session": "cookiesession"},
                200,
                {"ads_id": "ads_track"},
            ),
            ("/items", {"session": "cookiesession"}, 200, {"ads_id": None}),
        ],
    )
    def test(path, cookies, expected_status, expected_response):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 4.1K bytes
    - Viewed (0)
  8. docs/em/docs/tutorial/sql-databases.md

    ### ✍ `SessionLocal` 🎓
    
    🔠 👐 `SessionLocal` 🎓 🔜 💽 🎉. 🎓 ⚫️ 🚫 💽 🎉.
    
    ✋️ 🕐 👥 ✍ 👐 `SessionLocal` 🎓, 👉 👐 🔜 ☑ 💽 🎉.
    
    👥 📛 ⚫️ `SessionLocal` 🔬 ⚫️ ⚪️➡️ `Session` 👥 🏭 ⚪️➡️ 🇸🇲.
    
    👥 🔜 ⚙️ `Session` (1️⃣ 🗄 ⚪️➡️ 🇸🇲) ⏪.
    
    ✍ `SessionLocal` 🎓, ⚙️ 🔢 `sessionmaker`:
    
    ```Python hl_lines="11"
    {!../../../docs_src/sql_databases/sql_app/database.py!}
    ```
    
    ### ✍ `Base` 🎓
    
    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/em/docs/tutorial/dependencies/dependencies-with-yield.md

        opt raise
            dep -->> handler: Raise HTTPException
            handler -->> client: HTTP error response
            dep -->> dep: Raise other exception
        end
        dep ->> operation: Run dependency, e.g. DB session
        opt raise
            operation -->> dep: Raise HTTPException
            dep -->> handler: Auto forward exception
            handler -->> client: HTTP error response
            operation -->> dep: Raise other exception
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 8.6K bytes
    - Viewed (0)
  10. docs/de/docs/features.md

    * API Schlüssel in:
        * Header-Feldern.
        * Anfrageparametern.
        * Cookies, usw.
    
    Zusätzlich alle Sicherheitsfunktionen von Starlette (inklusive **Session Cookies**).
    
    Alles als wiederverwendbare Tools und Komponenten gebaut, die einfach in ihre Systeme, Datenspeicher, relationalen und nicht-relationalen Datenbanken, usw., integriert werden können.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 19:43:43 GMT 2024
    - 10.8K bytes
    - Viewed (0)
Back to top