- Sort Score
- Num 10 results
- Language All
Results 221 - 230 of 861 for defs (0.09 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
cmd/sftp-server.go
) // if the sftp parameter --trusted-user-ca-key is set, then // the final form of the key file will be set as this variable. var globalSFTPTrustedCAPubkey ssh.PublicKey // https://cs.opensource.google/go/x/crypto/+/refs/tags/v0.22.0:ssh/common.go;l=46 // preferredKexAlgos specifies the default preference for key-exchange // algorithms in preference order. The diffie-hellman-group16-sha512 algorithm
Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Sun Sep 28 20:59:21 GMT 2025 - 16.5K bytes - Click Count (0) -
tests/test_datetime_custom_encoder.py
from fastapi import FastAPI from fastapi.testclient import TestClient from pydantic import BaseModel def test_pydanticv2(): from pydantic import field_serializer class ModelWithDatetimeField(BaseModel): dt_field: datetime @field_serializer("dt_field") def serialize_datetime(self, dt_field: datetime): return dt_field.replace(microsecond=0, tzinfo=timezone.utc).isoformat()
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Dec 27 12:54:56 GMT 2025 - 817 bytes - Click Count (0) -
docs/ja/docs/async.md
### その他のユーティリティ関数 { #other-utility-functions } あなたが直接呼び出すユーティリティ関数は、通常の `def` でも `async def` でも構いません。FastAPI はその呼び出し方に影響を与えません。 これは、FastAPI があなたの代わりに呼び出す関数 (すなわち *path operation 関数* と依存関係) とは対照的です。 ユーティリティ関数が `def` の通常関数であれば、(あなたのコードに書いたとおりに) 直接呼び出され、スレッドプールでは実行されません。関数が `async def` で作られている場合は、その関数を呼ぶときに `await` すべきです。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:07:17 GMT 2026 - 27.9K bytes - Click Count (0) -
fastapi/.agents/skills/fastapi/references/streaming.md
# Streaming ## Stream JSON Lines To stream JSON Lines, declare the return type and use `yield` to return the data. ```python @app.get("/items/stream") async def stream_items() -> AsyncIterable[Item]: for item in items: yield item ``` ## Server-Sent Events (SSE) To stream Server-Sent Events, use `response_class=EventSourceResponse` and `yield` items from the endpoint.
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Mar 01 10:05:57 GMT 2026 - 2.5K bytes - Click Count (0) -
fastapi/.agents/skills/fastapi/SKILL.md
```python from fastapi import FastAPI app = FastAPI() # Use async def when calling async code @app.get("/async-items/") async def read_async_items(): data = await some_async_library.fetch_items() return data # Use plain def when calling blocking/sync code or when in doubt @app.get("/items/") def read_items(): data = some_blocking_library.fetch_items() return data ```
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Mar 01 10:05:57 GMT 2026 - 10.1K bytes - Click Count (0) -
tests/test_security_http_base_optional.py
@app.get("/users/me") def read_current_user( credentials: HTTPAuthorizationCredentials | None = Security(security), ): if credentials is None: return {"msg": "Create an account first"} return {"scheme": credentials.scheme, "credentials": credentials.credentials} client = TestClient(app) def test_security_http_base():
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 2K bytes - Click Count (0) -
docs_src/websockets_/tutorial003_py310.py
</html> """ class ConnectionManager: def __init__(self): self.active_connections: list[WebSocket] = [] async def connect(self, websocket: WebSocket): await websocket.accept() self.active_connections.append(websocket) def disconnect(self, websocket: WebSocket): self.active_connections.remove(websocket) async def send_personal_message(self, message: str, websocket: WebSocket):Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Feb 27 12:34:37 GMT 2026 - 2.5K bytes - Click Count (0) -
tests/test_additional_response_extra.py
app = FastAPI() @sub_router.get("/") def read_item(): return {"id": "foo"} router.include_router(sub_router, prefix="/items") app.include_router(router) client = TestClient(app) def test_path_operation(): response = client.get("/items/") assert response.status_code == 200, response.text assert response.json() == {"id": "foo"} def test_openapi_schema():
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Feb 08 10:18:38 GMT 2026 - 1.3K bytes - Click Count (0) -
docs_src/request_files/tutorial002_py310.py
app = FastAPI() @app.post("/files/") async def create_files(files: list[bytes] = File()): return {"file_sizes": [len(file) for file in files]} @app.post("/uploadfiles/") async def create_upload_files(files: list[UploadFile]): return {"filenames": [file.filename for file in files]} @app.get("/") async def main(): content = """ <body>
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 786 bytes - Click Count (0) -
tests/test_deprecated_openapi_prefix.py
@app.get("/app") def read_main(request: Request): return {"message": "Hello World", "root_path": request.scope.get("root_path")} client = TestClient(app) def test_main(): response = client.get("/app") assert response.status_code == 200 assert response.json() == {"message": "Hello World", "root_path": "/api/v1"} def test_openapi(): response = client.get("/openapi.json")
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Feb 08 10:18:38 GMT 2026 - 1.3K bytes - Click Count (0)