Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 670 for float (0.18 sec)

  1. docs_src/body_multiple_params/tutorial005.py

    from typing import Union
    
    from fastapi import Body, FastAPI
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(item_id: int, item: Item = Body(embed=True)):
        results = {"item_id": item_id, "item": item}
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 407 bytes
    - Viewed (0)
  2. docs_src/body/tutorial004_py310.py

    from fastapi import FastAPI
    from pydantic import BaseModel
    
    
    class Item(BaseModel):
        name: str
        description: str | None = None
        price: float
        tax: float | None = None
    
    
    app = FastAPI()
    
    
    @app.put("/items/{item_id}")
    async def update_item(item_id: int, item: Item, q: str | None = None):
        result = {"item_id": item_id, **item.dict()}
        if q:
            result.update({"q": q})
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Jan 09 14:28:58 GMT 2024
    - 408 bytes
    - Viewed (0)
  3. build-logic/binary-compatibility/src/test/kotlin/gradlebuild/binarycompatibility/KotlinModifiersChangeTest.kt

                    operator fun Boolean.invoke(some: Int) {}
    
                    fun String.invoke(some: Int) {}
                    operator fun Long.invoke(some: Int) {}
    
                    fun Float.invoke(some: Int) {}
                    infix fun Byte.invoke(some: Int) {}
    
                    interface Source {
                        infix fun String.plus(some: List<Int>): String
    Plain Text
    - Registered: Wed May 01 11:36:15 GMT 2024
    - Last Modified: Wed Dec 09 08:14:05 GMT 2020
    - 2.6K bytes
    - Viewed (0)
  4. docs_src/body_multiple_params/tutorial002_py310.py

    from fastapi import FastAPI
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: str | None = None
        price: float
        tax: float | None = None
    
    
    class User(BaseModel):
        username: str
        full_name: str | None = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(item_id: int, item: Item, user: User):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 446 bytes
    - Viewed (0)
  5. docs_src/body_nested_models/tutorial005.py

    app = FastAPI()
    
    
    class Image(BaseModel):
        url: HttpUrl
        name: str
    
    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
        tags: Set[str] = set()
        image: Union[Image, None] = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(item_id: int, item: Item):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 517 bytes
    - Viewed (0)
  6. docs_src/body_nested_models/tutorial005_py39.py

    app = FastAPI()
    
    
    class Image(BaseModel):
        url: HttpUrl
        name: str
    
    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
        tags: set[str] = set()
        image: Union[Image, None] = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(item_id: int, item: Item):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 512 bytes
    - Viewed (0)
  7. docs_src/response_model/tutorial001_01_py39.py

    from typing import Union
    
    from fastapi import FastAPI
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
        tags: list[str] = []
    
    
    @app.post("/items/")
    async def create_item(item: Item) -> Item:
        return item
    
    
    @app.get("/items/")
    async def read_items() -> list[Item]:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Jan 07 13:45:48 GMT 2023
    - 507 bytes
    - Viewed (0)
  8. api/go1.5.txt

    pkg math/big, method (*Float) Mode() RoundingMode
    pkg math/big, method (*Float) Mul(*Float, *Float) *Float
    pkg math/big, method (*Float) Neg(*Float) *Float
    pkg math/big, method (*Float) Parse(string, int) (*Float, int, error)
    pkg math/big, method (*Float) Prec() uint
    pkg math/big, method (*Float) Quo(*Float, *Float) *Float
    pkg math/big, method (*Float) Rat(*Rat) (*Rat, Accuracy)
    pkg math/big, method (*Float) Set(*Float) *Float
    Plain Text
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Jul 30 21:14:09 GMT 2015
    - 46.6K bytes
    - Viewed (0)
  9. docs_src/schema_extra_example/tutorial003_an_py39.py

    from fastapi import Body, FastAPI
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(
        item_id: int,
        item: Annotated[
            Item,
            Body(
                examples=[
                    {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 692 bytes
    - Viewed (0)
  10. docs_src/schema_extra_example/tutorial001.py

    from typing import Union
    
    from fastapi import FastAPI
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
    
        model_config = {
            "json_schema_extra": {
                "examples": [
                    {
                        "name": "Foo",
                        "description": "A very nice Item",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 684 bytes
    - Viewed (0)
Back to top