Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for Sall (0.28 sec)

  1. docs_src/extra_models/tutorial003.py

        type: str
    
    
    class CarItem(BaseItem):
        type: str = "car"
    
    
    class PlaneItem(BaseItem):
        type: str = "plane"
        size: int
    
    
    items = {
        "item1": {"description": "All my friends drive a low rider", "type": "car"},
        "item2": {
            "description": "Music is my aeroplane, it's my aeroplane",
            "type": "plane",
            "size": 5,
        },
    }
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 644 bytes
    - Viewed (1)
  2. docs_src/path_operation_configuration/tutorial003.py

        price: float
        tax: Union[float, None] = None
        tags: Set[str] = set()
    
    
    @app.post(
        "/items/",
        response_model=Item,
        summary="Create an item",
        description="Create an item with all the information, name, description, price, tax and a set of unique tags",
    )
    async def create_item(item: Item):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 517 bytes
    - Viewed (0)
  3. docs_src/security/tutorial003.py

    
    def get_user(db, username: str):
        if username in db:
            user_dict = db[username]
            return UserInDB(**user_dict)
    
    
    def fake_decode_token(token):
        # This doesn't provide any security at all
        # Check the next version
        user = get_user(fake_users_db, token)
        return user
    
    
    async def get_current_user(token: str = Depends(oauth2_scheme)):
        user = fake_decode_token(token)
        if not user:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 2.4K bytes
    - Viewed (0)
Back to top