Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 1,005 for Lyding (0.16 sec)

  1. docs_src/body_multiple_params/tutorial003_an.py

    from typing import Union
    
    from fastapi import Body, FastAPI
    from pydantic import BaseModel
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
    
    
    class User(BaseModel):
        username: str
        full_name: Union[str, None] = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 604 bytes
    - Viewed (0)
  2. docs_src/response_model/tutorial003_01.py

    from typing import Union
    
    from fastapi import FastAPI
    from pydantic import BaseModel, EmailStr
    
    app = FastAPI()
    
    
    class BaseUser(BaseModel):
        username: str
        email: EmailStr
        full_name: Union[str, None] = None
    
    
    class UserIn(BaseUser):
        password: str
    
    
    @app.post("/user/")
    async def create_user(user: UserIn) -> BaseUser:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Jan 07 13:45:48 GMT 2023
    - 349 bytes
    - Viewed (0)
  3. cmd/update-notifier.go

    	msgLine2Fmt := " Update: %s "
    
    	// Calculate length *without* color coding: with ANSI terminal
    	// color characters, the result is incorrect.
    	line1Length := len(fmt.Sprintf(msgLine1Fmt, newerThan))
    	line2Length := len(fmt.Sprintf(msgLine2Fmt, updateString))
    
    	// Populate lines with color coding.
    	line1InColor := fmt.Sprintf(msgLine1Fmt, color.YellowBold(newerThan))
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sat Mar 09 03:07:08 GMT 2024
    - 3.6K bytes
    - Viewed (0)
  4. docs_src/query_params_str_validations/tutorial001.py

    from typing import Union
    
    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(q: Union[str, None] = None):
        results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
        if q:
            results.update({"q": q})
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 271 bytes
    - Viewed (0)
  5. docs_src/response_model/tutorial002.py

    from typing import Union
    
    from fastapi import FastAPI
    from pydantic import BaseModel, EmailStr
    
    app = FastAPI()
    
    
    class UserIn(BaseModel):
        username: str
        password: str
        email: EmailStr
        full_name: Union[str, None] = None
    
    
    # Don't do this in production!
    @app.post("/user/")
    async def create_user(user: UserIn) -> UserIn:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Jan 07 13:45:48 GMT 2023
    - 350 bytes
    - Viewed (0)
  6. docs_src/query_params_str_validations/tutorial014_an_py39.py

    from typing import Annotated, Union
    
    from fastapi import FastAPI, Query
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(
        hidden_query: Annotated[Union[str, None], Query(include_in_schema=False)] = None,
    ):
        if hidden_query:
            return {"hidden_query": hidden_query}
        else:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 344 bytes
    - Viewed (0)
  7. docs/de/docs/tutorial/extra-models.md

    Das wird in OpenAPI mit `anyOf` angezeigt.
    
    Um das zu tun, verwenden Sie Pythons Standard-Typhinweis <a href="https://docs.python.org/3/library/typing.html#typing.Union" class="external-link" target="_blank">`typing.Union`</a>:
    
    !!! note "Hinweis"
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 20:26:47 GMT 2024
    - 8.7K bytes
    - Viewed (0)
  8. docs_src/query_params_str_validations/tutorial002.py

    from typing import Union
    
    from fastapi import FastAPI, Query
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(q: Union[str, None] = Query(default=None, max_length=50)):
        results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
        if q:
            results.update({"q": q})
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 308 bytes
    - Viewed (0)
  9. docs_src/path_params_numeric_validations/tutorial003_an.py

    from fastapi import FastAPI, Path
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    @app.get("/items/{item_id}")
    async def read_items(
        item_id: Annotated[int, Path(title="The ID of the item to get")], q: str
    ):
        results = {"item_id": item_id}
        if q:
            results.update({"q": q})
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 321 bytes
    - Viewed (0)
  10. docs_src/query_params_str_validations/tutorial005_an.py

    from fastapi import FastAPI, Query
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(q: Annotated[str, Query(min_length=3)] = "fixedquery"):
        results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
        if q:
            results.update({"q": q})
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 319 bytes
    - Viewed (0)
Back to top