Search Options

Results per page
Sort
Preferred Languages
Advance

Results 261 - 270 of 329 for __exit__ (0.04 sec)

  1. pyproject.toml

        # Extra Pydantic data types
        "pydantic-extra-types >=2.0.0",
    ]
    
    [project.scripts]
    fastapi = "fastapi.cli:main"
    
    [tool.pdm]
    version = { source = "file", path = "fastapi/__init__.py" }
    distribution = true
    
    [tool.pdm.build]
    source-includes = [
        "tests/",
        "docs_src/",
        "requirements*.txt",
        "scripts/",
        # For a test
        "docs/en/docs/img/favicon.png",
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 9.3K bytes
    - Viewed (0)
  2. docs/ru/docs/advanced/async-tests.md

    ```
    .
    ├── app
    │   ├── __init__.py
    │   ├── main.py
    │   └── test_main.py
    ```
    
    Файл `main.py`:
    
    {* ../../docs_src/async_tests/app_a_py39/main.py *}
    
    Файл `test_main.py` содержит тесты для `main.py`, теперь он может выглядеть так:
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 6.3K bytes
    - Viewed (0)
  3. docs/es/docs/advanced/async-tests.md

    ```
    .
    ├── app
    │   ├── __init__.py
    │   ├── main.py
    │   └── test_main.py
    ```
    
    El archivo `main.py` tendría:
    
    {* ../../docs_src/async_tests/app_a_py39/main.py *}
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 4.2K bytes
    - Viewed (0)
  4. docs/de/docs/advanced/advanced-dependencies.md

    ## Die Instanz parametrisieren { #parameterize-the-instance }
    
    Und jetzt können wir `__init__` verwenden, um die Parameter der Instanz zu deklarieren, die wir zum „Parametrisieren“ der Abhängigkeit verwenden können:
    
    {* ../../docs_src/dependencies/tutorial011_an_py39.py hl[9] *}
    
    In diesem Fall wird **FastAPI** `__init__` nie berühren oder sich darum kümmern, wir werden es direkt in unserem Code verwenden.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Tue Dec 02 17:32:56 UTC 2025
    - 10.4K bytes
    - Viewed (0)
  5. docs/zh/docs/tutorial/dependencies/classes-as-dependencies.md

    或者
    
    ```Python
    something(some_argument, some_keyword_argument="foo")
    ```
    
    这就是 "可调用对象"。
    
    ## 类作为依赖项
    
    您可能会注意到,要创建一个 Python 类的实例,您可以使用相同的语法。
    
    举个例子:
    
    ```Python
    class Cat:
        def __init__(self, name: str):
            self.name = name
    
    
    fluffy = Cat(name="Mr Fluffy")
    ```
    
    在这个例子中, `fluffy` 是一个 `Cat` 类的实例。
    
    为了创建 `fluffy`,你调用了 `Cat` 。
    
    所以,Python 类也是 **可调用对象**。
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Nov 18 02:25:44 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  6. tests/test_dependency_after_yield_streaming.py

    from typing import Annotated, Any
    
    import pytest
    from fastapi import Depends, FastAPI
    from fastapi.responses import StreamingResponse
    from fastapi.testclient import TestClient
    
    
    class Session:
        def __init__(self) -> None:
            self.data = ["foo", "bar", "baz"]
            self.open = True
    
        def __iter__(self) -> Generator[str, None, None]:
            for item in self.data:
                if self.open:
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 3.2K bytes
    - Viewed (0)
  7. docs/ru/docs/deployment/manually.md

      <span style="background-color:#009485"><font color="#D3D7CF"> FastAPI </font></span>  Starting production server 🚀
    
                 Searching for package file structure from directories
                 with <font color="#3465A4">__init__.py</font> files
                 Importing from <font color="#75507B">/home/user/code/</font><font color="#AD7FA8">awesomeapp</font>
    
       <span style="background-color:#007166"><font color="#D3D7CF"> module </font></span>  🐍 main.py
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Oct 11 17:48:49 UTC 2025
    - 9.6K bytes
    - Viewed (0)
  8. scripts/docs.py

    code_block3_pattern = re.compile(r"^\s*```")
    code_block4_pattern = re.compile(r"^\s*````")
    
    
    class VisibleTextExtractor(HTMLParser):
        """Extract visible text from a string with HTML tags."""
    
        def __init__(self):
            super().__init__()
            self.text_parts = []
    
        def handle_data(self, data):
            self.text_parts.append(data)
    
        def extract_visible_text(self, html: str) -> str:
            self.reset()
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sun Dec 21 17:40:17 UTC 2025
    - 16.9K bytes
    - Viewed (0)
  9. docs/en/docs/advanced/async-tests.md

    ```
    .
    ├── app
    │   ├── __init__.py
    │   ├── main.py
    │   └── test_main.py
    ```
    
    The file `main.py` would have:
    
    {* ../../docs_src/async_tests/app_a_py39/main.py *}
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 4K bytes
    - Viewed (0)
  10. fastapi/datastructures.py

        """
        You shouldn't use this class directly.
    
        It's used internally to recognize when a default value has been overwritten, even
        if the overridden default value was truthy.
        """
    
        def __init__(self, value: Any):
            self.value = value
    
        def __bool__(self) -> bool:
            return bool(self.value)
    
        def __eq__(self, o: object) -> bool:
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 5.1K bytes
    - Viewed (0)
Back to top