Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 932 for _id (0.19 sec)

  1. docs_src/body_updates/tutorial002_py310.py

    }
    
    
    @app.get("/items/{item_id}", response_model=Item)
    async def read_item(item_id: str):
        return items[item_id]
    
    
    @app.patch("/items/{item_id}", response_model=Item)
    async def update_item(item_id: str, item: Item):
        stored_item_data = items[item_id]
        stored_item_model = Item(**stored_item_data)
        update_data = item.dict(exclude_unset=True)
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 1010 bytes
    - Viewed (0)
  2. tests/main.py

        return "Hello World"
    
    
    @app.get("/path/{item_id}")
    def get_id(item_id):
        return item_id
    
    
    @app.get("/path/str/{item_id}")
    def get_str_id(item_id: str):
        return item_id
    
    
    @app.get("/path/int/{item_id}")
    def get_int_id(item_id: int):
        return item_id
    
    
    @app.get("/path/float/{item_id}")
    def get_float_id(item_id: float):
        return item_id
    
    
    @app.get("/path/bool/{item_id}")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 21:56:59 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  3. docs_src/sql_databases/sql_app/main.py

        return users
    
    
    @app.get("/users/{user_id}", response_model=schemas.User)
    def read_user(user_id: int, db: Session = Depends(get_db)):
        db_user = crud.get_user(db, user_id=user_id)
        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(
    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)
  4. tests/test_path.py

                        "loc": ["path", "item_id"],
                        "msg": "Input should be a valid integer, unable to parse string as an integer",
                        "input": "foobar",
                    }
                ]
            }
        ) | IsDict(
            # TODO: remove when deprecating Pydantic v1
            {
                "detail": [
                    {
                        "loc": ["path", "item_id"],
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 34.4K bytes
    - Viewed (0)
  5. tensorflow/c/eager/tape.h

      while (!tensor_stack.empty()) {
        int64_t tensor_id = tensor_stack.back();
        tensor_stack.pop_back();
        auto op_id_it = tensor_tape.find(tensor_id);
        if (op_id_it == tensor_tape.end()) {
          continue;
        }
        int64_t op_id = op_id_it->second;
        auto op_it = op_tape->find(op_id);
        auto result_op_it = result.op_tape.find(op_id);
        if (op_id == -1 || op_it == op_tape->end() ||
    C
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Tue Apr 02 12:40:29 GMT 2024
    - 47.2K bytes
    - Viewed (1)
  6. docs_src/dependencies/tutorial008c.py

            print("Oops, we didn't raise again, Britney 😱")
    
    
    @app.get("/items/{item_id}")
    def get_item(item_id: str, username: str = Depends(get_username)):
        if item_id == "portal-gun":
            raise InternalError(
                f"The portal gun is too dangerous to be owned by {username}"
            )
        if item_id != "plumbus":
            raise HTTPException(
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 660 bytes
    - Viewed (0)
  7. docs_src/additional_status_codes/tutorial001_an_py39.py

    items = {"foo": {"name": "Fighters", "size": 6}, "bar": {"name": "Tenders", "size": 3}}
    
    
    @app.put("/items/{item_id}")
    async def upsert_item(
        item_id: str,
        name: Annotated[Union[str, None], Body()] = None,
        size: Annotated[Union[int, None], Body()] = None,
    ):
        if item_id in items:
            item = items[item_id]
            item["name"] = name
            item["size"] = size
            return item
        else:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 705 bytes
    - Viewed (0)
  8. docs_src/bigger_applications/app/routers/items.py

    @router.get("/")
    async def read_items():
        return fake_items_db
    
    
    @router.get("/{item_id}")
    async def read_item(item_id: str):
        if item_id not in fake_items_db:
            raise HTTPException(status_code=404, detail="Item not found")
        return {"name": fake_items_db[item_id]["name"], "item_id": item_id}
    
    
    @router.put(
        "/{item_id}",
        tags=["custom"],
        responses={403: {"description": "Operation forbidden"}},
    )
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Nov 29 17:32:18 GMT 2020
    - 1011 bytes
    - Viewed (0)
  9. misc/ios/README

    GOIOS_DEV_ID, GOIOS_TEAM_ID and GOIOS_APP_ID. The detect.go program in this directory will
    attempt to auto-detect suitable values. Run it as
    
    	go run detect.go
    
    which will output something similar to
    
    	export GOIOS_DEV_ID="iPhone Developer: ******@****.*** (XXXXXXXX)"
    	export GOIOS_APP_ID=YYYYYYYY.some.bundle.id
    	export GOIOS_TEAM_ID=ZZZZZZZZ
    
    Plain Text
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Dec 29 21:49:26 GMT 2020
    - 2.7K bytes
    - Viewed (0)
  10. docs_src/sql_databases/sql_app_py39/main.py

        return users
    
    
    @app.get("/users/{user_id}", response_model=schemas.User)
    def read_user(user_id: int, db: Session = Depends(get_db)):
        db_user = crud.get_user(db, user_id=user_id)
        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(
    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)
Back to top