Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 79 for Sall (0.33 sec)

  1. fastapi/background.py

        ```
        """
    
        def add_task(
            self,
            func: Annotated[
                Callable[P, Any],
                Doc(
                    """
                    The function to call after the response is sent.
    
                    It can be a regular `def` function or an `async def` function.
                    """
                ),
            ],
            *args: P.args,
            **kwargs: P.kwargs,
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  2. ci/official/wheel_test/test_import_api_packages.py

    # Copyright 2023 The TensorFlow Authors. All Rights Reserved.
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    #
    #     http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    Python
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Wed Sep 13 15:52:07 GMT 2023
    - 3.3K bytes
    - Viewed (0)
  3. fastapi/security/open_id_connect_url.py

                openIdConnectUrl=openIdConnectUrl, description=description
            )
            self.scheme_name = scheme_name or self.__class__.__name__
            self.auto_error = auto_error
    
        async def __call__(self, request: Request) -> Optional[str]:
            authorization = request.headers.get("Authorization")
            if not authorization:
                if self.auto_error:
                    raise HTTPException(
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 2.7K bytes
    - Viewed (0)
  4. tests/test_custom_middleware_exception.py

                            "code": 999,
                            "message": "File limit exceeded",
                        },
                    )
                return message
    
            return inner
    
        async def __call__(self, scope, receive, send):
            if scope["type"] != "http" or self.max_content_size is None:
                await self.app(scope, receive, send)
                return
    
            wrapper = self.receive_wrapper(receive)
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Aug 25 21:44:40 GMT 2022
    - 2.8K bytes
    - Viewed (0)
  5. 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)
  6. configure.py

                'from distutils.sysconfig import get_python_lib;'
                'print(get_python_lib())'
            ])
        ]
    
      all_paths = set(python_paths + library_paths)
      # Sort set so order is deterministic
      all_paths = sorted(all_paths)
    
      paths = []
      for path in all_paths:
        if os.path.isdir(path):
          paths.append(path)
      return paths
    
    
    def get_python_major_version(python_bin_path):
    Python
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 18:25:36 GMT 2024
    - 53.8K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_path_operation_configurations/test_tutorial005.py

                                    }
                                },
                            },
                        },
                        "summary": "Create an item",
                        "description": "Create an item with all the information:\n\n- **name**: each item must have a name\n- **description**: a long description\n- **price**: required\n- **tax**: if the item doesn't have tax, you can omit this\n- **tags**: a set of unique tag strings for this item",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Sep 28 04:14:40 GMT 2023
    - 8.7K bytes
    - Viewed (0)
  8. docs_src/sql_databases/sql_app_py39/main.py

    from fastapi import Depends, FastAPI, HTTPException
    from sqlalchemy.orm import Session
    
    from . import crud, models, schemas
    from .database import SessionLocal, engine
    
    models.Base.metadata.create_all(bind=engine)
    
    app = FastAPI()
    
    
    # Dependency
    def get_db():
        db = SessionLocal()
        try:
            yield db
        finally:
            db.close()
    
    
    @app.post("/users/", response_model=schemas.User)
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 1.6K bytes
    - Viewed (0)
  9. docs_src/sql_databases/sql_app_py39/alt_main.py

    from .database import SessionLocal, engine
    
    models.Base.metadata.create_all(bind=engine)
    
    app = FastAPI()
    
    
    @app.middleware("http")
    async def db_session_middleware(request: Request, call_next):
        response = Response("Internal server error", status_code=500)
        try:
            request.state.db = SessionLocal()
            response = await call_next(request)
        finally:
            request.state.db.close()
        return response
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 1.9K bytes
    - Viewed (0)
  10. docs_src/path_operation_configuration/tutorial003_py310.py

        price: float
        tax: 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: Fri Jan 07 14:11:31 GMT 2022
    - 474 bytes
    - Viewed (0)
Back to top