Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 96 for lien (0.15 sec)

  1. docs/fr/docs/contributing.md

    Disons que vous voulez ajouter des traductions pour le Créole, et que ce n'est pas encore dans les documents.
    
    En vérifiant le lien ci-dessus, le code pour "Créole" est `ht`.
    
    L'étape suivante consiste à exécuter le script pour générer un nouveau répertoire de traduction :
    
    <div class="termy">
    
    ```console
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jul 27 18:51:07 GMT 2023
    - 16.3K bytes
    - Viewed (0)
  2. docs/fr/docs/tutorial/query-params-str-validations.md

    {!../../../docs_src/query_params_str_validations/tutorial001.py!}
    ```
    
    Le paramètre de requête `q` a pour type `Union[str, None]` (ou `str | None` en Python 3.10), signifiant qu'il est de type `str` mais pourrait aussi être égal à `None`, et bien sûr, la valeur par défaut est `None`, donc **FastAPI** saura qu'il n'est pas requis.
    
    !!! note
        **FastAPI** saura que la valeur de `q` n'est pas requise grâce à la valeur par défaut `= None`.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jul 27 18:53:21 GMT 2023
    - 9.8K bytes
    - Viewed (0)
  3. docs/en/docs/advanced/testing-database.md

    ```Python
    Base.metadata.create_all(bind=engine)
    ```
    
    That is normally called in `main.py`, but the line in `main.py` uses the database file `sql_app.db`, and we need to make sure we create `test.db` for the tests.
    
    So we add that line here, with the new file.
    
    ```Python hl_lines="16"
    {!../../../docs_src/sql_databases/sql_app/tests/test_sql_app.py!}
    ```
    
    ## Dependency override
    
    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)
  4. docs/fr/docs/tutorial/path-params.md

    !!! info
        À nouveau, en utilisant uniquement les déclarations de type Python, **FastAPI** vous fournit automatiquement une documentation interactive (via Swagger UI).
    
        On voit bien dans la documentation que `item_id` est déclaré comme entier.
    
    ## Les avantages d'avoir une documentation basée sur une norme, et la documentation alternative.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 10K bytes
    - Viewed (0)
  5. docs/en/docs/advanced/behind-a-proxy.md

    Alternatively, if you don't have a way to provide a command line option like `--root-path` or equivalent, you can set the `root_path` parameter when creating your FastAPI app:
    
    ```Python hl_lines="3"
    {!../../../docs_src/behind_a_proxy/tutorial002.py!}
    ```
    
    Passing the `root_path` to `FastAPI` would be the equivalent of passing the `--root-path` command line option to Uvicorn or Hypercorn.
    
    ### About `root_path`
    
    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)
  6. docs/fr/docs/deployment/index.md

    cloud** qui fait une partie du travail pour vous, ou encore d'autres options possibles.
    
    Je vais vous montrer certains des principaux concepts que vous devriez probablement avoir à l'esprit lors du déploiement
    d'une application **FastAPI** (bien que la plupart de ces concepts s'appliquent à tout autre type d'application web).
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Jun 24 14:47:15 GMT 2023
    - 1.5K bytes
    - Viewed (0)
  7. docs_src/request_forms_and_files/tutorial001_an_py39.py

    app = FastAPI()
    
    
    @app.post("/files/")
    async def create_file(
        file: Annotated[bytes, File()],
        fileb: Annotated[UploadFile, File()],
        token: Annotated[str, Form()],
    ):
        return {
            "file_size": len(file),
            "token": token,
            "fileb_content_type": fileb.content_type,
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 386 bytes
    - Viewed (0)
  8. docs_src/request_files/tutorial001_02_py310.py

    app = FastAPI()
    
    
    @app.post("/files/")
    async def create_file(file: bytes | None = File(default=None)):
        if not file:
            return {"message": "No file sent"}
        else:
            return {"file_size": len(file)}
    
    
    @app.post("/uploadfile/")
    async def create_upload_file(file: UploadFile | None = None):
        if not file:
            return {"message": "No upload file sent"}
        else:
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 470 bytes
    - Viewed (0)
  9. docs/en/docs/deployment/manually.md

        ```
    
        </div>
    
    !!! note
        The command `uvicorn main:app` refers to:
    
        * `main`: the file `main.py` (the Python "module").
        * `app`: the object created inside of `main.py` with the line `app = FastAPI()`.
    
        It is equivalent to:
    
        ```Python
        from main import app
        ```
    
    !!! warning
        Uvicorn and others support a `--reload` option that is useful during development.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 9.2K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_additional_responses/test_tutorial002.py

        response = client.get("/items/foo?img=1")
        assert response.status_code == 200, response.text
        assert response.headers["Content-Type"] == "image/png"
        assert len(response.content)
        os.remove("./image.png")
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 4.6K bytes
    - Viewed (0)
Back to top