- Sort Score
- Result 10 results
- Languages All
Results 1001 - 1010 of 1,094 for Fstr (0.02 sec)
-
docs/en/docs/environment-variables.md
That means that **any value** read in Python from an environment variable **will be a `str`**, and any conversion to a different type or any validation has to be done in code.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Sep 08 20:36:53 UTC 2024 - 7.9K bytes - Viewed (0) -
docs/de/docs/advanced/openapi-callbacks.md
In diesem Fall ist es der `str`: ```Python "{$callback_url}/invoices/{$request.body.id}" ``` Wenn Ihr API-Benutzer (der externe Entwickler) also einen Request an *Ihre API* sendet, via: ```
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 8.8K bytes - Viewed (0) -
tests/test_path.py
def test_path_str_foobar(): response = client.get("/path/str/foobar") assert response.status_code == 200 assert response.json() == "foobar" def test_path_str_42(): response = client.get("/path/str/42") assert response.status_code == 200 assert response.json() == "42" def test_path_str_True(): response = client.get("/path/str/True") assert response.status_code == 200
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 34.4K bytes - Viewed (0) -
src/bytes/buffer_test.go
func check(t *testing.T, testname string, buf *Buffer, s string) { bytes := buf.Bytes() str := buf.String() if buf.Len() != len(bytes) { t.Errorf("%s: buf.Len() == %d, len(buf.Bytes()) == %d", testname, buf.Len(), len(bytes)) } if buf.Len() != len(str) { t.Errorf("%s: buf.Len() == %d, len(buf.String()) == %d", testname, buf.Len(), len(str)) } if buf.Len() != len(s) {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Sep 03 20:55:15 UTC 2024 - 18.6K bytes - Viewed (0) -
istioctl/pkg/validate/validate.go
func fromSchemaAndJSONMap(schema resource.Schema, data any) (config.Spec, error) { // Marshal to json bytes str, err := json.Marshal(data) if err != nil { return nil, err } out, err := schema.NewInstance() if err != nil { return nil, err } if err = config.ApplyJSONStrict(out, string(str)); err != nil { return nil, err } return out, nil
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Thu Aug 15 22:27:47 UTC 2024 - 14.3K bytes - Viewed (0) -
docs/en/docs/release-notes.md
from fastapi import FastAPI, Header from pydantic import BaseModel app = FastAPI() class CommonHeaders(BaseModel): host: str save_data: bool if_modified_since: str | None = None traceparent: str | None = None x_tag: list[str] = [] @app.get("/items/") async def read_items(headers: Annotated[CommonHeaders, Header()]): return headers ```
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Nov 01 11:25:57 UTC 2024 - 460.3K bytes - Viewed (0) -
tests/test_application.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 21:56:59 UTC 2024 - 52.2K bytes - Viewed (0) -
docs/en/docs/advanced/security/http-basic-auth.md
For this, use the Python standard module <a href="https://docs.python.org/3/library/secrets.html" class="external-link" target="_blank">`secrets`</a> to check the username and password. `secrets.compare_digest()` needs to take `bytes` or a `str` that only contains ASCII characters (the ones in English), this means it wouldn't work with characters like `á`, as in `Sebastián`. To handle that, we first convert the `username` and `password` to `bytes` encoding them with UTF-8.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Oct 26 16:01:27 UTC 2024 - 4.8K bytes - Viewed (0) -
docs/zh/docs/tutorial/dependencies/index.md
{!../../docs_src/dependencies/tutorial001.py!} ``` 大功告成。 只用了**2 行**代码。 依赖项函数的形式和结构与*路径操作函数*一样。 因此,可以把依赖项当作没有「装饰器」(即,没有 `@app.get("/some-path")` )的路径操作函数。 依赖项可以返回各种内容。 本例中的依赖项预期接收如下参数: * 类型为 `str` 的可选查询参数 `q` * 类型为 `int` 的可选查询参数 `skip`,默认值是 `0` * 类型为 `int` 的可选查询参数 `limit`,默认值是 `100` 然后,依赖项函数返回包含这些值的 `dict`。 ### 导入 `Depends` ```Python hl_lines="3" {!../../docs_src/dependencies/tutorial001.py!} ```
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 7K bytes - Viewed (0) -
docs/ru/docs/tutorial/handling-errors.md
```JSON { "detail": "Item not found" } ``` /// tip | "Подсказка" При вызове `HTTPException` в качестве параметра `detail` можно передавать любое значение, которое может быть преобразовано в JSON, а не только `str`. Вы можете передать `dict`, `list` и т.д. Они автоматически обрабатываются **FastAPI** и преобразуются в JSON. /// ## Добавление пользовательских заголовков
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 14.5K bytes - Viewed (0)