Search Options

Results per page
Sort
Preferred Languages
Advance

Results 921 - 930 of 1,169 for def2 (0.02 sec)

  1. docs_src/path_operation_configuration/tutorial004_py39.py

        name: str
        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
        tags: set[str] = set()
    
    
    @app.post("/items/", response_model=Item, summary="Create an item")
    async def create_item(item: Item):
        """
        Create an item with all the information:
    
        - **name**: each item must have a name
        - **description**: a long description
        - **price**: required
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat May 14 11:59:59 UTC 2022
    - 676 bytes
    - Viewed (0)
  2. docs_src/schema_extra_example/tutorial004.py

    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(
            examples=[
                {
                    "name": "Foo",
                    "description": "A very nice Item",
                    "price": 35.4,
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Jul 01 16:43:29 UTC 2023
    - 824 bytes
    - Viewed (0)
  3. tests/test_tutorial/test_background_tasks/test_tutorial001.py

    import os
    from pathlib import Path
    
    from fastapi.testclient import TestClient
    
    from docs_src.background_tasks.tutorial001 import app
    
    client = TestClient(app)
    
    
    def test():
        log = Path("log.txt")
        if log.is_file():
            os.remove(log)  # pragma: no cover
        response = client.post("/send-notification/******@****.***")
        assert response.status_code == 200, response.text
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Jul 09 18:06:12 UTC 2020
    - 578 bytes
    - Viewed (0)
  4. src/main/resources/fess_indices/fess/tr/stopwords.txt

    birşey
    birşeyi
    biz
    bize
    bizden
    bizi
    bizim
    böyle
    böylece
    bu
    buna
    bunda
    bundan
    bunlar
    bunları
    bunların
    bunu
    bunun
    burada
    çok
    çünkü
    da
    daha
    dahi
    de
    defa
    değil
    diğer
    diye
    doksan
    dokuz
    dolayı
    dolayısıyla
    dört
    edecek
    eden
    ederek
    edilecek
    ediliyor
    edilmesi
    ediyor
    eğer
    elli
    en
    etmesi
    etti
    ettiği
    ettiğini
    gibi
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Thu Jul 19 06:31:02 UTC 2018
    - 1.5K bytes
    - Viewed (0)
  5. docs_src/body_multiple_params/tutorial001_an_py310.py

    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: Annotated[int, Path(title="The ID of the item to get", ge=0, le=1000)],
        q: str | None = None,
        item: Item | None = None,
    ):
        results = {"item_id": item_id}
        if q:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 579 bytes
    - Viewed (0)
  6. tests/test_tutorial/test_background_tasks/test_tutorial002_an.py

    import os
    from pathlib import Path
    
    from fastapi.testclient import TestClient
    
    from docs_src.background_tasks.tutorial002_an import app
    
    client = TestClient(app)
    
    
    def test():
        log = Path("log.txt")
        if log.is_file():
            os.remove(log)  # pragma: no cover
        response = client.post("/send-notification/******@****.***?q=some-query")
        assert response.status_code == 200, response.text
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 571 bytes
    - Viewed (0)
  7. build-logic/binary-compatibility/src/main/groovy/gradlebuild/binarycompatibility/AcceptedApiChangesJsonFileManager.groovy

    import com.google.gson.Gson
    import com.google.gson.stream.JsonWriter
    
    class AcceptedApiChangesJsonFileManager {
    
        void emptyAcceptedApiChanges(File jsonFile) {
            jsonFile.withWriter { fileWriter ->
                def writer = new JsonWriter(fileWriter)
                writer.setIndent("    ")
                new Gson().toJson([acceptedApiChanges: []], Object, writer)
                writer.close()
            }
        }
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Wed Dec 09 08:14:05 UTC 2020
    - 1K bytes
    - Viewed (0)
  8. pdm_build.py

    import os
    from typing import Any, Dict
    
    from pdm.backend.hooks import Context
    
    TIANGOLO_BUILD_PACKAGE = os.getenv("TIANGOLO_BUILD_PACKAGE", "fastapi")
    
    
    def pdm_build_initialize(context: Context) -> None:
        metadata = context.config.metadata
        # Get custom config for the current package, from the env var
        config: Dict[str, Any] = context.config.data["tool"]["tiangolo"][
            "_internal-slim-build"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Aug 02 06:03:05 UTC 2024
    - 697 bytes
    - Viewed (0)
  9. docs_src/path_operation_advanced_configuration/tutorial007_pv1.py

    
    @app.post(
        "/items/",
        openapi_extra={
            "requestBody": {
                "content": {"application/x-yaml": {"schema": Item.schema()}},
                "required": True,
            },
        },
    )
    async def create_item(request: Request):
        raw_body = await request.body()
        try:
            data = yaml.safe_load(raw_body)
        except yaml.YAMLError:
            raise HTTPException(status_code=422, detail="Invalid YAML")
        try:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 789 bytes
    - Viewed (0)
  10. docs_src/additional_responses/tutorial004.py

    }
    
    
    app = FastAPI()
    
    
    @app.get(
        "/items/{item_id}",
        response_model=Item,
        responses={**responses, 200: {"content": {"image/png": {}}}},
    )
    async def read_item(item_id: str, img: Union[bool, None] = None):
        if img:
            return FileResponse("image.png", media_type="image/png")
        else:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat May 14 11:59:59 UTC 2022
    - 701 bytes
    - Viewed (0)
Back to top