- Sort Score
- Num 10 results
- Language All
Results 91 - 100 of 1,089 for itens (0.38 seconds)
-
docs/zh/docs/tutorial/bigger-applications.md
`items` 模块将具有一个 `router` 变量(`items.router`)。这与我们在 `app/routers/items.py` 文件中创建的变量相同,它是一个 `APIRouter` 对象。 然后我们对 `users` 模块进行相同的操作。 我们也可以像这样导入它们: ```Python from app.routers import items, users ``` /// info | 信息 第一个版本是「相对导入」: ```Python from .routers import items, users ``` 第二个版本是「绝对导入」: ```Python from app.routers import items, users ```
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 19.5K bytes - Click Count (0) -
tests/test_stream_bare_type.py
name: str app = FastAPI() @app.get("/items/stream-bare-async") async def stream_bare_async() -> AsyncIterable: yield {"name": "foo"} @app.get("/items/stream-bare-sync") def stream_bare_sync() -> Iterable: yield {"name": "bar"} client = TestClient(app) def test_stream_bare_async_iterable(): response = client.get("/items/stream-bare-async") assert response.status_code == 200
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Feb 27 18:56:47 GMT 2026 - 1.1K bytes - Click Count (0) -
docs_src/extra_models/tutorial003_py310.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 612 bytes - Click Count (0) -
docs_src/dependencies/tutorial002_an_py310.py
self.skip = skip self.limit = limit @app.get("/items/") async def read_items(commons: Annotated[CommonQueryParams, Depends(CommonQueryParams)]): response = {} if commons.q: response.update({"q": commons.q}) items = fake_items_db[commons.skip : commons.skip + commons.limit] response.update({"items": items})Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 664 bytes - Click Count (0) -
tests/test_tutorial/test_body/test_tutorial004.py
response = client.put( "/items/123", json={"name": "Foo", "price": 50.1}, ) assert response.status_code == 200 assert response.json() == { "item_id": 123, "name": "Foo", "price": 50.1, "description": None, "tax": None, } def test_put_with_no_data(client: TestClient): response = client.put("/items/123", json={})
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 6.6K bytes - Click Count (0) -
src/main/java/org/codelibs/fess/app/web/api/ApiResult.java
Created: Tue Mar 31 13:07:34 GMT 2026 - Last Modified: Sat Mar 28 11:55:54 GMT 2026 - 25.8K bytes - Click Count (0) -
tests/test_security_oauth2_authorization_code_bearer_description.py
tokenUrl="token", description="OAuth2 Code Bearer", auto_error=True, ) @app.get("/items/") async def read_items(token: str | None = Security(oauth2_scheme)): return {"token": token} client = TestClient(app) def test_no_token(): response = client.get("/items") assert response.status_code == 401, response.text assert response.json() == {"detail": "Not authenticated"}
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 2.5K bytes - Click Count (0) -
tests/test_security_oauth2_password_bearer_optional.py
oauth2_scheme = OAuth2PasswordBearer(tokenUrl="/token", auto_error=False) @app.get("/items/") async def read_items(token: str | None = Security(oauth2_scheme)): if token is None: return {"msg": "Create an account first"} return {"token": token} client = TestClient(app) def test_no_token(): response = client.get("/items") assert response.status_code == 200, response.text
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 2.2K bytes - Click Count (0) -
tests/test_deprecated_responses.py
@app.get("/items") def get_items() -> Item: return Item(name="widget", price=9.99) return app def test_orjson_response_returns_correct_data(): app = _make_orjson_app() client = TestClient(app) with warnings.catch_warnings(): warnings.simplefilter("ignore", FastAPIDeprecationWarning) response = client.get("/items") assert response.status_code == 200Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Feb 22 16:34:59 GMT 2026 - 2K bytes - Click Count (0) -
docs_src/body_updates/tutorial001_py310.py
tax: float = 10.5 tags: list[str] = [] items = { "foo": {"name": "Foo", "price": 50.2}, "bar": {"name": "Bar", "description": "The bartenders", "price": 62, "tax": 20.2}, "baz": {"name": "Baz", "description": None, "price": 50.2, "tax": 10.5, "tags": []}, } @app.get("/items/{item_id}", response_model=Item) async def read_item(item_id: str): return items[item_id]Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 856 bytes - Click Count (0)