Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 36 for move (0.48 sec)

  1. fastapi/datastructures.py

                int,
                Doc(
                    """
                    The position in bytes to seek to in the file.
                    """
                ),
            ],
        ) -> None:
            """
            Move to a position in the file.
    
            Any next read or write will be done from that position.
    
            To be awaitable, compatible with async, this is run in threadpool.
            """
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  2. docs_src/sql_databases/sql_app/schemas.py

    class Item(ItemBase):
        id: int
        owner_id: int
    
        class Config:
            orm_mode = True
    
    
    class UserBase(BaseModel):
        email: str
    
    
    class UserCreate(UserBase):
        password: str
    
    
    class User(UserBase):
        id: int
        is_active: bool
        items: List[Item] = []
    
        class Config:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 502 bytes
    - Viewed (0)
  3. docs_src/background_tasks/tutorial002_py310.py

    from fastapi import BackgroundTasks, Depends, FastAPI
    
    app = FastAPI()
    
    
    def write_log(message: str):
        with open("log.txt", mode="a") as log:
            log.write(message)
    
    
    def get_query(background_tasks: BackgroundTasks, q: str | None = None):
        if q:
            message = f"found query: {q}\n"
            background_tasks.add_task(write_log, message)
        return q
    
    
    @app.post("/send-notification/{email}")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 643 bytes
    - Viewed (0)
  4. docs_src/additional_responses/tutorial004.py

    from pydantic import BaseModel
    
    
    class Item(BaseModel):
        id: str
        value: str
    
    
    responses = {
        404: {"description": "Item not found"},
        302: {"description": "The item was moved"},
        403: {"description": "Not enough privileges"},
    }
    
    
    app = FastAPI()
    
    
    @app.get(
        "/items/{item_id}",
        response_model=Item,
        responses={**responses, 200: {"content": {"image/png": {}}}},
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 701 bytes
    - Viewed (0)
  5. fastapi/openapi/utils.py

                    operation["callbacks"] = callbacks
                if route.status_code is not None:
                    status_code = str(route.status_code)
                else:
                    # It would probably make more sense for all response classes to have an
                    # explicit default status_code, and to extract it from them, instead of
                    # doing this inspection tricks, that would probably be in the future
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 21.8K bytes
    - Viewed (0)
  6. configure.py

    APPLE_BAZEL_FILES = [
        'tensorflow/lite/ios/BUILD', 'tensorflow/lite/objc/BUILD',
        'tensorflow/lite/swift/BUILD',
        'tensorflow/lite/tools/benchmark/experimental/ios/BUILD'
    ]
    
    # List of files to move when building for iOS.
    IOS_FILES = [
        'tensorflow/lite/objc/TensorFlowLiteObjC.podspec',
        'tensorflow/lite/swift/TensorFlowLiteSwift.podspec',
    ]
    
    
    class UserInputError(Exception):
      pass
    
    
    Python
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 18:25:36 GMT 2024
    - 53.8K bytes
    - Viewed (0)
  7. tests/test_datastructures.py

        file = UploadFile(filename="file", file=stream, size=4)
        assert await file.read() == b"data"
        assert file.size == 4
        await file.write(b" and more data!")
        assert await file.read() == b""
        assert file.size == 19
        await file.seek(0)
        assert await file.read() == b"data and more data!"
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Oct 18 12:36:40 GMT 2023
    - 2K bytes
    - Viewed (0)
  8. docs_src/background_tasks/tutorial002_an.py

    from typing import Union
    
    from fastapi import BackgroundTasks, Depends, FastAPI
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    def write_log(message: str):
        with open("log.txt", mode="a") as log:
            log.write(message)
    
    
    def get_query(background_tasks: BackgroundTasks, q: Union[str, None] = None):
        if q:
            message = f"found query: {q}\n"
            background_tasks.add_task(write_log, message)
        return q
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 725 bytes
    - Viewed (0)
  9. tensorflow/api_template_v1.__init__.py

    # Lazy-load Keras v1.
    _tf_uses_legacy_keras = (
        _os.environ.get("TF_USE_LEGACY_KERAS", None) in ("true", "True", "1"))
    setattr(_current_module, "keras", _KerasLazyLoader(globals(), mode="v1"))
    _module_dir = _module_util.get_parent_dir_for_name("keras._tf_keras.keras")
    _current_module.__path__ = [_module_dir] + _current_module.__path__
    if _tf_uses_legacy_keras:
    Python
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Tue Jan 23 02:14:00 GMT 2024
    - 7.4K bytes
    - Viewed (0)
  10. fastapi/applications.py

                    """
                ),
                deprecated(
                    """
                    "openapi_prefix" has been deprecated in favor of "root_path", which
                    follows more closely the ASGI standard, is simpler, and more
                    automatic.
                    """
                ),
            ] = "",
            root_path: Annotated[
                str,
                Doc(
                    """
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 172.2K bytes
    - Viewed (0)
Back to top