Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 34 for collect (0.18 sec)

  1. fastapi/security/oauth2.py

    from typing_extensions import Annotated, Doc
    
    
    class OAuth2PasswordRequestForm:
        """
        This is a dependency class to collect the `username` and `password` as form data
        for an OAuth2 password flow.
    
        The OAuth2 specification dictates that for a password flow the data should be
        collected using form data (instead of JSON) and that it should have the specific
        fields `username` and `password`.
    
    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)
  2. tests/test_response_by_alias.py

                        "proper OpenAPI use another model with the correct field names"
                    )
                }
            )
        else:
    
            class Config:
                schema_extra = {
                    "description": (
                        "response_model_by_alias=False is basically a quick hack, to support "
                        "proper OpenAPI use another model with the correct field names"
                    )
                }
    
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 11.1K bytes
    - Viewed (0)
  3. docs/en/docs/tutorial/response-model.md

    If you added the return type annotation, tools and editors would complain with a (correct) error telling you that your function is returning a type (e.g. a dict) that is different from what you declared (e.g. a Pydantic model).
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 17.9K bytes
    - Viewed (0)
  4. docs/en/docs/advanced/behind-a-proxy.md

    ```
    
    but this time at the URL with the prefix path provided by the proxy: `/api/v1`.
    
    Of course, the idea here is that everyone would access the app through the proxy, so the version with the path prefix `/api/v1` is the "correct" one.
    
    And the version without the path prefix (`http://127.0.0.1:8000/app`), provided by Uvicorn directly, would be exclusively for the _proxy_ (Traefik) to access it.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 11.6K bytes
    - Viewed (2)
  5. docs/zh/docs/tutorial/sql-databases.md

    ```
    
    #### 注意
    
    参数:
    
    ```Python
    connect_args={"check_same_thread": False}
    ```
    
    ...仅用于`SQLite`,在其他数据库不需要它。
    
    !!! info "技术细节"
    
        默认情况下,SQLite 只允许一个线程与其通信,假设有多个线程的话,也只将处理一个独立的请求。
    
        这是为了防止意外地为不同的事物(不同的请求)共享相同的连接。
    
        但是在 FastAPI 中,普遍使用def函数,多个线程可以为同一个请求与数据库交互,所以我们需要使用`connect_args={"check_same_thread": False}`来让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)
  6. tests/test_sub_callbacks.py

        * Send the invoice to the client.
        * Collect the money from the client.
        * Send a notification back to the API user (the external developer), as a callback.
            * At this point is that the API will somehow send a POST request to the
                external API with the notification of the invoice event
                (e.g. "payment successful").
        """
        # Send the invoice, collect the money, send the notification (the callback)
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 13.8K bytes
    - Viewed (0)
  7. tests/test_security_oauth2_optional.py

                        "type": "value_error.str.regex",
                        "ctx": {"pattern": "password"},
                    }
                ]
            }
        )
    
    
    def test_strict_login_correct_data():
        response = client.post(
            "/login",
            data={"username": "johndoe", "password": "secret", "grant_type": "password"},
        )
        assert response.status_code == 200
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 10.8K bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/bigger-applications.md

    And open the docs at <a href="http://127.0.0.1:8000/docs" class="external-link" target="_blank">http://127.0.0.1:8000/docs</a>.
    
    You will see the automatic API docs, including the paths from all the submodules, using the correct paths (and prefixes) and the correct tags:
    
    <img src="/img/tutorial/bigger-applications/image01.png">
    
    ## Include the same router multiple times with different `prefix`
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  9. docs/en/docs/deployment/https.md

    <img src="/img/deployment/https/https07.svg">
    
    The client (browser) will know that the response comes from the correct server because it is using the cryptography they agreed using the **HTTPS certificate** before.
    
    ### Multiple Applications
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 12K bytes
    - Viewed (0)
  10. docs/em/docs/tutorial/sql-databases.md

    ```
    
    #### 🗒
    
    ❌:
    
    ```Python
    connect_args={"check_same_thread": False}
    ```
    
    ...💪 🕴 `SQLite`. ⚫️ 🚫 💪 🎏 💽.
    
    !!! info "📡 ℹ"
    
        🔢 🗄 🔜 🕴 ✔ 1️⃣ 🧵 🔗 ⏮️ ⚫️, 🤔 👈 🔠 🧵 🔜 🍵 🔬 📨.
    
        👉 ❎ 😫 🤝 🎏 🔗 🎏 👜 (🎏 📨).
    
        ✋️ FastAPI, ⚙️ 😐 🔢 (`def`) 🌅 🌘 1️⃣ 🧵 💪 🔗 ⏮️ 💽 🎏 📨, 👥 💪 ⚒ 🗄 💭 👈 ⚫️ 🔜 ✔ 👈 ⏮️ `connect_args={"check_same_thread": False}`.
    
    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)
Back to top