Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for yielded (0.04 sec)

  1. docs/en/docs/release-notes.md

    Using resources from dependencies with `yield` in background tasks is no longer supported.
    
    This change is what supports the new features, read below. 🤓
    
    ### Dependencies with `yield`, `HTTPException` and Background Tasks
    
    Dependencies with `yield` now can raise `HTTPException` and other exceptions after `yield`. 🎉
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 19:06:15 UTC 2025
    - 586.7K bytes
    - Viewed (0)
  2. scripts/translate.py

            Path("docs/en/docs/advanced"),
            Path("docs/en/docs/about"),
            Path("docs/en/docs/how-to"),
        ]
        first_parent = Path("docs/en/docs")
        yield from first_parent.glob("*.md")
        for dir_path in first_dirs:
            yield from dir_path.rglob("*.md")
        first_dirs_str = tuple(str(d) for d in first_dirs)
        for path in Path("docs/en/docs").rglob("*.md"):
            if str(path).startswith(first_dirs_str):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 19:05:53 UTC 2025
    - 34.1K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_sql_databases/test_tutorial001.py

        mod.sqlite_url = "sqlite://"
        mod.engine = create_engine(
            mod.sqlite_url, connect_args={"check_same_thread": False}, poolclass=StaticPool
        )
    
        with TestClient(mod.app) as c:
            yield c
        # Clean up connection explicitly to avoid resource warning
        mod.engine.dispose()
    
    
    def test_crud_app(client: TestClient):
        # TODO: this warns that SQLModel.from_orm is deprecated in Pydantic v1, refactor
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 14K bytes
    - Viewed (0)
  4. fastapi/param_functions.py

            Union[Literal["function", "request"], None],
            Doc(
                """
                Mainly for dependencies with `yield`, define when the dependency function
                should start (the code before `yield`) and when it should end (the code
                after `yield`).
    
                * `"function"`: start the dependency before the *path operation function*
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 63K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_sql_databases/test_tutorial002.py

        mod.sqlite_url = "sqlite://"
        mod.engine = create_engine(
            mod.sqlite_url, connect_args={"check_same_thread": False}, poolclass=StaticPool
        )
    
        with TestClient(mod.app) as c:
            yield c
        # Clean up connection explicitly to avoid resource warning
        mod.engine.dispose()
    
    
    def test_crud_app(client: TestClient):
        # TODO: this warns that SQLModel.from_orm is deprecated in Pydantic v1, refactor
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 17.9K bytes
    - Viewed (0)
  6. fastapi/openapi/models.py

        from pydantic import EmailStr
    except ImportError:  # pragma: no cover
    
        class EmailStr(str):  # type: ignore
            @classmethod
            def __get_validators__(cls) -> Iterable[Callable[..., Any]]:
                yield cls.validate
    
            @classmethod
            def validate(cls, v: Any) -> str:
                logger.warning(
                    "email-validator not installed, email fields will be treated as str.\n"
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 15.1K bytes
    - Viewed (0)
  7. fastapi/routing.py

                        "application code is raising an exception and a dependency with yield "
                        "has a block with a bare except, or a block with except Exception, "
                        "and is not raising the exception again. Read more about it in the "
                        "docs: https://fastapi.tiangolo.com/tutorial/dependencies/dependencies-with-yield/#dependencies-with-yield-and-except"
                    )
    
            # Same as in Starlette
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 174.6K bytes
    - Viewed (0)
Back to top