Search Options

Results per page
Sort
Preferred Languages
Advance

Results 161 - 170 of 974 for strl (0.11 sec)

  1. docs/en/docs/tutorial/extra-data-types.md

        * In requests and responses will be represented as a `str`.
    * `datetime.datetime`:
        * A Python `datetime.datetime`.
        * In requests and responses will be represented as a `str` in ISO 8601 format, like: `2008-09-15T15:53:00+05:00`.
    * `datetime.date`:
        * Python `datetime.date`.
        * In requests and responses will be represented as a `str` in ISO 8601 format, like: `2008-09-15`.
    * `datetime.time`:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 4K bytes
    - Viewed (0)
  2. tests/test_skip_defaults.py

    
    class SubModel(BaseModel):
        a: Optional[str] = "foo"
    
    
    class Model(BaseModel):
        x: Optional[int] = None
        sub: SubModel
    
    
    class ModelSubclass(Model):
        y: int
        z: int = 0
        w: Optional[int] = None
    
    
    class ModelDefaults(BaseModel):
        w: Optional[str] = None
        x: Optional[str] = None
        y: str = "y"
        z: str = "z"
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 2K bytes
    - Viewed (0)
  3. docs_src/app_testing/app_b_an_py310/main.py

        "bar": {"id": "bar", "title": "Bar", "description": "The bartenders"},
    }
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        id: str
        title: str
        description: str | None = None
    
    
    @app.get("/items/{item_id}", response_model=Item)
    async def read_main(item_id: str, x_token: Annotated[str, Header()]):
        if x_token != fake_secret_token:
            raise HTTPException(status_code=400, detail="Invalid X-Token header")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Aug 15 22:31:16 UTC 2024
    - 1.1K bytes
    - Viewed (0)
  4. docs/em/docs/tutorial/metadata.md

    โšซ๏ธ โœŠ ๐Ÿ“‡ โš— 1๏ธโƒฃ ๐Ÿ“– ๐Ÿ”  ๐Ÿ”–.
    
    ๐Ÿ”  ๐Ÿ“– ๐Ÿ’ช ๐Ÿ”Œ:
    
    * `name` (**โœ”**): `str` โฎ๏ธ ๐ŸŽ ๐Ÿ“› ๐Ÿ‘† โš™๏ธ `tags` ๐Ÿ”ข ๐Ÿ‘† *โžก ๐Ÿ› ๏ธ* & `APIRouter`โ“‚.
    * `description`: `str` โฎ๏ธ ๐Ÿ“ ๐Ÿ“› ๐Ÿ”–. โšซ๏ธ ๐Ÿ’ช โœ”๏ธ โœ & ๐Ÿ”œ ๐ŸŽฆ ๐Ÿฉบ ๐ŸŽš.
    * `externalDocs`: `dict` ๐Ÿ”ฌ ๐Ÿ”ข ๐Ÿงพ โฎ๏ธ:
        * `description`: `str` โฎ๏ธ ๐Ÿ“ ๐Ÿ“› ๐Ÿ”ข ๐Ÿฉบ.
        * `url` (**โœ”**): `str` โฎ๏ธ ๐Ÿ“› ๐Ÿ”ข ๐Ÿงพ.
    
    ### โœ ๐Ÿ—ƒ ๐Ÿ”–
    
    โžก๏ธ ๐Ÿ”„ ๐Ÿ‘ˆ ๐Ÿ–ผ โฎ๏ธ ๐Ÿ”– `users` & `items`.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  5. docs/ja/docs/tutorial/security/first-steps.md

    ///
    
    ## ใฉใฎใ‚ˆใ†ใซๅ‹•ไฝœใ™ใ‚‹ใ‹
    
    ใƒชใ‚ฏใ‚จใ‚นใƒˆใฎไธญใซ`Authorization`ใƒ˜ใƒƒใƒ€ใƒผใ‚’ๆŽขใ—ใซ่กŒใใ€ใใฎๅ€คใŒ`Bearer`ใจไฝ•ใ‚‰ใ‹ใฎใƒˆใƒผใ‚ฏใƒณใ‚’ๅซใ‚“ใงใ„ใ‚‹ใ‹ใฉใ†ใ‹ใ‚’ใƒใ‚งใƒƒใ‚ฏใ—ใ€ใใฎใƒˆใƒผใ‚ฏใƒณใ‚’`str`ใจใ—ใฆ่ฟ”ใ—ใพใ™ใ€‚
    
    ใ‚‚ใ—`Authorization`ใƒ˜ใƒƒใƒ€ใƒผใŒ่ฆ‹ใคใ‹ใ‚‰ใชใ‹ใฃใŸใ‚Šใ€ๅ€คใŒ`Bearer`ใƒˆใƒผใ‚ฏใƒณใ‚’ๆŒใฃใฆใ„ใชใ‹ใฃใŸใ‚Šใ™ใ‚‹ใจใ€401 ใ‚นใƒ†ใƒผใ‚ฟใ‚นใ‚ณใƒผใƒ‰ใ‚จใƒฉใƒผ (`UNAUTHORIZED`) ใง็›ดๆŽฅๅฟœ็ญ”ใ—ใพใ™ใ€‚
    
    ใƒˆใƒผใ‚ฏใƒณใŒๅญ˜ๅœจใ™ใ‚‹ใ‹ใฉใ†ใ‹ใ‚’ใƒใ‚งใƒƒใ‚ฏใ—ใฆใ‚จใƒฉใƒผใ‚’่ฟ”ใ™ๅฟ…่ฆใฏใ‚ใ‚Šใพใ›ใ‚“ใ€‚้–ขๆ•ฐใŒๅฎŸ่กŒใ•ใ‚ŒใŸๅ ดๅˆใ€ใใฎใƒˆใƒผใ‚ฏใƒณใซ`str`ใŒๅซใพใ‚Œใฆใ„ใ‚‹ใ‹็ขบ่ชใงใใพใ™ใ€‚
    
    ใ‚คใƒณใ‚ฟใƒฉใ‚ฏใƒ†ใ‚ฃใƒ–ใชใƒ‰ใ‚ญใƒฅใƒกใƒณใƒˆใงใ™ใงใซ่ฉฆใ™ใ“ใจใŒใงใใพใ™:
    
    <img src="/img/tutorial/security/image03.png">
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  6. schema/callbacks_test.go

    	if err != nil {
    		t.Fatalf("failed to parse user with callback, got error %v", err)
    	}
    
    	for _, str := range []string{"BeforeSave", "AfterCreate"} {
    		if !reflect.Indirect(reflect.ValueOf(user)).FieldByName(str).Interface().(bool) {
    			t.Errorf("%v should be true", str)
    		}
    	}
    
    	for _, str := range []string{"BeforeCreate", "BeforeUpdate", "AfterUpdate", "AfterSave", "BeforeDelete", "AfterDelete", "AfterFind"} {
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Thu Jan 06 07:02:53 UTC 2022
    - 939 bytes
    - Viewed (0)
  7. docs_src/header_param_models/tutorial002_an.py

    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    class CommonHeaders(BaseModel):
        model_config = {"extra": "forbid"}
    
        host: str
        save_data: bool
        if_modified_since: Union[str, None] = None
        traceparent: Union[str, None] = None
        x_tag: List[str] = []
    
    
    @app.get("/items/")
    async def read_items(headers: Annotated[CommonHeaders, Header()]):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Sep 17 18:54:10 UTC 2024
    - 486 bytes
    - Viewed (0)
  8. 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):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jan 07 14:11:31 UTC 2022
    - 446 bytes
    - Viewed (0)
  9. docs_src/body_nested_models/tutorial006_py310.py

    from fastapi import FastAPI
    from pydantic import BaseModel, HttpUrl
    
    app = FastAPI()
    
    
    class Image(BaseModel):
        url: HttpUrl
        name: str
    
    
    class Item(BaseModel):
        name: str
        description: str | None = None
        price: float
        tax: float | None = None
        tags: set[str] = set()
        images: list[Image] | None = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(item_id: int, item: Item):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jan 07 14:11:31 UTC 2022
    - 475 bytes
    - Viewed (0)
  10. docs_src/dependencies/tutorial005_an.py

    app = FastAPI()
    
    
    def query_extractor(q: Union[str, None] = None):
        return q
    
    
    def query_or_cookie_extractor(
        q: Annotated[str, Depends(query_extractor)],
        last_query: Annotated[Union[str, None], Cookie()] = None,
    ):
        if not q:
            return last_query
        return q
    
    
    @app.get("/items/")
    async def read_query(
        query_or_default: Annotated[str, Depends(query_or_cookie_extractor)],
    ):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Mar 26 16:56:53 UTC 2024
    - 558 bytes
    - Viewed (0)
Back to top