Search Options

Results per page
Sort
Preferred Languages
Advance

Results 541 - 550 of 1,074 for Str (0.03 sec)

  1. docs_src/header_params/tutorial003_an.py

    from typing import List, Union
    
    from fastapi import FastAPI, Header
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(x_token: Annotated[Union[List[str], None], Header()] = None):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 269 bytes
    - Viewed (0)
  2. docs_src/python_types/tutorial008b.py

    from typing import Union
    
    
    def process_item(item: Union[int, str]):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jan 07 14:11:31 UTC 2022
    - 84 bytes
    - Viewed (0)
  3. docs_src/python_types/tutorial007_py39.py

    def process_items(items_t: tuple[int, int, str], items_s: set[bytes]):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jan 07 14:11:31 UTC 2022
    - 99 bytes
    - Viewed (0)
  4. docs_src/query_params_str_validations/tutorial006_an_py39.py

    from typing import Annotated
    
    from fastapi import FastAPI, Query
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(q: Annotated[str, Query(min_length=3)]):
        results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
        if q:
            results.update({"q": q})
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 294 bytes
    - Viewed (0)
  5. docs_src/query_params_str_validations/tutorial006d_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)] = ...):
        results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
        if q:
            results.update({"q": q})
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Oct 12 09:36:32 UTC 2024
    - 310 bytes
    - Viewed (0)
  6. docs_src/handling_errors/tutorial001.py

    from fastapi import FastAPI, HTTPException
    
    app = FastAPI()
    
    items = {"foo": "The Foo Wrestlers"}
    
    
    @app.get("/items/{item_id}")
    async def read_item(item_id: str):
        if item_id not in items:
            raise HTTPException(status_code=404, detail="Item not found")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Mar 26 19:09:53 UTC 2020
    - 299 bytes
    - Viewed (0)
  7. docs_src/path_params_numeric_validations/tutorial002.py

    from fastapi import FastAPI, Path
    
    app = FastAPI()
    
    
    @app.get("/items/{item_id}")
    async def read_items(q: str, item_id: int = Path(title="The ID of the item to get")):
        results = {"item_id": item_id}
        if q:
            results.update({"q": q})
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri May 13 23:38:22 UTC 2022
    - 265 bytes
    - Viewed (0)
  8. docs_src/request_forms_and_files/tutorial001_an.py

    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    @app.post("/files/")
    async def create_file(
        file: Annotated[bytes, File()],
        fileb: Annotated[UploadFile, File()],
        token: Annotated[str, Form()],
    ):
        return {
            "file_size": len(file),
            "token": token,
            "fileb_content_type": fileb.content_type,
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 396 bytes
    - Viewed (0)
  9. src/main/java/jcifs/internal/dtyp/ACE.java

            bi += 4;
            this.sid = new SID(buf, bi);
            return size;
        }
    
    
        void appendCol ( StringBuffer sb, String str, int width ) {
            sb.append(str);
            int count = width - str.length();
            for ( int i = 0; i < count; i++ ) {
                sb.append(' ');
            }
        }
    
    
        /**
         * Return a string represeting this ACE.
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Sun Jul 01 13:12:10 UTC 2018
    - 5.4K bytes
    - Viewed (0)
  10. docs_src/schema_extra_example/tutorial005_an_py310.py

    from typing import Annotated
    
    from fastapi import Body, FastAPI
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: str | None = None
        price: float
        tax: float | None = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(
        *,
        item_id: int,
        item: Annotated[
            Item,
            Body(
                openapi_examples={
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Aug 26 18:03:13 UTC 2023
    - 1.5K bytes
    - Viewed (0)
Back to top