- Sort Score
- Num 10 results
- Language All
Results 261 - 270 of 1,555 for depend (0.04 seconds)
-
docs/pt/docs/tutorial/dependencies/classes-as-dependencies.md
``` //// //// tab | Python 3.9+ non-Annotated /// tip | Dica Utilize a versão com `Annotated` se possível. /// ```Python commons: CommonQueryParams = Depends() ``` //// Você declara a dependência como o tipo do parâmetro, e utiliza `Depends()` sem nenhum parâmetro, em vez de ter que escrever a classe *novamente* dentro de `Depends(CommonQueryParams)`.
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 7.3K bytes - Click Count (0) -
src/builtin/builtin.go
// slice = append(slice, anotherSlice...) // // As a special case, it is legal to append a string to a byte slice, like this: // // slice = append([]byte("hello "), "world"...) func append(slice []Type, elems ...Type) []Type // The copy built-in function copies elements from a source slice into a // destination slice. (As a special case, it also will copy bytes from aCreated: Tue Dec 30 11:13:12 GMT 2025 - Last Modified: Mon Dec 30 23:59:23 GMT 2024 - 12.8K bytes - Click Count (0) -
docs_src/sql_databases/tutorial002_py39.py
@app.post("/heroes/", response_model=HeroPublic) def create_hero(hero: HeroCreate, session: Session = Depends(get_session)): db_hero = Hero.model_validate(hero) session.add(db_hero) session.commit() session.refresh(db_hero) return db_hero @app.get("/heroes/", response_model=list[HeroPublic]) def read_heroes( session: Session = Depends(get_session), offset: int = 0, limit: int = Query(default=100, le=100), ):
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Oct 09 19:44:42 GMT 2024 - 2.6K bytes - Click Count (0) -
tests/test_ambiguous_params.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 20 15:55:38 GMT 2025 - 2K bytes - Click Count (1) -
docs_src/sql_databases/tutorial001_py39.py
def on_startup(): create_db_and_tables() @app.post("/heroes/") def create_hero(hero: Hero, session: Session = Depends(get_session)) -> Hero: session.add(hero) session.commit() session.refresh(hero) return hero @app.get("/heroes/") def read_heroes( session: Session = Depends(get_session), offset: int = 0, limit: int = Query(default=100, le=100), ) -> list[Hero]:
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Oct 09 19:44:42 GMT 2024 - 1.8K bytes - Click Count (0) -
docs_src/security/tutorial004_an_py310.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:
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Mon Sep 29 02:57:38 GMT 2025 - 4.1K bytes - Click Count (0) -
docs_src/sql_databases/tutorial001_py310.py
def on_startup(): create_db_and_tables() @app.post("/heroes/") def create_hero(hero: Hero, session: Session = Depends(get_session)) -> Hero: session.add(hero) session.commit() session.refresh(hero) return hero @app.get("/heroes/") def read_heroes( session: Session = Depends(get_session), offset: int = 0, limit: int = Query(default=100, le=100), ) -> list[Hero]:
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Oct 09 19:44:42 GMT 2024 - 1.7K bytes - Click Count (0) -
docs_src/security/tutorial003_py39.py
async def get_current_user(token: str = Depends(oauth2_scheme)): user = fake_decode_token(token) if not user: raise HTTPException( status_code=status.HTTP_401_UNAUTHORIZED, detail="Not authenticated", headers={"WWW-Authenticate": "Bearer"}, ) return user async def get_current_active_user(current_user: User = Depends(get_current_user)): if current_user.disabled:
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 2.4K bytes - Click Count (0) -
docs/de/docs/tutorial/dependencies/classes-as-dependencies.md
## Typannotation vs. `Depends` { #type-annotation-vs-depends } Beachten Sie, wie wir `CommonQueryParams` im obigen Code zweimal schreiben: //// tab | Python 3.9+ ```Python commons: Annotated[CommonQueryParams, Depends(CommonQueryParams)] ``` //// //// tab | Python 3.9+ nicht annotiert /// tip | TippCreated: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 7.6K bytes - Click Count (0) -
docs_src/security/tutorial004_py310.py
return user async def get_current_active_user(current_user: 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: OAuth2PasswordRequestForm = Depends(), ) -> Token:
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Mon Sep 29 02:57:38 GMT 2025 - 4K bytes - Click Count (0)