- Sort Score
- Result 10 results
- Languages All
Results 981 - 990 of 1,086 for str (0.02 sec)
-
docs/zh/docs/advanced/security/http-basic-auth.md
以下是更完整的示例。 使用依赖项检查用户名与密码是否正确。 为此要使用 Python 标准模块 <a href="https://docs.python.org/3/library/secrets.html" class="external-link" target="_blank">`secrets`</a> 检查用户名与密码。 `secrets.compare_digest()` 需要仅包含 ASCII 字符(英语字符)的 `bytes` 或 `str`,这意味着它不适用于像`á`一样的字符,如 `Sebastián`。 为了解决这个问题,我们首先将 `username` 和 `password` 转换为使用 UTF-8 编码的 `bytes` 。 然后我们可以使用 `secrets.compare_digest()` 来确保 `credentials.username` 是 `"stanleyjobson"`,且 `credentials.password` 是`"swordfish"`。
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 5.2K bytes - Viewed (0) -
tests/test_multi_body_errors.py
from dirty_equals import IsDict, IsOneOf from fastapi import FastAPI from fastapi.testclient import TestClient from pydantic import BaseModel, condecimal app = FastAPI() class Item(BaseModel): name: str age: condecimal(gt=Decimal(0.0)) # type: ignore @app.post("/items/") def save_item_no_body(item: List[Item]): return {"item": item} client = TestClient(app)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 7.6K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/es/user/allcommon/EsAbstractBehavior.java
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Thu Feb 22 01:53:18 UTC 2024 - 26.4K bytes - Viewed (0) -
docs/pt/docs/advanced/settings.md
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 17K bytes - Viewed (0) -
docs/zh/docs/advanced/settings.md
#### `lru_cache` 技术细节 `@lru_cache` 修改了它所装饰的函数,以返回第一次返回的相同值,而不是再次计算它,每次都执行函数的代码。 因此,下面的函数将对每个参数组合执行一次。然后,每个参数组合返回的值将在使用完全相同的参数组合调用函数时再次使用。 例如,如果您有一个函数: ```Python @lru_cache def say_hi(name: str, salutation: str = "Ms."): return f"Hello {salutation} {name}" ``` 您的程序可以像这样执行: ```mermaid sequenceDiagram participant code as Code participant function as say_hi()
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 13.8K bytes - Viewed (0) -
docs/de/docs/advanced/security/http-basic-auth.md
`secrets.compare_digest()` benötigt `bytes` oder einen `str`, welcher nur ASCII-Zeichen (solche der englischen Sprache) enthalten darf, das bedeutet, dass es nicht mit Zeichen wie `á`, wie in `Sebastián`, funktionieren würde.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 27 15:25:54 UTC 2024 - 5.8K bytes - Viewed (0) -
common/scripts/kind_provisioner.sh
net_bits = 128 if type(net) == IPv6Network else 32; net_len = pow(2, net_bits - net.prefixlen) start, end = int(net_len / 4 * 3), net_len if net_len > 2000: start, end = 1000, 2000 [print(str(ip) + "/" + str(ip.max_prefixlen)) for ip in islice(ip_network('$CIDR').hosts(), start, end)] EOF } function ips_to_cidrs() { IP_RANGE_START="$1" IP_RANGE_END="$2" python3 - <<EOF
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Wed Aug 21 04:47:23 UTC 2024 - 17.2K bytes - Viewed (0) -
docs/fr/docs/deployment/docker.md
from fastapi import FastAPI app = FastAPI() @app.get("/") def read_root(): return {"Hello": "World"} @app.get("/items/{item_id}") def read_item(item_id: int, q: Optional[str] = None): return {"item_id": item_id, "q": q} ``` * Vous devriez maintenant avoir une structure de répertoire telle que : ``` . ├── app │ └── main.py └── Dockerfile ```
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Aug 06 04:48:30 UTC 2024 - 7.5K bytes - Viewed (0) -
docs/ru/docs/tutorial/body-updates.md
* Это сравнимо с повторным использованием метода модели `.dict()`, но при этом происходит проверка (и преобразование) значений в типы данных, которые могут быть преобразованы в JSON, например, `datetime` в `str`. * Сохранить данные в своей БД. * Вернуть обновленную модель. //// tab | Python 3.10+ ```Python hl_lines="28-35" {!> ../../docs_src/body_updates/tutorial002_py310.py!} ``` ////
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 8.2K bytes - Viewed (0) -
src/main/java/jcifs/internal/smb2/ServerMessageBlock2.java
c = "SMB2_OPLOCK_BREAK"; break; default: c = "UNKNOWN"; } String str = this.status == 0 ? "0" : SmbException.getMessageByCode(this.status); return new String( "command=" + c + ",status=" + str + ",flags=0x" + Hexdump.toHexString(this.flags, 4) + ",mid=" + this.mid + ",wordCount=" + this.wordCount + ",byteCount=" + this.byteCount);
Registered: Sun Nov 03 00:10:13 UTC 2024 - Last Modified: Sun Sep 30 10:47:31 UTC 2018 - 19.9K bytes - Viewed (0)