Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for opzione (0.18 sec)

  1. docs_src/custom_response/tutorial009c.py

    
    class CustomORJSONResponse(Response):
        media_type = "application/json"
    
        def render(self, content: Any) -> bytes:
            assert orjson is not None, "orjson must be installed"
            return orjson.dumps(content, option=orjson.OPT_INDENT_2)
    
    
    @app.get("/", response_class=CustomORJSONResponse)
    async def main():
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Sep 01 09:32:30 GMT 2022
    - 451 bytes
    - Viewed (0)
  2. tests/test_tutorial/test_cors/test_tutorial001.py

        headers = {
            "Origin": "https://localhost.tiangolo.com",
            "Access-Control-Request-Method": "GET",
            "Access-Control-Request-Headers": "X-Example",
        }
        response = client.options("/", headers=headers)
        assert response.status_code == 200, response.text
        assert response.text == "OK"
        assert (
            response.headers["access-control-allow-origin"]
            == "https://localhost.tiangolo.com"
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Jul 09 18:06:12 GMT 2020
    - 1.2K bytes
    - Viewed (0)
  3. tests/test_extra_routes.py

                                    }
                                },
                            },
                        },
                        "summary": "Options Item",
                        "operationId": "options_item_items__item_id__options",
                        "parameters": [
                            {
                                "required": True,
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 13.7K bytes
    - Viewed (0)
  4. configure.py

        if varname in environ_cp:
          write_to_bazelrc('build --define=%s=%s' % (varname, environ_cp[varname]))
    
    
    def set_windows_build_flags(environ_cp):
      """Set Windows specific build options."""
    
      # First available in VS 16.4. Speeds up Windows compile times by a lot. See
      # https://groups.google.com/a/tensorflow.org/d/topic/build/SsW98Eo7l3o/discussion
      # pylint: disable=line-too-long
    Python
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 18:25:36 GMT 2024
    - 53.8K bytes
    - Viewed (0)
  5. fastapi/responses.py

        """
    
        def render(self, content: Any) -> bytes:
            assert orjson is not None, "orjson must be installed to use ORJSONResponse"
            return orjson.dumps(
                content, option=orjson.OPT_NON_STR_KEYS | orjson.OPT_SERIALIZE_NUMPY
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Wed Oct 18 12:36:40 GMT 2023
    - 1.7K bytes
    - Viewed (0)
  6. fastapi/routing.py

            """
            Add a *path operation* using an HTTP OPTIONS operation.
    
            ## Example
    
            ```python
            from fastapi import APIRouter, FastAPI
    
            app = FastAPI()
            router = APIRouter()
    
            @router.options("/items/")
            def get_item_options():
                return {"additions": ["Aji", "Guacamole"]}
    
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 170.1K bytes
    - Viewed (0)
  7. fastapi/openapi/models.py

        description: Optional[str] = None
        get: Optional[Operation] = None
        put: Optional[Operation] = None
        post: Optional[Operation] = None
        delete: Optional[Operation] = None
        options: Optional[Operation] = None
        head: Optional[Operation] = None
        patch: Optional[Operation] = None
        trace: Optional[Operation] = None
        servers: Optional[List[Server]] = None
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 22:49:33 GMT 2024
    - 15K bytes
    - Viewed (0)
  8. fastapi/applications.py

            Add a *path operation* using an HTTP OPTIONS operation.
    
            ## Example
    
            ```python
            from fastapi import FastAPI
    
            app = FastAPI()
    
            @app.options("/items/")
            def get_item_options():
                return {"additions": ["Aji", "Guacamole"]}
            ```
            """
            return self.router.options(
                path,
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 172.2K bytes
    - Viewed (0)
  9. tests/test_operations_signatures.py

    import inspect
    
    from fastapi import APIRouter, FastAPI
    
    method_names = ["get", "put", "post", "delete", "options", "head", "patch", "trace"]
    
    
    def test_signatures_consistency():
        base_sig = inspect.signature(APIRouter.get)
        for method_name in method_names:
            router_method = getattr(APIRouter, method_name)
            app_method = getattr(FastAPI, method_name)
            router_sig = inspect.signature(router_method)
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Mon May 27 12:08:13 GMT 2019
    - 934 bytes
    - Viewed (0)
  10. tests/test_multipart_installation.py

        with pytest.raises(RuntimeError, match=multipart_incorrect_install_error):
            app = FastAPI()
    
            @app.post("/")
            async def root(f: bytes = File()):
                return f  # pragma: nocover
    
    
    def test_incorrect_multipart_installed_multi_form(monkeypatch):
        monkeypatch.delattr("multipart.multipart.parse_options_header", raising=False)
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 3.7K bytes
    - Viewed (0)
Back to top