Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 125 for generator (0.19 sec)

  1. tests/test_dependency_contextmanager.py

        state["/async"] = "asyncgen started"
        yield state["/async"]
        state["/async"] = "asyncgen completed"
    
    
    def generator_state(state: Dict[str, str] = Depends(get_state)):
        state["/sync"] = "generator started"
        yield state["/sync"]
        state["/sync"] = "generator completed"
    
    
    async def asyncgen_state_try(state: Dict[str, str] = Depends(get_state)):
        state["/async_raise"] = "asyncgen raise started"
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  2. docs/en/docs/advanced/custom-response.md

    ```
    
    ### `StreamingResponse`
    
    Takes an async generator or a normal generator/iterator and streams the response body.
    
    ```Python hl_lines="2  14"
    {!../../../docs_src/custom_response/tutorial007.py!}
    ```
    
    #### Using `StreamingResponse` with file-like objects
    
    If you have a file-like object (e.g. the object returned by `open()`), you can create a generator function to iterate over that file-like object.
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.7K bytes
    - Viewed (0)
  3. docs/en/docs/advanced/generate-clients.md

    A common tool is <a href="https://openapi-generator.tech/" class="external-link" target="_blank">OpenAPI Generator</a>.
    
    If you are building a **frontend**, a very interesting alternative is <a href="https://github.com/hey-api/openapi-ts" class="external-link" target="_blank">openapi-ts</a>.
    
    ## Client and SDK Generators - Sponsor
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  4. docs/de/docs/advanced/generate-clients.md

    ## OpenAPI-Client-Generatoren
    
    Es gibt viele Tools zum Generieren von Clients aus **OpenAPI**.
    
    Ein gängiges Tool ist <a href="https://openapi-generator.tech/" class="external-link" target="_blank">OpenAPI Generator</a>.
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Wed Apr 03 03:42:11 GMT 2024
    - 12K bytes
    - Viewed (0)
  5. fastapi/_compat.py

            )
            inputs = [
                (field, override_mode or field.mode, field._type_adapter.core_schema)
                for field in fields
            ]
            field_mapping, definitions = schema_generator.generate_definitions(
                inputs=inputs
            )
            return field_mapping, definitions  # type: ignore[return-value]
    
        def is_scalar_field(field: ModelField) -> bool:
            from fastapi import params
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 22.6K bytes
    - Viewed (0)
  6. tests/test_dependency_class.py

    from typing import AsyncGenerator, Generator
    
    import pytest
    from fastapi import Depends, FastAPI
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    
    class CallableDependency:
        def __call__(self, value: str) -> str:
            return value
    
    
    class CallableGenDependency:
        def __call__(self, value: str) -> Generator[str, None, None]:
            yield value
    
    
    class AsyncCallableDependency:
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sun Aug 09 10:54:05 GMT 2020
    - 3.3K bytes
    - Viewed (0)
  7. docs/en/overrides/partials/copyright.html

        <div class="md-copyright__highlight">
            The FastAPI trademark is owned by <a href="https://tiangolo.com" target="_blank">@tiangolo</a> and is registered in the US and across other regions
        </div>
        {% if not config.extra.generator == false %}
        Made with
        <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
            Material for MkDocs
        </a>
        {% endif %}
    HTML
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sun Feb 04 20:56:59 GMT 2024
    - 450 bytes
    - Viewed (0)
  8. docs/tr/docs/project-generation.md

    İsterseniz Couchbase tabanlı generator'ı kullanmakta özgürsünüz, hala iyi çalışıyor olmalı ve onunla oluşturulmuş bir projeniz varsa bu da sorun değil (ve muhtemelen zaten ihtiyaçlarınıza göre güncellediniz).
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Mon Jan 22 19:55:41 GMT 2024
    - 6K bytes
    - Viewed (0)
  9. fastapi/param_functions.py

                It will affect the generated OpenAPI (e.g. visible at `/docs`).
                """
            ),
        ] = None,
        include_in_schema: Annotated[
            bool,
            Doc(
                """
                To include (or not) this parameter field in the generated OpenAPI.
                You probably don't need it, but it's available.
    
                This affects the generated OpenAPI (e.g. visible at `/docs`).
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 62.5K bytes
    - Viewed (0)
  10. docs/ja/docs/tutorial/dependencies/dependencies-with-yield.md

        ```
        pip install async-exit-stack async-generator
        ```
    
        これにより<a href="https://github.com/sorcio/async_exit_stack" class="external-link" target="_blank">async-exit-stack</a>と<a href="https://github.com/python-trio/async_generator" class="external-link" target="_blank">async-generator</a>がインストールされます。
    
    !!! note "技術詳細"
        以下と一緒に使用できる関数なら何でも有効です:
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 12.5K bytes
    - Viewed (0)
Back to top