Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for Garg (0.15 sec)

  1. tests/test_callable_endpoint.py

    from fastapi.testclient import TestClient
    
    
    def main(some_arg, q: Optional[str] = None):
        return {"some_arg": some_arg, "q": q}
    
    
    endpoint = partial(main, "foo")
    
    app = FastAPI()
    
    app.get("/")(endpoint)
    
    
    client = TestClient(app)
    
    
    def test_partial():
        response = client.get("/?q=bar")
        data = response.json()
    Python
    - Registered: Sun Apr 14 07:19:09 GMT 2024
    - Last Modified: Sun Jun 28 18:13:30 GMT 2020
    - 457 bytes
    - Viewed (0)
  2. fastapi/_compat.py

        if origin is Union or origin is UnionType:
            at_least_one_scalar_sequence = False
            for arg in get_args(annotation):
                if field_annotation_is_scalar_sequence(arg):
                    at_least_one_scalar_sequence = True
                    continue
                elif not field_annotation_is_scalar(arg):
                    return False
            return at_least_one_scalar_sequence
    Python
    - Registered: Sun Apr 14 07:19:09 GMT 2024
    - Last Modified: Tue Dec 12 00:22:47 GMT 2023
    - 22.5K bytes
    - Viewed (0)
  3. fastapi/utils.py

                    "required": required,
                    "model_config": model_config,
                    "alias": alias,
                }
            )
        try:
            return ModelField(**kwargs)  # type: ignore[arg-type]
        except (RuntimeError, PydanticSchemaGenerationError):
            raise fastapi.exceptions.FastAPIError(
                "Invalid args for response field! Hint: "
    Python
    - Registered: Sun Apr 14 07:19:09 GMT 2024
    - Last Modified: Mon Jan 15 10:32:16 GMT 2024
    - 8K bytes
    - Viewed (0)
  4. fastapi/security/api_key.py

                    parameter or in an HTTP Bearer token).
                    """
                ),
            ] = True,
        ):
            self.model: APIKey = APIKey(
                **{"in": APIKeyIn.query},  # type: ignore[arg-type]
                name=name,
                description=description,
            )
            self.scheme_name = scheme_name or self.__class__.__name__
            self.auto_error = auto_error
    
    Python
    - Registered: Sun Apr 14 07:19:09 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  5. fastapi/dependencies/utils.py

            type_annotation = annotated_args[0]
            fastapi_annotations = [
                arg
                for arg in annotated_args[1:]
                if isinstance(arg, (FieldInfo, params.Depends))
            ]
            fastapi_specific_annotations = [
                arg
                for arg in fastapi_annotations
                if isinstance(arg, (params.Param, params.Body, params.Depends))
            ]
            if fastapi_specific_annotations:
    Python
    - Registered: Sun Apr 14 07:19:09 GMT 2024
    - Last Modified: Tue Apr 02 02:52:56 GMT 2024
    - 29.5K bytes
    - Viewed (0)
Back to top