Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for Husted (0.19 sec)

  1. tests/test_annotated.py

        assert response.json() == {"foo": "baz"}
    
    
    def test_nested_router():
        app = FastAPI()
    
        router = APIRouter(prefix="/nested")
    
        @router.get("/test")
        async def test(var: Annotated[str, Query()] = "bar"):
            return {"foo": var}
    
        app.include_router(router)
    
        client = TestClient(app)
    
        response = client.get("/nested/test")
        assert response.status_code == 200
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  2. tests/test_orjson_response_class.py

    from fastapi import FastAPI
    from fastapi.responses import ORJSONResponse
    from fastapi.testclient import TestClient
    from sqlalchemy.sql.elements import quoted_name
    
    app = FastAPI(default_response_class=ORJSONResponse)
    
    
    @app.get("/orjson_non_str_keys")
    def get_orjson_non_str_keys():
        key = quoted_name(value="msg", quote=False)
        return {key: "Hello World", 1: 1}
    
    
    client = TestClient(app)
    
    
    def test_orjson_non_str_keys():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Sep 02 10:17:31 GMT 2022
    - 562 bytes
    - Viewed (0)
  3. tests/test_response_model_include_exclude.py

        }
    
    
    client = TestClient(app)
    
    
    def test_nested_include_simple():
        response = client.get("/simple_include")
    
        assert response.status_code == 200, response.text
    
        assert response.json() == {
            "baz": "simple_include model2 baz",
            "ref": {"foo": "simple_include model foo"},
        }
    
    
    def test_nested_include_simple_dict():
        response = client.get("/simple_include_dict")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon Jul 19 19:14:58 GMT 2021
    - 4K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_body_nested_models/test_tutorial009.py

    import pytest
    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.body_nested_models.tutorial009 import app
    
        client = TestClient(app)
        return client
    
    
    def test_post_body(client: TestClient):
        data = {"2": 2.2, "3": 3.3}
        response = client.post("/index-weights/", json=data)
        assert response.status_code == 200, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  5. tensorflow/api_template_v1.__init__.py

      * https://github.com/tensorflow/community/blob/master/rfcs/20180907-contrib-sunset.md
      * https://github.com/tensorflow/addons
      * https://github.com/tensorflow/io (for I/O related ops)
    If you depend on functionality not listed there, please file an issue.
    """
    contrib = _LazyLoader("contrib", globals(), "tensorflow.contrib",
                          _CONTRIB_WARNING)
    # The templated code that replaces the placeholder above sometimes
    Python
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Tue Jan 23 02:14:00 GMT 2024
    - 7.4K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_body_nested_models/test_tutorial009_py39.py

    import pytest
    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py39
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.body_nested_models.tutorial009_py39 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py39
    def test_post_body(client: TestClient):
        data = {"2": 2.2, "3": 3.3}
        response = client.post("/index-weights/", json=data)
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  7. fastapi/_compat.py

            model_name_map: Dict[Union[Type[BaseModel], Type[Enum]], str],
        ) -> Dict[str, Any]:
            definitions: Dict[str, Dict[str, Any]] = {}
            for model in flat_models:
                m_schema, m_definitions, m_nested_models = model_process_schema(
                    model, model_name_map=model_name_map, ref_prefix=REF_PREFIX
                )
                definitions.update(m_definitions)
                model_name = model_name_map[model]
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 22.6K bytes
    - Viewed (0)
Back to top