- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 26 for get_model (0.07 sec)
-
tests/test_datetime_custom_encoder.py
app = FastAPI() model = ModelWithDatetimeField(dt_field=datetime(2019, 1, 1, 8)) @app.get("/model", response_model=ModelWithDatetimeField) def get_model(): return model client = TestClient(app) with client: response = client.get("/model") assert response.json() == {"dt_field": "2019-01-01T08:00:00+00:00"}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 1.6K bytes - Viewed (0) -
docs_src/path_params/tutorial005.py
from fastapi import FastAPI 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 Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Aug 26 13:26:03 UTC 2022 - 546 bytes - Viewed (0) -
tests/test_filter_pydantic_sub_model/app_pv1.py
if not name.endswith("A"): raise ValueError("name must end in A") return name async def get_model_c() -> ModelC: return ModelC(username="test-user", password="test-password") @app.get("/model/{name}", response_model=ModelA) async def get_model_a(name: str, model_c=Depends(get_model_c)):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 784 bytes - Viewed (0) -
tests/test_filter_pydantic_sub_model_pv2.py
raise ValueError("name must end in A") return name async def get_model_c() -> ModelC: return ModelC(username="test-user", password="test-password") @app.get("/model/{name}", response_model=ModelA) async def get_model_a(name: str, model_c=Depends(get_model_c)): return {"name": name, "description": "model-a-desc", "foo": model_c} client = TestClient(app)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 6.3K bytes - Viewed (0) -
compat/maven-model-builder/src/test/java/org/apache/maven/model/inheritance/DefaultInheritanceAssemblerTest.java
testInheritance(baseName, true); } public void testInheritance(String baseName, boolean fromRepo) throws IOException { Model parent = getModel(baseName + "-parent"); Model child = getModel(baseName + "-child"); if (fromRepo) { // when model is read from repo, a stream is used, then pomFile == null
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 7.9K bytes - Viewed (0) -
impl/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultProject.java
} @Nonnull @Override public Packaging getPackaging() { return packaging; } @Nonnull @Override public Model getModel() { return project.getModel().getDelegate(); } @Nonnull @Override public Path getPomPath() { return nonNull(project.getFile(), "pomPath").toPath(); } @Override
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 7.5K bytes - Viewed (0) -
impl/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultMojoExecution.java
return delegate; } @Override public Plugin getPlugin() { return new Plugin() { @Override public org.apache.maven.api.model.Plugin getModel() { return delegate.getPlugin().getDelegate(); } @Override public PluginDescriptor getDescriptor() {
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 5.2K bytes - Viewed (0) -
api/maven-api-core/src/main/java/org/apache/maven/api/Project.java
@Nonnull List<ProducedArtifact> getArtifacts(); /** * Returns the project model. */ @Nonnull Model getModel(); /** * Shorthand method. */ @Nonnull default Build getBuild() { Build build = getModel().getBuild(); return build != null ? build : Build.newInstance(); } /**
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Sat Sep 28 09:03:24 UTC 2024 - 7.8K bytes - Viewed (0) -
compat/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
model = model.withPomFile(((FileModelSource) modelSource).getPath()); } Model retModel = new Model(model); problems.setSource(retModel); modelValidator.validateFileModel(retModel, request, problems); if (hasFatalErrors(problems)) { throw problems.newModelBuildingException(); }
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 83.6K bytes - Viewed (0) -
compat/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelBuildingEvent.java
/** * Gets the model being built. The precise state of this model depends on the event being fired. * * @return The model being built, never {@code null}. */ Model getModel(); /** * Gets the model building request being processed. * * @return The model building request being processed, never {@code null}. */ ModelBuildingRequest getRequest();
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 1.7K bytes - Viewed (0)