Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 418 for form (0.14 sec)

  1. docs/pt/docs/tutorial/request-forms.md

    ## Sobre "Campos de formulário"
    
    A forma como os formulários HTML (`<form></form>`) enviam os dados para o servidor normalmente usa uma codificação "especial" para esses dados, é diferente do JSON.
    
    O **FastAPI** fará a leitura desses dados no lugar certo em vez de JSON.
    
    !!! note "Detalhes técnicos"
        Os dados dos formulários são normalmente codificados usando o "tipo de mídia" `application/x-www-form-urlencoded`.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 2.7K bytes
    - Viewed (0)
  2. docs/ru/docs/tutorial/request-forms.md

    Когда вам нужно получить поля формы вместо JSON, вы можете использовать `Form`.
    
    !!! info "Дополнительная информация"
        Чтобы использовать формы, сначала установите <a href="https://github.com/Kludex/python-multipart" class="external-link" target="_blank">`python-multipart`</a>.
    
        Например, выполните команду `pip install python-multipart`.
    
    ## Импорт `Form`
    
    Импортируйте `Form` из `fastapi`:
    
    === "Python 3.9+"
    
        ```Python hl_lines="3"
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 5K bytes
    - Viewed (0)
  3. docs/pt/docs/tutorial/request-forms-and-files.md

        Você pode declarar vários parâmetros `File` e `Form` em uma *operação de caminho*, mas não é possível declarar campos `Body` para receber como JSON, pois a requisição terá o corpo codificado usando `multipart/form-data` ao invés de `application/json`.
    
        Isso não é uma limitação do **FastAPI** , é parte do protocolo HTTP.
    
    ## Recapitulando
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 1.4K bytes
    - Viewed (0)
  4. docs/em/docs/tutorial/request-forms-and-files.md

    👆 💪 🔬 📁 &amp; 📨 🏑 🎏 🕰 ⚙️ `File` &amp; `Form`.
    
    !!! info
        📨 📂 📁 &amp; /⚖️ 📨 📊, 🥇 ❎ <a href="https://github.com/Kludex/python-multipart" class="external-link" target="_blank">`python-multipart`</a>.
    
        🤶 Ⓜ. `pip install python-multipart`.
    
    ## 🗄 `File` &amp; `Form`
    
    ```Python hl_lines="1"
    {!../../../docs_src/request_forms_and_files/tutorial001.py!}
    ```
    
    ## 🔬 `File` &amp; `Form` 🔢
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 1.1K bytes
    - Viewed (0)
  5. docs/ja/docs/tutorial/request-forms-and-files.md

    `File`と`Form`を同時に使うことでファイルとフォームフィールドを定義することができます。
    
    !!! info "情報"
        アップロードされたファイルやフォームデータを受信するには、まず<a href="https://andrew-d.github.io/python-multipart/" class="external-link" target="_blank">`python-multipart`</a>をインストールします。
    
        例えば、`pip install python-multipart`のように。
    
    ## `File`と`Form`のインポート
    
    ```Python hl_lines="1"
    {!../../../docs_src/request_forms_and_files/tutorial001.py!}
    ```
    
    ## `File`と`Form`のパラメータの定義
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 04:31:22 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  6. tests/test_multipart_installation.py

    import pytest
    from fastapi import FastAPI, File, Form, UploadFile
    from fastapi.dependencies.utils import (
        multipart_incorrect_install_error,
        multipart_not_installed_error,
    )
    
    
    def test_incorrect_multipart_installed_form(monkeypatch):
        monkeypatch.delattr("multipart.multipart.parse_options_header", raising=False)
        with pytest.raises(RuntimeError, match=multipart_incorrect_install_error):
            app = FastAPI()
    
            @app.post("/")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 3.7K bytes
    - Viewed (0)
  7. docs_src/request_files/tutorial002_an_py39.py

    @app.get("/")
    async def main():
        content = """
    <body>
    <form action="/files/" enctype="multipart/form-data" method="post">
    <input name="files" type="file" multiple>
    <input type="submit">
    </form>
    <form action="/uploadfiles/" enctype="multipart/form-data" method="post">
    <input name="files" type="file" multiple>
    <input type="submit">
    </form>
    </body>
        """
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 826 bytes
    - Viewed (0)
  8. docs_src/request_files/tutorial002.py

    async def main():
        content = """
    <body>
    <form action="/files/" enctype="multipart/form-data" method="post">
    <input name="files" type="file" multiple>
    <input type="submit">
    </form>
    <form action="/uploadfiles/" enctype="multipart/form-data" method="post">
    <input name="files" type="file" multiple>
    <input type="submit">
    </form>
    </body>
        """
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 811 bytes
    - Viewed (0)
  9. docs_src/request_files/tutorial003_an.py

        ],
    ):
        return {"filenames": [file.filename for file in files]}
    
    
    @app.get("/")
    async def main():
        content = """
    <body>
    <form action="/files/" enctype="multipart/form-data" method="post">
    <input name="files" type="file" multiple>
    <input type="submit">
    </form>
    <form action="/uploadfiles/" enctype="multipart/form-data" method="post">
    <input name="files" type="file" multiple>
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 987 bytes
    - Viewed (0)
  10. docs/de/docs/tutorial/request-files.md

    ## Was sind „Formulardaten“
    
    HTML-Formulare (`<form></form>`) senden die Daten in einer „speziellen“ Kodierung zum Server, welche sich von JSON unterscheidet.
    
    **FastAPI** stellt sicher, dass diese Daten korrekt ausgelesen werden, statt JSON zu erwarten.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 17:58:08 GMT 2024
    - 11.5K bytes
    - Viewed (0)
Back to top