Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 20 for Compact (0.18 sec)

  1. tests/test_compat.py

    from typing import List, Union
    
    from fastapi import FastAPI, UploadFile
    from fastapi._compat import (
        ModelField,
        Undefined,
        _get_model_config,
        is_bytes_sequence_annotation,
        is_uploadfile_sequence_annotation,
    )
    from fastapi.testclient import TestClient
    from pydantic import BaseConfig, BaseModel, ConfigDict
    from pydantic.fields import FieldInfo
    
    from .utils import needs_pydanticv1, needs_pydanticv2
    
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Sep 28 04:14:40 GMT 2023
    - 2.8K bytes
    - Viewed (0)
  2. tests/test_additional_properties_bool.py

    from typing import Union
    
    from dirty_equals import IsDict
    from fastapi import FastAPI
    from fastapi._compat import PYDANTIC_V2
    from fastapi.testclient import TestClient
    from pydantic import BaseModel, ConfigDict
    
    
    class FooBaseModel(BaseModel):
        if PYDANTIC_V2:
            model_config = ConfigDict(extra="forbid")
        else:
    
            class Config:
                extra = "forbid"
    
    
    class Foo(FooBaseModel):
        pass
    
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 4.2K bytes
    - Viewed (0)
  3. fastapi/utils.py

        TYPE_CHECKING,
        Any,
        Dict,
        MutableMapping,
        Optional,
        Set,
        Type,
        Union,
        cast,
    )
    from weakref import WeakKeyDictionary
    
    import fastapi
    from fastapi._compat import (
        PYDANTIC_V2,
        BaseConfig,
        ModelField,
        PydanticSchemaGenerationError,
        Undefined,
        UndefinedType,
        Validator,
        lenient_issubclass,
    )
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  4. tests/test_response_by_alias.py

    from typing import List
    
    from fastapi import FastAPI
    from fastapi._compat import PYDANTIC_V2
    from fastapi.testclient import TestClient
    from pydantic import BaseModel, ConfigDict, Field
    
    app = FastAPI()
    
    
    class Model(BaseModel):
        name: str = Field(alias="alias")
    
    
    class ModelNoAlias(BaseModel):
        name: str
    
        if PYDANTIC_V2:
            model_config = ConfigDict(
                json_schema_extra={
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 11.1K bytes
    - Viewed (0)
  5. fastapi/params.py

    from typing import Any, Callable, Dict, List, Optional, Sequence, Union
    
    from fastapi.openapi.models import Example
    from pydantic.fields import FieldInfo
    from typing_extensions import Annotated, deprecated
    
    from ._compat import PYDANTIC_V2, PYDANTIC_VERSION, Undefined
    
    _Unset: Any = Undefined
    
    
    class ParamTypes(Enum):
        query = "query"
        header = "header"
        path = "path"
        cookie = "cookie"
    
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 27.5K bytes
    - Viewed (1)
  6. fastapi/param_functions.py

    from typing import Any, Callable, Dict, List, Optional, Sequence, Union
    
    from fastapi import params
    from fastapi._compat import Undefined
    from fastapi.openapi.models import Example
    from typing_extensions import Annotated, Doc, deprecated
    
    _Unset: Any = Undefined
    
    
    def Path(  # noqa: N802
        default: Annotated[
            Any,
            Doc(
                """
                Default value if the parameter field is not set.
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 62.5K bytes
    - Viewed (0)
  7. tensorflow/api_template.__init__.py

    else:
      _module_dir = _module_util.get_parent_dir_for_name("keras.api._v2.keras")
    _current_module.__path__ = [_module_dir] + _current_module.__path__
    
    
    # Enable TF2 behaviors
    from tensorflow.python.compat import v2_compat as _compat
    _compat.enable_v2_behavior()
    _major_api_version = 2
    
    
    # Load all plugin libraries from site-packages/tensorflow-plugins if we are
    # running under pip.
    Python
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Tue Mar 05 06:27:59 GMT 2024
    - 6.7K bytes
    - Viewed (3)
  8. fastapi/dependencies/models.py

    from typing import Any, Callable, List, Optional, Sequence
    
    from fastapi._compat import ModelField
    from fastapi.security.base import SecurityBase
    
    
    class SecurityRequirement:
        def __init__(
            self, security_scheme: SecurityBase, scopes: Optional[Sequence[str]] = None
        ):
            self.security_scheme = security_scheme
            self.scopes = scopes
    
    
    class Dependant:
        def __init__(
            self,
            *,
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 2.4K bytes
    - Viewed (0)
  9. tests/test_schema_extra_examples.py

    from typing import Union
    
    import pytest
    from dirty_equals import IsDict
    from fastapi import Body, Cookie, FastAPI, Header, Path, Query
    from fastapi._compat import PYDANTIC_V2
    from fastapi.testclient import TestClient
    from pydantic import BaseModel, ConfigDict
    
    
    def create_app():
        app = FastAPI()
    
        class Item(BaseModel):
            data: str
    
            if PYDANTIC_V2:
                model_config = ConfigDict(
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 24 20:26:06 GMT 2023
    - 37.7K bytes
    - Viewed (0)
  10. fastapi/_compat.py

                json_schema["title"] = (
                    field.field_info.title or field.alias.title().replace("_", " ")
                )
            return json_schema
    
        def get_compat_model_name_map(fields: List[ModelField]) -> ModelNameMap:
            return {}
    
        def get_definitions(
            *,
            fields: List[ModelField],
            schema_generator: GenerateJsonSchema,
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 22.6K bytes
    - Viewed (0)
Back to top