Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1281 - 1290 of 1,977 for Fastapi (0.05 sec)

  1. docs/vi/docs/tutorial/index.md

    ---
    
    ## Cài đặt FastAPI
    
    Bước đầu tiên là cài đặt FastAPI.
    
    Với hướng dẫn này, bạn có thể muốn cài đặt nó với tất cả các phụ thuộc và tính năng tùy chọn:
    
    <div class="termy">
    
    ```console
    $ pip install "fastapi[all]"
    
    ---> 100%
    ```
    
    </div>
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Aug 06 04:48:30 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  2. docs/de/docs/tutorial/security/simple-oauth2.md

    * Ein optionales `client_secret` (benötigen wir für unser Beispiel nicht).
    
    /// info
    
    `OAuth2PasswordRequestForm` ist keine spezielle Klasse für **FastAPI**, so wie `OAuth2PasswordBearer`.
    
    `OAuth2PasswordBearer` lässt **FastAPI** wissen, dass es sich um ein Sicherheitsschema handelt. Daher wird es auf diese Weise zu OpenAPI hinzugefügt.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  3. fastapi/cli.py

    except ImportError:  # pragma: no cover
        cli_main = None  # type: ignore
    
    
    def main() -> None:
        if not cli_main:  # type: ignore[truthy-function]
            message = 'To use the fastapi command, please install "fastapi[standard]":\n\n\tpip install "fastapi[standard]"\n'
            print(message)
            raise RuntimeError(message)  # noqa: B904
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Aug 02 06:03:05 UTC 2024
    - 418 bytes
    - Viewed (0)
  4. docs_src/body_nested_models/tutorial002_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.put("/items/{item_id}")
    async def update_item(item_id: int, item: Item):
        results = {"item_id": item_id, "item": item}
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat May 14 11:59:59 UTC 2022
    - 407 bytes
    - Viewed (0)
  5. docs_src/header_param_models/tutorial001_an.py

    from typing import List, Union
    
    from fastapi import FastAPI, Header
    from pydantic import BaseModel
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    class CommonHeaders(BaseModel):
        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
    - 446 bytes
    - Viewed (0)
  6. docs_src/header_param_models/tutorial002_pv1_an_py39.py

    from typing import Annotated, Union
    
    from fastapi import FastAPI, Header
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class CommonHeaders(BaseModel):
        class 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/")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Sep 17 18:54:10 UTC 2024
    - 455 bytes
    - Viewed (0)
  7. docs_src/query_param_models/tutorial001_py310.py

    from typing import Literal
    
    from fastapi import FastAPI, Query
    from pydantic import BaseModel, Field
    
    app = FastAPI()
    
    
    class FilterParams(BaseModel):
        limit: int = Field(100, gt=0, le=100)
        offset: int = Field(0, ge=0)
        order_by: Literal["created_at", "updated_at"] = "created_at"
        tags: list[str] = []
    
    
    @app.get("/items/")
    async def read_items(filter_query: FilterParams = Query()):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Sep 17 18:54:10 UTC 2024
    - 422 bytes
    - Viewed (0)
  8. docs/em/docs/tutorial/path-params-numeric-validations.md

    # ➡ 🔢 &amp; 🔢 🔬
    
    🎏 🌌 👈 👆 💪 📣 🌅 🔬 &amp; 🗃 🔢 🔢 ⏮️ `Query`, 👆 💪 📣 🎏 🆎 🔬 &amp; 🗃 ➡ 🔢 ⏮️ `Path`.
    
    ## 🗄 ➡
    
    🥇, 🗄 `Path` ⚪️➡️ `fastapi`:
    
    //// tab | 🐍 3️⃣.6️⃣ &amp; 🔛
    
    ```Python hl_lines="3"
    {!> ../../docs_src/path_params_numeric_validations/tutorial001.py!}
    ```
    
    ////
    
    //// tab | 🐍 3️⃣.1️⃣0️⃣ &amp; 🔛
    
    ```Python hl_lines="1"
    {!> ../../docs_src/path_params_numeric_validations/tutorial001_py310.py!}
    ```
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  9. docs_src/background_tasks/tutorial001.py

    from fastapi import BackgroundTasks, FastAPI
    
    app = FastAPI()
    
    
    def write_notification(email: str, message=""):
        with open("log.txt", mode="w") as email_file:
            content = f"notification for {email}: {message}"
            email_file.write(content)
    
    
    @app.post("/send-notification/{email}")
    async def send_notification(email: str, background_tasks: BackgroundTasks):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Mar 26 19:09:53 UTC 2020
    - 519 bytes
    - Viewed (0)
  10. docs_src/request_files/tutorial001_02_py310.py

    from fastapi import FastAPI, File, UploadFile
    
    app = FastAPI()
    
    
    @app.post("/files/")
    async def create_file(file: bytes | None = File(default=None)):
        if not file:
            return {"message": "No file sent"}
        else:
            return {"file_size": len(file)}
    
    
    @app.post("/uploadfile/")
    async def create_upload_file(file: UploadFile | None = None):
        if not file:
            return {"message": "No upload file sent"}
        else:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri May 13 23:38:22 UTC 2022
    - 470 bytes
    - Viewed (0)
Back to top