Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 51 for and (0.19 sec)

  1. tests/test_param_in_path_and_dependency.py

    Sebastián Ramírez <******@****.***> 1688149516 +0200
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 3.1K bytes
    - Viewed (0)
  2. fastapi/security/api_key.py

        with the API key and integrates that into the OpenAPI documentation. It extracts
        the key value sent in the query parameter automatically and provides it as the
        dependency result. But it doesn't define how to send that API key to the client.
    
        ## Usage
    
        Create an instance object and use that object as the dependency in `Depends()`.
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 23 22:29:18 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  3. fastapi/dependencies/utils.py

                if (
                    isinstance(field_info, params.File)
                    and is_bytes_field(field)
                    and isinstance(value, UploadFile)
                ):
                    value = await value.read()
                elif (
                    is_bytes_sequence_field(field)
                    and isinstance(field_info, params.File)
                    and value_is_sequence(value)
                ):
                    # For types
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:52:56 GMT 2024
    - 29.5K bytes
    - Viewed (0)
  4. scripts/docs.py

        lang_path: Path
        for lang_path in get_lang_paths():
            if lang_path.is_dir() and lang_path.name.startswith(incomplete):
                yield lang_path.name
    
    
    @app.callback()
    def callback() -> None:
        if is_mkdocs_insiders():
            os.environ["INSIDERS_FILE"] = "../en/mkdocs.insiders.yml"
        # For MacOS with insiders and Cairo
        os.environ["DYLD_FALLBACK_LIBRARY_PATH"] = "/opt/homebrew/lib"
    
    
    @app.command()
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon Jan 22 19:26:14 GMT 2024
    - 10.9K bytes
    - Viewed (1)
  5. tests/test_ambiguous_params.py

                "Cannot specify `Depends` in `Annotated` and default value"
                " together for 'foo'"
            ),
        ):
    
            @app.get("/")
            async def get2(foo: Annotated[int, Depends(dep)] = Depends(dep)):
                pass  # pragma: nocover
    
        with pytest.raises(
            AssertionError,
            match=(
                "Cannot specify a FastAPI annotation in `Annotated` and `Depends` as a"
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Dec 12 00:22:47 GMT 2023
    - 2.1K bytes
    - Viewed (0)
  6. fastapi/openapi/utils.py

        *, route: routing.APIRoute, method: str
    ) -> str:  # pragma: nocover
        warnings.warn(
            "fastapi.openapi.utils.generate_operation_id() was deprecated, "
            "it is not used internally, and will be removed soon",
            DeprecationWarning,
            stacklevel=2,
        )
        if route.operation_id:
            return route.operation_id
        path: str = route.path_format
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 21.8K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_request_forms_and_files/test_tutorial001_an_py39.py

    from dirty_equals import IsDict
    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py39
    
    
    @pytest.fixture(name="app")
    def get_app():
        from docs_src.request_forms_and_files.tutorial001_an_py39 import app
    
        return app
    
    
    @pytest.fixture(name="client")
    def get_client(app: FastAPI):
        client = TestClient(app)
        return client
    
    
    @needs_py39
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 9.9K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_dataclasses/test_tutorial002.py

        response = client.get("/items/next")
        assert response.status_code == 200
        assert response.json() == {
            "name": "Island In The Moon",
            "price": 12.99,
            "description": "A place to be be playin' and havin' fun",
            "tags": ["breater"],
            "tax": None,
        }
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200
        assert response.json() == {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Aug 04 20:47:07 GMT 2023
    - 3.5K bytes
    - Viewed (0)
  9. tests/test_datastructures.py

        file = UploadFile(filename="file", file=stream, size=4)
        assert await file.read() == b"data"
        assert file.size == 4
        await file.write(b" and more data!")
        assert await file.read() == b""
        assert file.size == 19
        await file.seek(0)
        assert await file.read() == b"data and more data!"
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Oct 18 12:36:40 GMT 2023
    - 2K bytes
    - Viewed (0)
  10. fastapi/applications.py

                    from Starlette and supported for compatibility.
    
                    ---
    
                    A list of routes to serve incoming HTTP and WebSocket requests.
                    """
                ),
                deprecated(
                    """
                    You normally wouldn't use this parameter with FastAPI, it is inherited
                    from Starlette and supported for compatibility.
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 172.2K bytes
    - Viewed (0)
Back to top