Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 193 for to (0.2 sec)

  1. fastapi/security/api_key.py

                    If `auto_error` is set to `False`, when the query parameter is not
                    available, instead of erroring out, the dependency result will be
                    `None`.
    
                    This is useful when you want to have optional authentication.
    
                    It is also useful when you want to have authentication that can be
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  2. scripts/docs.py

        This only shows the actual translated files, not the placeholders created with
        build-all.
    
        Takes an optional LANG argument with the name of the language to serve, by default
        en.
        """
        # Enable line numbers during local development to make it easier to highlight
        os.environ["LINENUMS"] = "true"
        if lang is None:
            lang = "en"
        lang_path: Path = docs_path / lang
        os.chdir(lang_path)
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Mon Jan 22 19:26:14 GMT 2024
    - 10.9K bytes
    - Viewed (1)
  3. docs_src/security/tutorial004_py310.py

    
    def create_access_token(data: dict, expires_delta: timedelta | None = None):
        to_encode = data.copy()
        if expires_delta:
            expire = datetime.now(timezone.utc) + expires_delta
        else:
            expire = datetime.now(timezone.utc) + timedelta(minutes=15)
        to_encode.update({"exp": expire})
        encoded_jwt = jwt.encode(to_encode, SECRET_KEY, algorithm=ALGORITHM)
        return encoded_jwt
    
    
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 4K bytes
    - Viewed (0)
  4. fastapi/dependencies/utils.py

        path_values, path_errors = request_params_to_args(
            dependant.path_params, request.path_params
        )
        query_values, query_errors = request_params_to_args(
            dependant.query_params, request.query_params
        )
        header_values, header_errors = request_params_to_args(
            dependant.header_params, request.headers
        )
        cookie_values, cookie_errors = request_params_to_args(
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:52:56 GMT 2024
    - 29.5K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_events/test_tutorial003.py

    from fastapi.testclient import TestClient
    
    from docs_src.events.tutorial003 import (
        app,
        fake_answer_to_everything_ml_model,
        ml_models,
    )
    
    
    def test_events():
        assert not ml_models, "ml_models should be empty"
        with TestClient(app) as client:
            assert ml_models["answer_to_everything"] == fake_answer_to_everything_ml_model
            response = client.get("/predict", params={"x": 2})
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 3.6K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_sql_databases/test_sql_databases_py310.py

        user_data = response.json()
        item_to_check = [it for it in user_data["items"] if it["id"] == item_data["id"]][0]
        assert item_to_check["title"] == item["title"]
        assert item_to_check["description"] == item["description"]
        response = client.get("/users/1")
        assert response.status_code == 200, response.text
        user_data = response.json()
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.5K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_sql_databases/test_sql_databases_py39.py

        user_data = response.json()
        item_to_check = [it for it in user_data["items"] if it["id"] == item_data["id"]][0]
        assert item_to_check["title"] == item["title"]
        assert item_to_check["description"] == item["description"]
        response = client.get("/users/1")
        assert response.status_code == 200, response.text
        user_data = response.json()
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.5K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_sql_databases/test_sql_databases_middleware_py39.py

        user_data = response.json()
        item_to_check = [it for it in user_data["items"] if it["id"] == item_data["id"]][0]
        assert item_to_check["title"] == item["title"]
        assert item_to_check["description"] == item["description"]
        response = client.get("/users/1")
        assert response.status_code == 200, response.text
        user_data = response.json()
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.5K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_query_params_str_validations/test_tutorial010_an_py39.py

                        "operationId": "read_items_items__get",
                        "parameters": [
                            {
                                "description": "Query string for the items to search in the database that have a good match",
                                "required": False,
                                "deprecated": True,
                                "schema": IsDict(
                                    {
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 6.3K bytes
    - Viewed (0)
  10. tests/test_multi_query_errors.py

                        "msg": "Input should be a valid integer, unable to parse string as an integer",
                        "input": "five",
                    },
                    {
                        "type": "int_parsing",
                        "loc": ["query", "q", 1],
                        "msg": "Input should be a valid integer, unable to parse string as an integer",
                        "input": "six",
                    },
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 4.5K bytes
    - Viewed (0)
Back to top