Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for modelName (0.14 sec)

  1. docs_src/path_params/tutorial005_py39.py

    
    class ModelName(str, Enum):
        alexnet = "alexnet"
        resnet = "resnet"
        lenet = "lenet"
    
    
    app = FastAPI()
    
    
    @app.get("/models/{model_name}")
    async def get_model(model_name: ModelName):
        if model_name is ModelName.alexnet:
            return {"model_name": model_name, "message": "Deep Learning FTW!"}
    
        if model_name.value == "lenet":
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 546 bytes
    - Viewed (0)
  2. tests/test_tutorial/test_path_params/test_tutorial005.py

                                "items": {"$ref": "#/components/schemas/ValidationError"},
                            }
                        },
                    },
                    "ModelName": {
                        "title": "ModelName",
                        "enum": ["alexnet", "resnet", "lenet"],
                        "type": "string",
                    },
                    "ValidationError": {
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 4.1K bytes
    - Viewed (0)
  3. docs/de/docs/tutorial/path-params.md

    Sie können ihn mit einem Member Ihrer Enumeration `ModelName` vergleichen:
    
    {* ../../docs_src/path_params/tutorial005_py39.py hl[17] *}
    
    #### *Enumerations-Wert* erhalten { #get-the-enumeration-value }
    
    Den tatsächlichen Wert (in diesem Fall ein `str`) erhalten Sie via `model_name.value`, oder generell, `your_enum_member.value`:
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 10.5K bytes
    - Viewed (0)
  4. docs/en/docs/tutorial/path-params.md

    You can compare it with the *enumeration member* in your created enum `ModelName`:
    
    {* ../../docs_src/path_params/tutorial005_py39.py hl[17] *}
    
    #### Get the *enumeration value* { #get-the-enumeration-value }
    
    You can get the actual value (a `str` in this case) using `model_name.value`, or in general, `your_enum_member.value`:
    
    {* ../../docs_src/path_params/tutorial005_py39.py hl[20] *}
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 9.2K bytes
    - Viewed (0)
  5. docs/es/docs/tutorial/path-params.md

    Puedes compararlo con el *miembro* de enumeración en tu enum creada `ModelName`:
    
    {* ../../docs_src/path_params/tutorial005_py39.py hl[17] *}
    
    #### Obtener el valor de *enumeración* { #get-the-enumeration-value }
    
    Puedes obtener el valor actual (un `str` en este caso) usando `model_name.value`, o en general, `your_enum_member.value`:
    
    {* ../../docs_src/path_params/tutorial005_py39.py hl[20] *}
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 9.8K bytes
    - Viewed (0)
  6. docs/ru/docs/tutorial/path-params.md

    Вы можете сравнить это значение с *элементом перечисления* класса `ModelName`:
    
    {* ../../docs_src/path_params/tutorial005_py39.py hl[17] *}
    
    #### Получение *значения перечисления* { #get-the-enumeration-value }
    
    Можно получить фактическое значение (в данном случае - `str`) с помощью `model_name.value` или в общем случае `your_enum_member.value`:
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 14.2K bytes
    - Viewed (0)
  7. docs/pt/docs/tutorial/path-params.md

    Você pode compará-lo com o *membro de enumeração* no seu enum `ModelName` criado:
    
    {* ../../docs_src/path_params/tutorial005_py39.py hl[17] *}
    
    #### Obtenha o valor da enumeração { #get-the-enumeration-value }
    
    Você pode obter o valor real (um `str` neste caso) usando `model_name.value`, ou, em geral, `your_enum_member.value`:
    
    {* ../../docs_src/path_params/tutorial005_py39.py hl[20] *}
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 9.8K bytes
    - Viewed (0)
  8. impl/maven-core/src/main/java/org/apache/maven/internal/transformation/impl/DefaultConsumerPomBuilder.java

                    && profile.getPluginRepositories().isEmpty()
                    && profile.getReporting() == null;
        }
    
        private static <T extends ModelBase.Builder> T prune(T builder, ModelBase model) {
            builder.properties(null).reporting(null);
            if (model.getDistributionManagement() != null
                    && model.getDistributionManagement().getRelocation() != null) {
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Thu Nov 27 07:40:26 UTC 2025
    - 21.2K bytes
    - Viewed (0)
  9. fastapi/_compat/v2.py

        return error  # type: ignore[return-value]
    
    
    def create_body_model(
        *, fields: Sequence[ModelField], model_name: str
    ) -> type[BaseModel]:
        field_params = {f.name: (f.field_info.annotation, f.field_info) for f in fields}
        BodyModel: type[BaseModel] = create_model(model_name, **field_params)  # type: ignore[call-overload]
        return BodyModel
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 19.1K bytes
    - Viewed (0)
  10. fastapi/dependencies/utils.py

            return None
        first_param = flat_dependant.body_params[0]
        if not embed_body_fields:
            return first_param
        model_name = "Body_" + name
        BodyModel = create_body_model(
            fields=flat_dependant.body_params, model_name=model_name
        )
        required = any(True for f in flat_dependant.body_params if f.required)
        BodyFieldInfo_kwargs: dict[str, Any] = {
            "annotation": BodyModel,
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 37.6K bytes
    - Viewed (3)
Back to top