Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1461 - 1470 of 1,977 for Fastapi (0.06 sec)

  1. tests/test_tutorial/test_query_params_str_validations/test_tutorial011_py39.py

    import pytest
    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py39
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.query_params_str_validations.tutorial011_py39 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py39
    def test_multi_query_values(client: TestClient):
        url = "/items/?q=foo&q=bar"
        response = client.get(url)
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 4.1K bytes
    - Viewed (0)
  2. docs/pt/docs/tutorial/bigger-applications.md

    ///
    
    ## O principal `FastAPI`
    
    Agora, vamos ver o módulo em `app/main.py`.
    
    Aqui é onde você importa e usa a classe `FastAPI`.
    
    Este será o arquivo principal em seu aplicativo que une tudo.
    
    E como a maior parte de sua lógica agora viverá em seu próprio módulo específico, o arquivo principal será bem simples.
    
    ### Importar `FastAPI`
    
    Você importa e cria uma classe `FastAPI` normalmente.
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 19.6K bytes
    - Viewed (0)
  3. docs/ja/docs/tutorial/request-forms.md

    フォームを使うためには、まず<a href="https://github.com/Kludex/python-multipart" class="external-link" target="_blank">`python-multipart`</a>をインストールします。
    
    たとえば、`pip install python-multipart`のように。
    
    ///
    
    ## `Form`のインポート
    
    `fastapi`から`Form`をインポートします:
    
    ```Python hl_lines="1"
    {!../../docs_src/request_forms/tutorial001.py!}
    ```
    
    ## `Form`のパラメータの定義
    
    `Body`や`Query`の場合と同じようにフォームパラメータを作成します:
    
    ```Python hl_lines="7"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  4. docs/es/docs/learn/index.md

    # Aprender
    
    Aquí están las secciones introductorias y los tutoriales para aprender **FastAPI**.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Jan 09 15:26:26 UTC 2024
    - 218 bytes
    - Viewed (0)
  5. tests/test_tutorial/test_body_multiple_params/test_tutorial001.py

    import pytest
    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.body_multiple_params.tutorial001 import app
    
        client = TestClient(app)
        return client
    
    
    def test_post_body_q_bar_content(client: TestClient):
        response = client.put("/items/5?q=bar", json={"name": "Foo", "price": 50.5})
        assert response.status_code == 200
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_body_multiple_params/test_tutorial001_an_py310.py

    import pytest
    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py310
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.body_multiple_params.tutorial001_an_py310 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py310
    def test_post_body_q_bar_content(client: TestClient):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_request_form_models/test_tutorial002_pv1_an_p39.py

    import pytest
    from fastapi.testclient import TestClient
    
    from tests.utils import needs_py39, needs_pydanticv1
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.request_form_models.tutorial002_pv1_an_py39 import app
    
        client = TestClient(app)
        return client
    
    
    # TODO: remove when deprecating Pydantic v1
    @needs_pydanticv1
    @needs_py39
    def test_post_body_form(client: TestClient):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Sep 06 17:31:18 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_request_files/test_tutorial001.py

    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from docs_src.request_files.tutorial001 import app
    
    client = TestClient(app)
    
    
    file_required = {
        "detail": [
            {
                "loc": ["body", "file"],
                "msg": "field required",
                "type": "value_error.missing",
            }
        ]
    }
    
    
    def test_post_form_no_body():
        response = client.post("/files/")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_request_files/test_tutorial001_an.py

    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from docs_src.request_files.tutorial001_an import app
    
    client = TestClient(app)
    
    
    def test_post_form_no_body():
        response = client.post("/files/")
        assert response.status_code == 422, response.text
        assert response.json() == IsDict(
            {
                "detail": [
                    {
                        "type": "missing",
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  10. docs/pt/docs/tutorial/security/simple-oauth2.md

    * Um `client_secret` opcional (não precisamos dele em nosso exemplo).
    
    /// info | Informação
    
    O `OAuth2PasswordRequestForm` não é uma classe especial para **FastAPI** como é `OAuth2PasswordBearer`.
    
    `OAuth2PasswordBearer` faz com que **FastAPI** saiba que é um esquema de segurança. Portanto, é adicionado dessa forma ao OpenAPI.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Oct 31 12:17:45 UTC 2024
    - 13.3K bytes
    - Viewed (0)
Back to top