- Sort Score
- Num 10 results
- Language All
Results 891 - 900 of 1,087 for tstr (0.15 seconds)
-
docs/ru/docs/advanced/security/oauth2-scopes.md
Для этого мы обновляем Pydantic‑модель `TokenData`, добавляя новое свойство `scopes`. Валидируя данные с помощью Pydantic, мы можем удостовериться, что у нас, например, именно `list` из `str` со scopes и `str` с `username`. А не, скажем, `dict` или что‑то ещё — ведь это могло бы где‑то позже сломать приложение и создать риск для безопасности.
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Sep 30 11:37:11 GMT 2025 - 20.7K bytes - Click Count (0) -
docs/zh/docs/features.md
编写带有类型标注的标准 Python: ```Python from datetime import date from pydantic import BaseModel # Declare a variable as a str # and get editor support inside the function def main(user_id: str): return user_id # A Pydantic model class User(BaseModel): id: int name: str joined: date ``` 可以像这样来使用: ```Python my_user: User = User(id=3, name="John Doe", joined="2018-07-19")
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Oct 11 17:48:49 GMT 2025 - 8.9K bytes - Click Count (0) -
tests/test_union_body.py
from typing import Optional, Union from fastapi import FastAPI from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: Optional[str] = None class OtherItem(BaseModel): price: int @app.post("/items/") def save_union_body(item: Union[OtherItem, Item]): return {"item": item} client = TestClient(app)
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 18:19:10 GMT 2025 - 4.3K bytes - Click Count (0) -
src/main/java/jcifs/smb/SmbRandomAccessFile.java
public final void writeUTF(final String str) throws SmbException { final int len = str.length(); int ch, size = 0; byte[] dst; for (int i = 0; i < len; i++) { ch = str.charAt(i); size += ch > 0x07F ? ch > 0x7FF ? 3 : 2 : 1; } dst = new byte[size]; writeShort(size); Encdec.enc_utf8(str, dst, 0, size); write(dst, 0, size);
Created: Sat Dec 20 13:44:44 GMT 2025 - Last Modified: Sat Aug 16 01:32:48 GMT 2025 - 18.8K bytes - Click Count (0) -
docs/pt/docs/advanced/security/oauth2-scopes.md
Para isso, nós atualizamos o modelo Pydantic `TokenData` com a nova propriedade `scopes`. Ao validar os dados com o Pydantic nós podemos garantir que temos, por exemplo, exatamente uma `list` de `str` com os escopos e uma `str` com o `username`. No lugar de, por exemplo, um `dict`, ou alguma outra coisa, que poderia quebrar a aplicação em algum lugar mais tarde, tornando isso um risco de segurança.
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Nov 12 16:23:57 GMT 2025 - 14.9K bytes - Click Count (0) -
tests/test_generate_unique_id_function.py
return f"bar_{route.name}" def custom_generate_unique_id3(route: APIRoute): return f"baz_{route.name}" class Item(BaseModel): name: str price: float class Message(BaseModel): title: str description: str def test_top_level_generate_unique_id(): app = FastAPI(generate_unique_id_function=custom_generate_unique_id) router = APIRouter()Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 66.7K bytes - Click Count (0) -
docs_src/custom_docs_ui/tutorial002_py39.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 1.1K bytes - Click Count (0) -
docs/es/docs/tutorial/response-model.md
{* ../../docs_src/response_model/tutorial004_py310.py hl[9,11:12] *} * `description: Union[str, None] = None` (o `str | None = None` en Python 3.10) tiene un valor por defecto de `None`. * `tax: float = 10.5` tiene un valor por defecto de `10.5`. * `tags: List[str] = []` tiene un valor por defecto de una list vacía: `[]`. pero podrías querer omitirlos del resultado si no fueron en realidad almacenados.Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 17.7K bytes - Click Count (0) -
src/main/java/jcifs/smb1/smb1/NtlmPasswordAuthentication.java
Created: Sat Dec 20 13:44:44 GMT 2025 - Last Modified: Sat Aug 16 01:32:48 GMT 2025 - 26.7K bytes - Click Count (0) -
statement.go
} // QuoteTo write quoted value to writer func (stmt *Statement) QuoteTo(writer clause.Writer, field interface{}) { write := func(raw bool, str string) { if raw { writer.WriteString(str) } else { stmt.DB.Dialector.QuoteTo(writer, str) } } switch v := field.(type) { case clause.Table: if v.Name == clause.CurrentTable { if stmt.TableExpr != nil { stmt.TableExpr.Build(stmt)
Created: Sun Dec 28 09:35:17 GMT 2025 - Last Modified: Fri Sep 12 04:33:27 GMT 2025 - 20.9K bytes - Click Count (0)