Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for create_item_for_user (0.26 sec)

  1. docs_src/sql_databases/sql_app_py310/main.py

        if db_user is None:
            raise HTTPException(status_code=404, detail="User not found")
        return db_user
    
    
    @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])
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 1.6K bytes
    - Viewed (0)
  2. docs_src/sql_databases/sql_app_py39/main.py

        if db_user is None:
            raise HTTPException(status_code=404, detail="User not found")
        return db_user
    
    
    @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])
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 1.6K bytes
    - Viewed (0)
  3. docs_src/sql_databases/sql_app_py310/alt_main.py

        if db_user is None:
            raise HTTPException(status_code=404, detail="User not found")
        return db_user
    
    
    @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])
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 1.9K bytes
    - Viewed (0)
  4. docs_src/sql_databases/sql_app/alt_main.py

        if db_user is None:
            raise HTTPException(status_code=404, detail="User not found")
        return db_user
    
    
    @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])
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 1.9K bytes
    - Viewed (0)
  5. docs_src/sql_databases/sql_app/main.py

        if db_user is None:
            raise HTTPException(status_code=404, detail="User not found")
        return db_user
    
    
    @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])
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun May 17 10:14:14 GMT 2020
    - 1.6K bytes
    - Viewed (0)
  6. docs_src/sql_databases/sql_app_py39/alt_main.py

        if db_user is None:
            raise HTTPException(status_code=404, detail="User not found")
        return db_user
    
    
    @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])
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 1.9K bytes
    - Viewed (0)
  7. docs_src/sql_databases_peewee/sql_app/main.py

        return db_user
    
    
    @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)])
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 2.2K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_sql_databases/test_sql_databases_middleware.py

                                    }
                                },
                            },
                        },
                        "summary": "Create Item For User",
                        "operationId": "create_item_for_user_users__user_id__items__post",
                        "parameters": [
                            {
                                "required": True,
                                "schema": {"title": "User Id", "type": "integer"},
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.3K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_sql_databases/test_sql_databases_middleware_py39.py

                                    }
                                },
                            },
                        },
                        "summary": "Create Item For User",
                        "operationId": "create_item_for_user_users__user_id__items__post",
                        "parameters": [
                            {
                                "required": True,
                                "schema": {"title": "User Id", "type": "integer"},
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.5K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_sql_databases/test_sql_databases_py310.py

                                    }
                                },
                            },
                        },
                        "summary": "Create Item For User",
                        "operationId": "create_item_for_user_users__user_id__items__post",
                        "parameters": [
                            {
                                "required": True,
                                "schema": {"title": "User Id", "type": "integer"},
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.5K bytes
    - Viewed (0)
Back to top