Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for compress (0.29 sec)

  1. tests/test_tutorial/test_custom_request_and_route/test_tutorial001.py

        return {"request_class": type(request).__name__}
    
    
    client = TestClient(app)
    
    
    @pytest.mark.parametrize("compress", [True, False])
    def test_gzip_request(compress):
        n = 1000
        headers = {}
        body = [1] * n
        data = json.dumps(body).encode()
        if compress:
            data = gzip.compress(data)
            headers["Content-Encoding"] = "gzip"
        headers["Content-Type"] = "application/json"
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Nov 13 14:26:09 GMT 2022
    - 886 bytes
    - Viewed (0)
  2. docs/fr/docs/deployment/docker.md

    haute performance. Il peut faire office de "Proxy de terminaison TLS" (entre autres fonctionnalités).
    
    Il est intégré à Let's Encrypt. Ainsi, il peut gérer toutes les parties HTTPS, y compris l'acquisition et le renouvellement des certificats.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 12 00:06:16 GMT 2022
    - 7.5K bytes
    - Viewed (0)
  3. docs/fr/docs/advanced/additional-responses.md

    ## Combinaison d'informations
    
    Vous pouvez également combiner des informations de réponse provenant de plusieurs endroits, y compris les paramètres `response_model`, `status_code` et `responses`.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 9.6K bytes
    - Viewed (0)
  4. docs/fr/docs/history-design-future.md

    Elle a été préférée aux solutions précédentes parce qu'elle convient mieux à de nombreux cas d'utilisation.
    
    De nombreux développeurs et équipes dépendent déjà de **FastAPI** pour leurs projets (y compris moi et mon équipe).
    
    Mais il y a encore de nombreuses améliorations et fonctionnalités à venir.
    
    **FastAPI** a un grand avenir devant lui.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 4.9K bytes
    - Viewed (0)
  5. docs/en/docs/how-to/custom-request-and-route.md

    First, we create a `GzipRequest` class, which will overwrite the `Request.body()` method to decompress the body in the presence of an appropriate header.
    
    If there's no `gzip` in the header, it will not try to decompress the body.
    
    That way, the same route class can handle gzip compressed or uncompressed requests.
    
    ```Python hl_lines="8-15"
    {!../../../docs_src/custom_request_and_route/tutorial001.py!}
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Mar 31 23:52:53 GMT 2024
    - 4.4K bytes
    - Viewed (0)
  6. .github/workflows/test-redistribute.yml

            run: pip install build
          - name: Build source distribution
            env:
              TIANGOLO_BUILD_PACKAGE: ${{ matrix.package }}
            run: python -m build --sdist
          - name: Decompress source distribution
            run: |
              cd dist
              tar xvf fastapi*.tar.gz
          - name: Install test dependencies
            run: |
              cd dist/fastapi*/
    Others
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 30 06:38:13 GMT 2024
    - 1.4K bytes
    - Viewed (0)
  7. docs/fr/docs/tutorial/background-tasks.md

    Ceci est utile pour les opérations qui doivent avoir lieu après une requête, mais où le client n'a pas réellement besoin d'attendre que l'opération soit terminée pour recevoir une réponse.
    
    Cela comprend, par exemple :
    
    * Les notifications par email envoyées après l'exécution d'une action :
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 12 00:06:16 GMT 2022
    - 5.7K bytes
    - Viewed (0)
  8. docs/en/docs/advanced/security/http-basic-auth.md

    Then the Python code in your application would be equivalent to something like:
    
    ```Python
    if "johndoe" == "stanleyjobson" and "love123" == "swordfish":
        ...
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 14:33:05 GMT 2024
    - 5.9K bytes
    - Viewed (0)
  9. docs/fr/docs/tutorial/index.md

    <div class="termy">
    
    ```console
    $ pip install fastapi[all]
    
    ---> 100%
    ```
    
    </div>
    
    ... qui comprend également `uvicorn`, que vous pouvez utiliser comme serveur pour exécuter votre code.
    
    !!! note
        Vous pouvez également l'installer pièce par pièce.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jul 27 18:51:55 GMT 2023
    - 3.1K bytes
    - Viewed (0)
  10. docs_src/custom_request_and_route/tutorial001.py

        async def body(self) -> bytes:
            if not hasattr(self, "_body"):
                body = await super().body()
                if "gzip" in self.headers.getlist("Content-Encoding"):
                    body = gzip.decompress(body)
                self._body = body
            return self._body
    
    
    class GzipRoute(APIRoute):
        def get_route_handler(self) -> Callable:
            original_route_handler = super().get_route_handler()
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 973 bytes
    - Viewed (0)
Back to top