- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 21 for item1 (0.5 sec)
-
docs_src/app_testing/app_b/main.py
return fake_db[item_id] @app.post("/items/", response_model=Item) async def create_item(item: Item, x_token: str = Header()): if x_token != fake_secret_token: raise HTTPException(status_code=400, detail="Invalid X-Token header") if item.id in fake_db: raise HTTPException(status_code=409, detail="Item already exists") fake_db[item.id] = item
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Jan 09 14:44:08 GMT 2024 - 1.1K bytes - Viewed (0) -
docs_src/settings/app03_an_py39/main.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Oct 24 20:26:06 GMT 2023 - 462 bytes - Viewed (0) -
docs_src/bigger_applications/app/main.py
from fastapi import Depends, FastAPI from .dependencies import get_query_token, get_token_header from .internal import admin from .routers import items, users app = FastAPI(dependencies=[Depends(get_query_token)]) app.include_router(users.router) app.include_router(items.router) app.include_router( admin.router, prefix="/admin", tags=["admin"], dependencies=[Depends(get_token_header)],
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sun Nov 29 17:32:18 GMT 2020 - 552 bytes - Viewed (0) -
docs_src/settings/app02_an_py39/main.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Oct 24 20:26:06 GMT 2023 - 445 bytes - Viewed (0) -
.github/actions/people/app/main.py
discussion_commentors[reply.author.login] = max( author_time, reply.createdAt ) for author_name, author_time in discussion_commentors.items(): commenters[author_name] += 1 if author_time > one_month_ago: last_month_commenters[author_name] += 1 if author_time > three_months_ago:
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Mar 26 17:38:21 GMT 2024 - 19.2K bytes - Viewed (1) -
docs_src/sql_databases_peewee/sql_app/main.py
@app.post( "/users/{user_id}/items/", response_model=schemas.Item, dependencies=[Depends(get_db)], ) def create_item_for_user(user_id: int, item: schemas.ItemCreate): return crud.create_user_item(item=item, user_id=user_id) @app.get("/items/", response_model=List[schemas.Item], dependencies=[Depends(get_db)]) def read_items(skip: int = 0, limit: int = 100): items = crud.get_items(skip=skip, limit=limit)
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 2.2K bytes - Viewed (0) -
docs_src/settings/app01/main.py
from .config import settings app = FastAPI() @app.get("/info") async def info(): return { "app_name": settings.app_name, "admin_email": settings.admin_email, "items_per_user": settings.items_per_user,
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Jul 29 09:26:07 GMT 2021 - 267 bytes - Viewed (0) -
docs_src/settings/app03/main.py
@app.get("/info") async def info(settings: config.Settings = Depends(get_settings)): return { "app_name": settings.app_name, "admin_email": settings.admin_email, "items_per_user": settings.items_per_user,
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Oct 24 20:26:06 GMT 2023 - 412 bytes - Viewed (0) -
docs_src/sql_databases/sql_app/main.py
@app.post("/users/{user_id}/items/", response_model=schemas.Item) def create_item_for_user( user_id: int, item: schemas.ItemCreate, db: Session = Depends(get_db) ): return crud.create_user_item(db=db, item=item, user_id=user_id) @app.get("/items/", response_model=List[schemas.Item]) def read_items(skip: int = 0, limit: int = 100, db: Session = Depends(get_db)): items = crud.get_items(db, skip=skip, limit=limit)
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sun May 17 10:14:14 GMT 2020 - 1.6K bytes - Viewed (0) -
docs_src/sql_databases/sql_app_py39/main.py
@app.post("/users/{user_id}/items/", response_model=schemas.Item) def create_item_for_user( user_id: int, item: schemas.ItemCreate, db: Session = Depends(get_db) ): return crud.create_user_item(db=db, item=item, user_id=user_id) @app.get("/items/", response_model=list[schemas.Item]) def read_items(skip: int = 0, limit: int = 100, db: Session = Depends(get_db)): items = crud.get_items(db, skip=skip, limit=limit)
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 1.6K bytes - Viewed (0)