Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 109 for Suplee (0.18 sec)

  1. tests/test_invalid_sequence_param.py

    import pytest
    from fastapi import FastAPI, Query
    from pydantic import BaseModel
    
    
    def test_invalid_sequence():
        with pytest.raises(AssertionError):
            app = FastAPI()
    
            class Item(BaseModel):
                title: str
    
            @app.get("/items/")
            def read_items(q: List[Item] = Query(default=None)):
                pass  # pragma: no cover
    
    
    def test_invalid_tuple():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 1.2K bytes
    - Viewed (0)
  2. tests/test_typing_python39.py

    @needs_py310
    def test_typing():
        types = {
            list[int]: [1, 2, 3],
            dict[str, list[int]]: {"a": [1, 2, 3], "b": [4, 5, 6]},
            set[int]: [1, 2, 3],  # `set` is converted to `list`
            tuple[int, ...]: [1, 2, 3],  # `tuple` is converted to `list`
        }
        for test_type, expect in types.items():
            app = FastAPI()
    
            @app.post("/", response_model=test_type)
            def post_endpoint(input: test_type):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 709 bytes
    - Viewed (0)
  3. fastapi/security/utils.py

    from typing import Optional, Tuple
    
    
    def get_authorization_scheme_param(
        authorization_header_value: Optional[str],
    ) -> Tuple[str, str]:
        if not authorization_header_value:
            return "", ""
        scheme, _, param = authorization_header_value.partition(" ")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Nov 13 14:26:09 GMT 2022
    - 293 bytes
    - Viewed (0)
  4. docs/uk/docs/python-types.md

    Зверніть увагу, що змінна `item` є одним із елементів у списку `items`.
    
    І все ж редактор знає, що це `str`, і надає підтримку для цього.
    
    #### Tuple and Set (кортеж та набір)
    
    Ви повинні зробити те ж саме, щоб оголосити `tuple` і `set`:
    
    === "Python 3.8 і вище"
    
        ```Python hl_lines="1  4"
        {!> ../../../docs_src/python_types/tutorial007.py!}
        ```
    
    === "Python 3.9 і вище"
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 19.7K bytes
    - Viewed (0)
  5. fastapi/dependencies/utils.py

        dependency_overrides_provider: Optional[Any] = None,
        dependency_cache: Optional[Dict[Tuple[Callable[..., Any], Tuple[str]], Any]] = None,
        async_exit_stack: AsyncExitStack,
    ) -> Tuple[
        Dict[str, Any],
        List[Any],
        Optional[StarletteBackgroundTasks],
        Response,
        Dict[Tuple[Callable[..., Any], Tuple[str]], Any],
    ]:
        values: Dict[str, Any] = {}
        errors: List[Any] = []
    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)
  6. docs_src/python_types/tutorial007.py

    from typing import Set, Tuple
    
    
    def process_items(items_t: Tuple[int, int, str], items_s: Set[bytes]):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Apr 11 17:20:32 GMT 2020
    - 131 bytes
    - Viewed (0)
  7. mockwebserver/src/main/kotlin/mockwebserver3/internal/duplex/RealStream.kt

     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package mockwebserver3.internal.duplex
    
    import mockwebserver3.Stream
    import okhttp3.internal.http2.ErrorCode
    import okhttp3.internal.http2.Http2Stream
    import okio.buffer
    
    /** Adapt OkHttp's internal [Http2Stream] type to the public [Stream] type. */
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Dec 31 18:24:52 GMT 2022
    - 1.1K bytes
    - Viewed (0)
  8. docs/ru/docs/python-types.md

    И все же редактор знает, что это `str`, и поддерживает это.
    
    #### `Tuple` и `Set`
    
    Вы бы сделали то же самое, чтобы объявить `tuple` и `set`:
    
    ```Python hl_lines="1  4"
    {!../../../docs_src/python_types/tutorial007.py!}
    ```
    
    Это означает:
    
    * Переменная `items_t` является `tuple` с 3 элементами: `int`, другим `int` и `str`.
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 14.6K bytes
    - Viewed (0)
  9. docs/en/docs/python-types.md

    Notice that the variable `item` is one of the elements in the list `items`.
    
    And still, the editor knows it is a `str`, and provides support for that.
    
    #### Tuple and Set
    
    You would do the same to declare `tuple`s and `set`s:
    
    === "Python 3.9+"
    
        ```Python hl_lines="1"
        {!> ../../../docs_src/python_types/tutorial007_py39.py!}
        ```
    
    === "Python 3.8+"
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 17K bytes
    - Viewed (0)
  10. tests/test_dependency_security_overrides.py

    from typing import List, Tuple
    
    from fastapi import Depends, FastAPI, Security
    from fastapi.security import SecurityScopes
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    
    def get_user(required_scopes: SecurityScopes):
        return "john", required_scopes.scopes
    
    
    def get_user_override(required_scopes: SecurityScopes):
        return "alice", required_scopes.scopes
    
    
    def get_data():
        return [1, 2, 3]
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Jun 14 15:54:46 GMT 2020
    - 1.4K bytes
    - Viewed (0)
Back to top