Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 21 for define (0.2 sec)

  1. tests/test_tutorial/test_separate_openapi_schemas/test_tutorial001_py310.py

        response = client.get("/items/")
        assert response.status_code == 200, response.text
        assert response.json() == [
            {
                "name": "Portal Gun",
                "description": "Device to travel through the multi-rick-verse",
            },
            {"name": "Plumbus", "description": None},
        ]
    
    
    @needs_py310
    @needs_pydanticv2
    def test_openapi_schema(client: TestClient) -> None:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Sep 28 04:14:40 GMT 2023
    - 4.9K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_separate_openapi_schemas/test_tutorial002.py

        response = client.get("/items/")
        assert response.status_code == 200, response.text
        assert response.json() == [
            {
                "name": "Portal Gun",
                "description": "Device to travel through the multi-rick-verse",
            },
            {"name": "Plumbus", "description": None},
        ]
    
    
    @needs_pydanticv2
    def test_openapi_schema(client: TestClient) -> None:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Aug 25 19:10:22 GMT 2023
    - 4.8K bytes
    - Viewed (0)
  3. configure.py

      Returns:
        string of native cuda compute capabilities, separated by comma.
      """
      device_query_bin = os.path.join(
          environ_cp.get('CUDA_TOOLKIT_PATH'), 'extras/demo_suite/deviceQuery')
      if os.path.isfile(device_query_bin) and os.access(device_query_bin, os.X_OK):
        try:
          output = run_shell(device_query_bin).split('\n')
          pattern = re.compile('[0-9]*\\.[0-9]*')
    Python
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 18:25:36 GMT 2024
    - 53.8K bytes
    - Viewed (0)
  4. fastapi/security/oauth2.py

                    )
                else:
                    return None  # pragma: nocover
            return param
    
    
    class SecurityScopes:
        """
        This is a special class that you can define in a parameter in a dependency to
        obtain the OAuth2 scopes required by all the dependencies in the same chain.
    
        This way, multiple dependencies can have different scopes, even when used in the
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 21.1K bytes
    - Viewed (1)
  5. tests/test_schema_extra_examples.py

                    ],
                ),
            ):
                return item
    
        # TODO: enable these tests once/if Form(embed=False) is supported
        # TODO: In that case, define if File() should support example/examples too
        # @app.post("/form_example")
        # def form_example(firstname: str = Form(example="John")):
        #     return firstname
    
        # @app.post("/form_examples")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 24 20:26:06 GMT 2023
    - 37.7K bytes
    - Viewed (0)
  6. docs/sts/web-identity.py

    authorize_url = "http://localhost:8080/auth/realms/minio/protocol/openid-connect/auth"
    token_url = "http://localhost:8080/auth/realms/minio/protocol/openid-connect/token"
    
    # callback url specified when the application was defined
    callback_uri = "http://localhost:8000/oauth2/callback"
    
    # keycloak id and secret
    client_id = 'account'
    client_secret = 'daaa3008-80f0-40f7-80d7-e15167531ff0'
    
    sts_client = boto3.client(
        'sts',
    Python
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Jul 28 01:37:51 GMT 2021
    - 2.9K bytes
    - Viewed (1)
  7. fastapi/_compat.py

            Required as Required,  # noqa: F401
        )
        from pydantic.fields import (  # type: ignore[no-redef,attr-defined]
            Undefined as Undefined,
        )
        from pydantic.fields import (  # type: ignore[no-redef, attr-defined]
            UndefinedType as UndefinedType,  # noqa: F401
        )
        from pydantic.schema import (
            field_schema,
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 22.6K bytes
    - Viewed (0)
  8. fastapi/exceptions.py

        """
    
        def __init__(
            self,
            code: Annotated[
                int,
                Doc(
                    """
                    A closing code from the
                    [valid codes defined in the specification](https://datatracker.ietf.org/doc/html/rfc6455#section-7.4.1).
                    """
                ),
            ],
            reason: Annotated[
                Union[str, None],
                Doc(
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 4.9K bytes
    - Viewed (0)
  9. fastapi/utils.py

            new_field.key_field = create_cloned_field(  # type: ignore[attr-defined]
                field.key_field,  # type: ignore[attr-defined]
                cloned_types=cloned_types,
            )
        new_field.validators = field.validators  # type: ignore[attr-defined]
        new_field.pre_validators = field.pre_validators  # type: ignore[attr-defined]
        new_field.post_validators = field.post_validators  # type: ignore[attr-defined]
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  10. tests/test_compat.py

    
    @needs_pydanticv1
    def test_union_scalar_list():
        # For coverage
        # TODO: there might not be a current valid code path that uses this, it would
        # potentially enable query parameters defined as both a scalar and a list
        # but that would require more refactors, also not sure it's really useful
        from fastapi._compat import is_pv1_scalar_field
    
        field_info = FieldInfo()
        field = ModelField(
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Sep 28 04:14:40 GMT 2023
    - 2.8K bytes
    - Viewed (0)
Back to top