- Sort Score
- Result 10 results
- Languages All
Results 541 - 550 of 1,427 for appends (0.05 sec)
-
docs_src/security/tutorial004_an.py
async def get_current_active_user( current_user: Annotated[User, Depends(get_current_user)], ): if current_user.disabled: raise HTTPException(status_code=400, detail="Inactive user") return current_user @app.post("/token") async def login_for_access_token( form_data: Annotated[OAuth2PasswordRequestForm, Depends()], ) -> Token:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon May 20 17:37:28 UTC 2024 - 4.2K bytes - Viewed (0) -
tests/test_dependency_normal_exceptions.py
@app.put("/invalid-user/{user_id}") def put_invalid_user( user_id: str, name: str = Body(), db: dict = Depends(get_database) ): db[user_id] = name raise HTTPException(status_code=400, detail="Invalid user") @app.put("/user/{user_id}") def put_user(user_id: str, name: str = Body(), db: dict = Depends(get_database)): db[user_id] = name return {"message": "OK"} @pytest.fixture(autouse=True)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 1.9K bytes - Viewed (0) -
src/main/java/jcifs/smb1/http/NtlmHttpURLConnection.java
StringBuffer buffer = new StringBuffer(); Iterator propertyValues = values.iterator(); while (propertyValues.hasNext()) { buffer.append(propertyValues.next()); if (propertyValues.hasNext()) { buffer.append(", "); } } connection.setRequestProperty(key, buffer.toString()); } public String getRequestProperty(String key) {
Registered: Sun Nov 03 00:10:13 UTC 2024 - Last Modified: Fri Mar 22 20:39:42 UTC 2019 - 20.4K bytes - Viewed (0) -
docs_src/security/tutorial002_an_py39.py
) async def get_current_user(token: Annotated[str, Depends(oauth2_scheme)]): user = fake_decode_token(token) return user @app.get("/users/me") async def read_users_me(current_user: Annotated[User, Depends(get_current_user)]):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 786 bytes - Viewed (0) -
docs_src/security/tutorial007.py
import secrets from fastapi import Depends, FastAPI, HTTPException, status from fastapi.security import HTTPBasic, HTTPBasicCredentials app = FastAPI() security = HTTPBasic() def get_current_username(credentials: HTTPBasicCredentials = Depends(security)): current_username_bytes = credentials.username.encode("utf8") correct_username_bytes = b"stanleyjobson" is_correct_username = secrets.compare_digest(
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Jan 11 14:33:05 UTC 2024 - 1.1K bytes - Viewed (0) -
docs/zh/docs/tutorial/dependencies/classes-as-dependencies.md
``` //// **FastAPI** 调用 `CommonQueryParams` 类。这将创建该类的一个 "实例",该实例将作为参数 `commons` 被传递给你的函数。 ## 类型注解 vs `Depends` 注意,我们在上面的代码中编写了两次`CommonQueryParams`: ```Python commons: CommonQueryParams = Depends(CommonQueryParams) ``` 最后的 `CommonQueryParams`: ```Python ... = Depends(CommonQueryParams) ``` ...实际上是 **Fastapi** 用来知道依赖项是什么的。 FastAPI 将从依赖项中提取声明的参数,这才是 FastAPI 实际调用的。
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 6.4K bytes - Viewed (0) -
src/main/java/jcifs/http/NtlmHttpURLConnection.java
Registered: Sun Nov 03 00:10:13 UTC 2024 - Last Modified: Sun Jul 01 13:12:10 UTC 2018 - 25.5K bytes - Viewed (0) -
docs_src/settings/app02/main.py
from functools import lru_cache from fastapi import Depends, FastAPI from .config import Settings app = FastAPI() @lru_cache def get_settings(): return Settings() @app.get("/info") async def info(settings: Settings = Depends(get_settings)): return { "app_name": settings.app_name, "admin_email": settings.admin_email, "items_per_user": settings.items_per_user,
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Oct 24 20:26:06 UTC 2023 - 406 bytes - Viewed (0) -
clause/returning.go
} } else { builder.WriteByte('*') } } // MergeClause merge order by clauses func (returning Returning) MergeClause(clause *Clause) { if v, ok := clause.Expression.(Returning); ok { returning.Columns = append(v.Columns, returning.Columns...) } clause.Expression = returning
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Oct 27 23:56:55 UTC 2021 - 681 bytes - Viewed (0) -
internal/kms/stub.go
matches = append(matches, madmin.KMSKeyInfo{Name: keyName, CreatedAt: StubCreatedAt, CreatedBy: StubCreatedBy}) } } return matches, "", nil } // CreateKey creates a new key with the given name. func (s *StubKMS) CreateKey(_ context.Context, req *CreateKeyRequest) error { if s.containsKeyName(req.Name) { return ErrKeyExists } s.KeyNames = append(s.KeyNames, req.Name) return nil }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Aug 18 06:43:03 UTC 2024 - 3.6K bytes - Viewed (0)