Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 180 for get_query (0.27 sec)

  1. docs_src/background_tasks/tutorial002_py310.py

            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}")
    async def send_notification(
        email: str, background_tasks: BackgroundTasks, q: str = Depends(get_query)
    ):
        message = f"message to {email}\n"
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Jan 07 14:11:31 UTC 2022
    - 643 bytes
    - Viewed (0)
  2. docs_src/background_tasks/tutorial002.py

            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
    
    
    @app.post("/send-notification/{email}")
    async def send_notification(
        email: str, background_tasks: BackgroundTasks, q: str = Depends(get_query)
    ):
        message = f"message to {email}\n"
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat May 14 11:59:59 UTC 2022
    - 675 bytes
    - Viewed (0)
  3. docs_src/background_tasks/tutorial002_an_py310.py

            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}")
    async def send_notification(
        email: str, background_tasks: BackgroundTasks, q: Annotated[str, Depends(get_query)]
    ):
        message = f"message to {email}\n"
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 683 bytes
    - Viewed (0)
  4. docs_src/background_tasks/tutorial002_an_py39.py

            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
    
    
    @app.post("/send-notification/{email}")
    async def send_notification(
        email: str, background_tasks: BackgroundTasks, q: Annotated[str, Depends(get_query)]
    ):
        message = f"message to {email}\n"
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 696 bytes
    - Viewed (0)
  5. docs_src/background_tasks/tutorial002_an.py

            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
    
    
    @app.post("/send-notification/{email}")
    async def send_notification(
        email: str, background_tasks: BackgroundTasks, q: Annotated[str, Depends(get_query)]
    ):
        message = f"message to {email}\n"
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 725 bytes
    - Viewed (0)
  6. docs/ru/docs/tutorial/background-tasks.md

    Если бы в запрос был передан query-параметр `q`, он бы первыми записался в `log.txt` фоновой задачей (потому что вызывается в зависимости `get_query`).
    
    После другая фоновая задача, которая была сгенерирована в функции, запишет сообщение из параметра `email`.
    
    ## Технические детали
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue Jan 09 15:52:07 UTC 2024
    - 8K bytes
    - Viewed (0)
  7. tests/main.py

        return item_id
    
    
    @app.get("/path/param-le-ge-int/{item_id}")
    def get_path_param_le_ge_int(item_id: int = Path(le=3, ge=1)):
        return item_id
    
    
    @app.get("/query")
    def get_query(query):
        return f"foo bar {query}"
    
    
    @app.get("/query/optional")
    def get_query_optional(query=None):
        if query is None:
            return "foo bar"
        return f"foo bar {query}"
    
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 21:56:59 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  8. src/test/java/org/codelibs/fess/util/QueryStringBuilderTest.java

            assertEquals("aaa\\/bbb", getQuery("aaa/bbb", new String[0], Collections.emptyMap(), Collections.emptyMap(), true));
            assertEquals("\\\\", getQuery("\\", new String[0], Collections.emptyMap(), Collections.emptyMap(), true));
            assertEquals("\\\\\\\\", getQuery("\\\\", new String[0], Collections.emptyMap(), Collections.emptyMap(), true));
    Registered: Wed Jun 12 13:08:18 UTC 2024
    - Last Modified: Thu Feb 22 01:37:57 UTC 2024
    - 7K bytes
    - Viewed (0)
  9. tests/test_query.py

    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from .main import app
    
    client = TestClient(app)
    
    
    def test_query():
        response = client.get("/query")
        assert response.status_code == 422
        assert response.json() == IsDict(
            {
                "detail": [
                    {
                        "type": "missing",
                        "loc": ["query", "query"],
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 21:56:59 UTC 2024
    - 11.4K bytes
    - Viewed (0)
  10. maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataResolutionRequest.java

            this.remoteRepositories = remoteRepositories;
        }
    
        // --------------------------------------------------------------------
        public ArtifactMetadata getQuery() {
            return query;
        }
    
        public void setQuery(ArtifactMetadata query) {
            this.query = query;
        }
    
        public ArtifactRepository getLocalRepository() {
            return localRepository;
        }
    
    Registered: Wed Jun 12 09:55:16 UTC 2024
    - Last Modified: Wed Sep 06 11:28:54 UTC 2023
    - 2.4K bytes
    - Viewed (0)
Back to top