- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 34 for node_name (0.04 sec)
-
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) -
tests/test_tutorial/test_path_params/test_tutorial005.py
response = client.get("/models/alexnet") assert response.status_code == 200 assert response.json() == {"model_name": "alexnet", "message": "Deep Learning FTW!"} def test_get_enums_lenet(): response = client.get("/models/lenet") assert response.status_code == 200 assert response.json() == {"model_name": "lenet", "message": "LeCNN all the images"} def test_get_enums_resnet():
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 4.1K bytes - Viewed (0) -
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) -
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) -
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) -
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) -
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) -
tests/test_tutorial/test_settings/test_app01.py
main_mod = importlib.import_module(mod_name) return TestClient(main_mod.app) def test_settings_validation_error(mod_name: str, monkeypatch: MonkeyPatch): monkeypatch.delenv("ADMIN_EMAIL", raising=False) if mod_name in sys.modules: del sys.modules[mod_name] # pragma: no cover with pytest.raises(ValidationError) as exc_info: importlib.import_module(mod_name) assert exc_info.value.errors() == [
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 2.2K bytes - Viewed (0) -
tests/test_tutorial/test_body_nested_models/test_tutorial001_tutorial002_tutorial003.py
return request.param @pytest.fixture(name="client") def get_client(mod_name: str): mod = importlib.import_module(f"docs_src.body_nested_models.{mod_name}") client = TestClient(mod.app) return client def test_put_all(client: TestClient, mod_name: str): if mod_name.startswith("tutorial003"): tags_expected = IsList("foo", "bar", check_order=False) else:
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 7.9K bytes - Viewed (0) -
tests/test_tutorial/test_custom_response/test_tutorial002_tutorial003_tutorial004.py
@pytest.fixture( name="mod_name", params=[ pytest.param("tutorial002_py39"), pytest.param("tutorial003_py39"), pytest.param("tutorial004_py39"), ], ) def get_mod_name(request: pytest.FixtureRequest) -> str: return request.param @pytest.fixture(name="client") def get_client(mod_name: str) -> TestClient:
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 1.8K bytes - Viewed (0)