Search Options

Results per page
Sort
Preferred Languages
Advance

Results 261 - 270 of 1,036 for query2 (0.07 sec)

  1. tests/test_tutorial/test_background_tasks/test_tutorial002_an_py39.py

        if log.is_file():
            os.remove(log)  # pragma: no cover
        response = client.post("/send-notification/******@****.***?q=some-query")
        assert response.status_code == 200, response.text
        assert response.json() == {"message": "Message sent"}
        with open("./log.txt") as f:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 628 bytes
    - Viewed (0)
  2. tests/test_multi_query_errors.py

    from typing import List
    
    from dirty_equals import IsDict
    from fastapi import FastAPI, Query
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    
    @app.get("/items/")
    def read_items(q: List[int] = Query(default=None)):
        return {"q": q}
    
    
    client = TestClient(app)
    
    
    def test_multi_query():
        response = client.get("/items/?q=5&q=6")
        assert response.status_code == 200, response.text
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  3. docs_src/query_params_str_validations/tutorial011_an_py39.py

    from typing import Annotated, Union
    
    from fastapi import FastAPI, Query
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(q: Annotated[Union[list[str], None], Query()] = None):
        query_items = {"q": q}
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 237 bytes
    - Viewed (0)
  4. docs_src/query_params_str_validations/tutorial006.py

    from fastapi import FastAPI, Query
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(q: str = Query(min_length=3)):
        results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
        if q:
            results.update({"q": q})
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri May 13 23:38:22 UTC 2022
    - 254 bytes
    - Viewed (0)
  5. docs_src/query_params_str_validations/tutorial005.py

    from fastapi import FastAPI, Query
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(q: str = Query(default="fixedquery", min_length=3)):
        results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
        if q:
            results.update({"q": q})
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri May 13 23:38:22 UTC 2022
    - 276 bytes
    - Viewed (0)
  6. docs/ko/docs/tutorial/header-params.md

    `Header`는 `Path`, `Query` 및 `Cookie`의 "자매"클래스입니다. 이 역시 동일한 공통 `Param` 클래스를 상속합니다.
    
    `Query`, `Path`, `Header` 그리고 다른 것들을 `fastapi`에서 임포트 할 때, 이들은 실제로 특별한 클래스를 반환하는 함수임을 기억하세요.
    
    ///
    
    /// info | "정보"
    
    헤더를 선언하기 위해서 `Header`를 사용해야 합니다. 그렇지 않으면 해당 매개변수를 쿼리 매개변수로 해석하기 때문입니다.
    
    ///
    
    ## 자동 변환
    
    `Header`는 `Path`, `Query` 그리고 `Cookie`가 제공하는 것 외에 기능이 조금 더 있습니다.
    
    대부분의 표준 헤더는 "마이너스 기호" (`-`)라고도 하는 "하이픈" 문자로 구분됩니다.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  7. docs_src/query_params_str_validations/tutorial002_py310.py

    from fastapi import FastAPI, Query
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(q: str | None = Query(default=None, max_length=50)):
        results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
        if q:
            results.update({"q": q})
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri May 13 23:38:22 UTC 2022
    - 276 bytes
    - Viewed (0)
  8. tests/test_tutorial/test_websockets/test_tutorial002.py

                assert data == "Session cookie or query token value is: fakesession"
                data = websocket.receive_text()
                assert data == f"Message text was: {message}, for item ID: foo"
                message = "Message two"
                websocket.send_text(message)
                data = websocket.receive_text()
                assert data == "Session cookie or query token value is: fakesession"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Nov 13 14:26:09 UTC 2022
    - 3.6K bytes
    - Viewed (0)
  9. interfaces.go

    }
    
    // ConnPool db conns pool interface
    type ConnPool interface {
    	PrepareContext(ctx context.Context, query string) (*sql.Stmt, error)
    	ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
    	QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
    	QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row
    }
    
    // SavePointerDialectorInterface save pointer interface
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Sat Aug 19 13:33:31 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  10. docs_src/query_params_str_validations/tutorial006_an.py

    from fastapi import FastAPI, Query
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(q: Annotated[str, Query(min_length=3)]):
        results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
        if q:
            results.update({"q": q})
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 304 bytes
    - Viewed (0)
Back to top