Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 78 for closed (0.21 sec)

  1. docs_src/sql_databases_peewee/sql_app/database.py

    from contextvars import ContextVar
    
    import peewee
    
    DATABASE_NAME = "test.db"
    db_state_default = {"closed": None, "conn": None, "ctx": None, "transactions": None}
    db_state = ContextVar("db_state", default=db_state_default.copy())
    
    
    class PeeweeConnectionState(peewee._ConnectionState):
        def __init__(self, **kwargs):
            super().__setattr__("_state", db_state)
            super().__init__(**kwargs)
    
        def __setattr__(self, name, value):
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 662 bytes
    - Viewed (0)
  2. .github/workflows/latest-changes.yml

    name: Latest Changes
    
    on:
      pull_request_target:
        branches:
          - master
        types:
          - closed
      workflow_dispatch:
        inputs:
          number:
            description: PR number
            required: true
          debug_enabled:
            description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
            required: false
            default: 'false'
    
    jobs:
      latest-changes:
    Others
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Jan 09 14:57:33 GMT 2024
    - 1.4K bytes
    - Viewed (0)
  3. tests/test_datastructures.py

    
    def test_default_placeholder_bool():
        placeholder_a = Default("a")
        placeholder_b = Default("")
        assert placeholder_a
        assert not placeholder_b
    
    
    def test_upload_file_is_closed(tmp_path: Path):
        path = tmp_path / "test.txt"
        path.write_bytes(b"<file content>")
        app = FastAPI()
    
        testing_file_store: List[UploadFile] = []
    
        @app.post("/uploadfile/")
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Oct 18 12:36:40 GMT 2023
    - 2K bytes
    - Viewed (0)
  4. .github/actions/notify-translations/app/main.py

                        body=new_translation_message,
                    )
                    logging.info(f"Notified in comment: {comment.url}")
            elif pr.state == "closed" or approved_label in label_strs:
                logging.info(f"Already approved or closed PR #{pr.number}")
                if already_done_comment:
                    logging.info(
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Sep 27 23:01:46 GMT 2023
    - 12.4K bytes
    - Viewed (0)
  5. docs_src/sql_databases_peewee/sql_app/main.py

    database.db.create_tables([models.User, models.Item])
    database.db.close()
    
    app = FastAPI()
    
    sleep_time = 10
    
    
    async def reset_db_state():
        database.db._state._state.set(db_state_default.copy())
        database.db._state.reset()
    
    
    def get_db(db_state=Depends(reset_db_state)):
        try:
            database.db.connect()
            yield
        finally:
            if not database.db.is_closed():
                database.db.close()
    
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 2.2K bytes
    - Viewed (0)
  6. docs/en/docs/advanced/websockets.md

    With that you can connect the WebSocket and then send and receive messages:
    
    <img src="/img/tutorial/websockets/image05.png">
    
    ## Handling disconnections and multiple clients
    
    When a WebSocket connection is closed, the `await websocket.receive_text()` will raise a `WebSocketDisconnect` exception, which you can then catch and handle like in this example.
    
    === "Python 3.9+"
    
        ```Python hl_lines="79-81"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  7. docs/en/docs/advanced/custom-response.md

    This includes many libraries to interact with cloud storage, video processing, and others.
    
    ```{ .python .annotate hl_lines="2  10-12  14" }
    {!../../../docs_src/custom_response/tutorial008.py!}
    ```
    
    1. This is the generator function. It's a "generator function" because it contains `yield` statements inside.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.7K bytes
    - Viewed (0)
  8. fastapi/utils.py

                create_cloned_field(sub_field, cloned_types=cloned_types)
                for sub_field in field.sub_fields  # type: ignore[attr-defined]
            ]
        if field.key_field:  # type: ignore[attr-defined]
            new_field.key_field = create_cloned_field(  # type: ignore[attr-defined]
                field.key_field,  # type: ignore[attr-defined]
                cloned_types=cloned_types,
            )
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  9. tests/test_ws_dependencies.py

        await websocket.accept()
        await websocket.send_text(json.dumps(deps))
        await websocket.close()
    
    
    @router.websocket("/router", dependencies=[create_dependency("routerindex")])
    async def routerindex(websocket: WebSocket, deps: DepList):
        await websocket.accept()
        await websocket.send_text(json.dumps(deps))
        await websocket.close()
    
    
    @prefix_router.websocket("/", dependencies=[create_dependency("routerprefixindex")])
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Jun 11 20:35:39 GMT 2023
    - 2.1K bytes
    - Viewed (0)
  10. scripts/playwright/separate_openapi_schemas/image03.py

        page.screenshot(
            path="docs/en/docs/img/tutorial/separate-openapi-schemas/image03.png"
        )
    
        # ---------------------
        context.close()
        browser.close()
    
    
    process = subprocess.Popen(
        ["uvicorn", "docs_src.separate_openapi_schemas.tutorial001:app"]
    )
    try:
        with sync_playwright() as playwright:
            run(playwright)
    finally:
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Aug 25 19:10:22 GMT 2023
    - 892 bytes
    - Viewed (0)
Back to top