Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for compress (0.23 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/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)
  3. 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)
  4. docs/fr/docs/index.md

    Maintenant, rendez-vous sur <a href="http://127.0.0.1:8000/docs" class="external-link" target="_blank">http://127.0.0.1:8000/docs</a>.
    
    * La documentation interactive de l'API sera automatiquement mise à jour, y compris le nouveau corps de la requête :
    
    ![Swagger UI](https://fastapi.tiangolo.com/img/index/index-03-swagger-02.png)
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Apr 29 05:18:04 GMT 2024
    - 22K 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. 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)
  7. docs/fr/docs/alternatives.md

    Avoir une interface de documentation automatique de l'API.
    
    ### <a href="https://flask.palletsprojects.com" class="external-link" target="_blank">Flask</a>
    
    Flask est un "micro-framework", il ne comprend pas d'intégrations de bases de données ni beaucoup de choses qui sont fournies par défaut dans Django.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 27.5K bytes
    - Viewed (0)
  8. .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)
  9. docs/it/docs/index.md

    È normalissimo **Python 3.6+**.
    
    Per esempio, per un `int`:
    
    ```Python
    item_id: int
    ```
    
    o per un modello `Item` più complesso:
    
    ```Python
    item: Item
    ```
    
    ...e con quella singola dichiarazione hai in cambio:
    
    * Supporto per gli editor di testo, incluso:
        * Autocompletamento.
        * Controllo sulle annotazioni di tipo.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 23:58:47 GMT 2024
    - 19.3K bytes
    - Viewed (0)
  10. 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)
Back to top