Search Options

Results per page
Sort
Preferred Languages
Advance

Results 981 - 990 of 1,962 for fastapi (0.05 sec)

  1. docs_src/dependencies/tutorial012_an.py

    from fastapi import Depends, FastAPI, Header, HTTPException
    from typing_extensions import Annotated
    
    
    async def verify_token(x_token: Annotated[str, Header()]):
        if x_token != "fake-super-secret-token":
            raise HTTPException(status_code=400, detail="X-Token header invalid")
    
    
    async def verify_key(x_key: Annotated[str, Header()]):
        if x_key != "fake-super-secret-key":
            raise HTTPException(status_code=400, detail="X-Key header invalid")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 756 bytes
    - Viewed (0)
  2. docs_src/metadata/tutorial001_1.py

    from fastapi import FastAPI
    
    description = """
    ChimichangApp API helps you do awesome stuff. ๐Ÿš€
    
    ## Items
    
    You can **read items**.
    
    ## Users
    
    You will be able to:
    
    * **Create users** (_not implemented_).
    * **Read users** (_not implemented_).
    """
    
    app = FastAPI(
        title="ChimichangApp",
        description=description,
        summary="Deadpool's favorite app. Nuff said.",
        version="0.0.1",
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 767 bytes
    - Viewed (0)
  3. docs_src/path_operation_advanced_configuration/tutorial007.py

    from typing import List
    
    import yaml
    from fastapi import FastAPI, HTTPException, Request
    from pydantic import BaseModel, ValidationError
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        tags: List[str]
    
    
    @app.post(
        "/items/",
        openapi_extra={
            "requestBody": {
                "content": {"application/x-yaml": {"schema": Item.model_json_schema()}},
                "required": True,
            },
        },
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 822 bytes
    - Viewed (0)
  4. docs/de/docs/learn/index.md

    # Lernen
    
    Hier finden Sie die einfรผhrenden Kapitel und Tutorials zum Erlernen von **FastAPI**.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Jan 23 11:22:17 UTC 2024
    - 227 bytes
    - Viewed (0)
  5. docs_src/security/tutorial005_py39.py

    from datetime import datetime, timedelta, timezone
    from typing import Union
    
    import jwt
    from fastapi import Depends, FastAPI, HTTPException, Security, status
    from fastapi.security import (
        OAuth2PasswordBearer,
        OAuth2PasswordRequestForm,
        SecurityScopes,
    )
    from jwt.exceptions import InvalidTokenError
    from passlib.context import CryptContext
    from pydantic import BaseModel, ValidationError
    
    # to get a string like this run:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Mon May 20 17:37:28 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  6. docs_src/dependencies/tutorial008b_an.py

    from fastapi import Depends, FastAPI, HTTPException
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    data = {
        "plumbus": {"description": "Freshly pickled plumbus", "owner": "Morty"},
        "portal-gun": {"description": "Gun to create portals", "owner": "Rick"},
    }
    
    
    class OwnerError(Exception):
        pass
    
    
    def get_username():
        try:
            yield "Rick"
        except OwnerError as e:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Dec 26 20:37:34 UTC 2023
    - 785 bytes
    - Viewed (0)
  7. docs_src/response_model/tutorial006_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 = 10.5
    
    
    items = {
        "foo": {"name": "Foo", "price": 50.2},
        "bar": {"name": "Bar", "description": "The Bar fighters", "price": 62, "tax": 20.2},
        "baz": {
            "name": "Baz",
            "description": "There goes my baz",
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jan 07 14:11:31 UTC 2022
    - 816 bytes
    - Viewed (0)
  8. docs/pt/docs/learn/index.md

    # Aprender
    
    Nesta parte da documentaรงรฃo encontramos as seรงรตes introdutรณrias e os tutoriais para aprendermos como usar o **FastAPI**.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 04 14:20:02 UTC 2024
    - 261 bytes
    - Viewed (0)
  9. docs/em/docs/async.md

    , ๐Ÿ”ƒ ๐Ÿฅš & ๐Ÿ”, โ” ๐Ÿ‘† ๐Ÿค™ ๐Ÿฅ‡ `async` ๐Ÿ”ข โ“
    
    ๐Ÿšฅ ๐Ÿ‘† ๐Ÿ‘ท โฎ๏ธ **FastAPI** ๐Ÿ‘† ๐Ÿšซ โœ”๏ธ ๐Ÿ˜Ÿ ๐Ÿ”ƒ ๐Ÿ‘ˆ, โ†ฉ๏ธ ๐Ÿ‘ˆ "๐Ÿฅ‡" ๐Ÿ”ข ๐Ÿ”œ ๐Ÿ‘† *โžก ๐Ÿ› ๏ธ ๐Ÿ”ข*, & FastAPI ๐Ÿ”œ ๐Ÿ’ญ โ” โ–ถ๏ธ๏ธ ๐Ÿ‘œ.
    
    โœ‹๏ธ ๐Ÿšฅ ๐Ÿ‘† ๐Ÿ’š โš™๏ธ `async` / `await` ๐Ÿต FastAPI, ๐Ÿ‘† ๐Ÿ’ช โšซ๏ธ ๐Ÿ‘.
    
    ### โœ ๐Ÿ‘† ๐Ÿ‘ ๐Ÿ” ๐Ÿ“Ÿ
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Aug 06 04:48:30 UTC 2024
    - 18.7K bytes
    - Viewed (0)
  10. docs/ja/docs/advanced/websockets.md

    ```Python hl_lines="2  6-38  41-43"
    {!../../docs_src/websockets/tutorial001.py!}
    ```
    
    ## `websocket` ใ‚’ไฝœๆˆใ™ใ‚‹
    
    **FastAPI** ใ‚ขใƒ—ใƒชใ‚ฑใƒผใ‚ทใƒงใƒณใงใ€`websocket` ใ‚’ไฝœๆˆใ—ใพใ™ใ€‚
    
    ```Python hl_lines="1  46-47"
    {!../../docs_src/websockets/tutorial001.py!}
    ```
    
    /// note | "ๆŠ€่ก“่ฉณ็ดฐ"
    
    `from starlette.websockets import WebSocket` ใ‚’ไฝฟ็”จใ—ใฆใ‚‚ๆง‹ใ„ใพใ›ใ‚“.
    
    **FastAPI** ใฏ้–‹็™บ่€…ใฎๅˆฉไพฟๆ€งใฎใŸใ‚ใซใ€ๅŒใ˜ `WebSocket` ใ‚’ๆไพ›ใ—ใพใ™ใ€‚ใ—ใ‹ใ—ใ€ใ“ใกใ‚‰ใฏStarletteใ‹ใ‚‰็›ดๆŽฅๆไพ›ใ•ใ‚Œใ‚‹ใ‚‚ใฎใงใ™ใ€‚
    
    ///
    
    ## ใƒกใƒƒใ‚ปใƒผใ‚ธใฎ้€ๅ—ไฟก
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 7.2K bytes
    - Viewed (0)
Back to top