Search Options

Results per page
Sort
Preferred Languages
Advance

Results 971 - 980 of 1,929 for FastAPI (0.05 sec)

  1. docs_src/body_multiple_params/tutorial004_an.py

    from typing import Union
    
    from fastapi import Body, FastAPI
    from pydantic import BaseModel
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
    
    
    class User(BaseModel):
        username: str
        full_name: Union[str, None] = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 703 bytes
    - Viewed (0)
  2. docs_src/body_multiple_params/tutorial004_an_py39.py

    from typing import Annotated, Union
    
    from fastapi import Body, FastAPI
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
    
    
    class User(BaseModel):
        username: str
        full_name: Union[str, None] = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(
        *,
        item_id: int,
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 674 bytes
    - Viewed (0)
  3. docs_src/dependencies/tutorial008b.py

    from fastapi import Depends, FastAPI, HTTPException
    
    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:
            raise HTTPException(status_code=400, detail=f"Owner error: {e}")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Dec 26 20:37:34 UTC 2023
    - 735 bytes
    - Viewed (0)
  4. docs_src/dependencies/tutorial008d_an.py

    from fastapi import Depends, FastAPI, HTTPException
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    class InternalError(Exception):
        pass
    
    
    def get_username():
        try:
            yield "Rick"
        except InternalError:
            print("We don't swallow the internal error here, we raise again 😎")
            raise
    
    
    @app.get("/items/{item_id}")
    def get_item(item_id: str, username: Annotated[str, Depends(get_username)]):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Feb 24 23:06:37 UTC 2024
    - 744 bytes
    - Viewed (0)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. docs/ko/docs/advanced/index.md

    메인 [μžμŠ΅μ„œ - μ‚¬μš©μž μ•ˆλ‚΄μ„œ](../tutorial/index.md){.internal-link target=_blank}λŠ” μ—¬λŸ¬λΆ„μ΄ **FastAPI**의 λͺ¨λ“  μ£Όμš” κΈ°λŠ₯을 λ‘˜λŸ¬λ³΄μ‹œκΈ°μ— μΆ©λΆ„ν•  κ²ƒμž…λ‹ˆλ‹€.
    
    μ΄μ–΄μ§€λŠ” μž₯μ—μ„œλŠ” μ—¬λŸ¬λΆ„μ΄ λ‹€λ₯Έ μ˜΅μ…˜, ꡬ성 및 μΆ”κ°€ κΈ°λŠ₯을 보싀 수 μžˆμŠ΅λ‹ˆλ‹€.
    
    /// tip | "팁"
    
    λ‹€μŒ μž₯듀이 **λ°˜λ“œμ‹œ "심화"**인 것은 μ•„λ‹™λ‹ˆλ‹€.
    
    그리고 μ—¬λŸ¬λΆ„μ˜ μ‚¬μš© 사둀에 λŒ€ν•œ 해결책이 그쀑 ν•˜λ‚˜μ— μžˆμ„ 수 μžˆμŠ΅λ‹ˆλ‹€.
    
    ///
    
    ## μžμŠ΅μ„œλ₯Ό λ¨Όμ € μ½μœΌμ‹­μ‹œμ˜€
    
    μ—¬λŸ¬λΆ„μ€ 메인 [μžμŠ΅μ„œ - μ‚¬μš©μž μ•ˆλ‚΄μ„œ](../tutorial/index.md){.internal-link target=_blank}의 μ§€μ‹μœΌλ‘œ **FastAPI**의 λŒ€λΆ€λΆ„μ˜ κΈ°λŠ₯을 μ‚¬μš©ν•˜μ‹€ 수 μžˆμŠ΅λ‹ˆλ‹€.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Aug 06 04:48:30 UTC 2024
    - 1.4K bytes
    - Viewed (0)
Back to top