- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 205 for prepends (0.41 sec)
-
cmd/object-api-utils.go
if s == "" { return s } return strings.TrimSuffix(s, SlashSeparator) + SlashSeparator } // pathsJoinPrefix - like pathJoin retains trailing SlashSeparator // for all elements, prepends them with 'prefix' respectively. func pathsJoinPrefix(prefix string, elem ...string) (paths []string) { paths = make([]string, len(elem)) for i, e := range elem { paths[i] = pathJoin(prefix, e) } return paths
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Tue Jun 11 03:13:30 UTC 2024 - 36.3K bytes - Viewed (0) -
build/lib/release.sh
local client_bins=("${KUBE_CLIENT_BINARIES[@]}") if [[ "${platform%/*}" = 'windows' ]]; then client_bins=("${KUBE_CLIENT_BINARIES_WIN[@]}") fi # This fancy expression will expand to prepend a path # (${LOCAL_OUTPUT_BINPATH}/${platform}/) to every item in the # client_bins array. cp "${client_bins[@]/#/${LOCAL_OUTPUT_BINPATH}/${platform}/}" \ "${release_stage}/client/bin/"
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Jun 01 16:43:08 UTC 2024 - 21.7K bytes - Viewed (0) -
tests/test_dependency_overrides.py
@app.get("/decorator-depends/", dependencies=[Depends(common_parameters)]) async def decorator_depends(): return {"in": "decorator-depends"} @router.get("/router-depends/") async def router_depends(commons: dict = Depends(common_parameters)): return {"in": "router-depends", "params": commons} @router.get("/router-decorator-depends/", dependencies=[Depends(common_parameters)]) async def router_decorator_depends():
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 15.4K bytes - Viewed (0) -
docs/en/docs/tutorial/dependencies/classes-as-dependencies.md
``` === "Python 3.8 non-Annotated" !!! tip Prefer to use the `Annotated` version if possible. ```Python commons: CommonQueryParams = Depends() ``` You declare the dependency as the type of the parameter, and you use `Depends()` without any parameter, instead of having to write the full class *again* inside of `Depends(CommonQueryParams)`.
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Thu Apr 18 19:53:19 UTC 2024 - 11.4K bytes - Viewed (0) -
fastapi/security/http.py
```python from typing import Annotated from fastapi import Depends, FastAPI from fastapi.security import HTTPBasic, HTTPBasicCredentials app = FastAPI() security = HTTPBasic() @app.get("/users/me") def read_current_user(credentials: Annotated[HTTPBasicCredentials, Depends(security)]): return {"username": credentials.username, "password": credentials.password}
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Fri Apr 19 15:29:38 UTC 2024 - 13.2K bytes - Viewed (0) -
docs/ru/docs/tutorial/dependencies/index.md
```Python hl_lines="15 20" {!> ../../../docs_src/dependencies/tutorial001.py!} ``` `Depends` работает немного иначе. Вы передаёте в `Depends` одиночный параметр, который будет похож на функцию. Вы **не вызываете его** на месте (не добавляете скобочки в конце: 👎 *your_best_func()*👎), просто передаёте как параметр в `Depends()`. И потом функция берёт параметры так же, как *функция обработки пути*. !!! tip "Подсказка"
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Thu Apr 18 19:53:19 UTC 2024 - 17.7K bytes - Viewed (0) -
docs/en/docs/tutorial/dependencies/index.md
``` Although you use `Depends` in the parameters of your function the same way you use `Body`, `Query`, etc, `Depends` works a bit differently. You only give `Depends` a single parameter. This parameter must be something like a function. You **don't call it** directly (don't add the parenthesis at the end), you just pass it as a parameter to `Depends()`.
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Thu Apr 18 19:53:19 UTC 2024 - 11.6K bytes - Viewed (0) -
docs/ko/docs/tutorial/dependencies/index.md
{!> ../../../docs_src/dependencies/tutorial001.py!} ``` 비록 `Body`, `Query` 등을 사용하는 것과 같은 방식으로 여러분의 함수의 매개변수에 있는 `Depends`를 사용하지만, `Depends`는 약간 다르게 작동합니다. `Depends`에 단일 매개변수만 전달했습니다. 이 매개변수는 함수같은 것이어야 합니다. 여러분은 직접 **호출하지 않았습니다** (끝에 괄호를 치지 않았습니다), 단지 `Depends()`에 매개변수로 넘겨 줬을 뿐입니다. 그리고 그 함수는 *경로 작동 함수*가 작동하는 것과 같은 방식으로 매개변수를 받습니다. !!! tip "팁"
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Thu Apr 18 19:53:19 UTC 2024 - 13.6K bytes - Viewed (0) -
tests/test_security_oauth2.py
@app.post("/login") # Here we use string annotations to test them def login(form_data: "OAuth2PasswordRequestFormStrict" = Depends()): return form_data @app.get("/users/me") # Here we use string annotations to test them def read_current_user(current_user: "User" = Depends(get_current_user)): return current_user client = TestClient(app) def test_security_oauth2():
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 10.7K bytes - Viewed (0) -
tests/test_security_oauth2_optional_description.py
return None user = User(username=oauth_header) return user @app.post("/login") def login(form_data: OAuth2PasswordRequestFormStrict = Depends()): return form_data @app.get("/users/me") def read_users_me(current_user: Optional[User] = Depends(get_current_user)): if current_user is None: return {"msg": "Create an account first"} return current_user client = TestClient(app)
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 10.9K bytes - Viewed (0)