Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for work (0.18 sec)

  1. tests/test_schema_extra_examples.py

        response = client.get("/cookie_example_examples/")
        assert response.status_code == 200, response.text
    
    
    def test_openapi_schema():
        """
        Test that example overrides work:
    
        * pydantic model schema_extra is included
        * Body(example={}) overrides schema_extra in pydantic model
        * Body(examples{}) overrides Body(example={}) and schema_extra in pydantic model
        """
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 24 20:26:06 GMT 2023
    - 37.7K bytes
    - Viewed (0)
  2. tensorflow/api_template.__init__.py

    _tf2.enable()
    
    # API IMPORTS PLACEHOLDER
    
    # WRAPPER_PLACEHOLDER
    
    # Make sure directory containing top level submodules is in
    # the __path__ so that "from tensorflow.foo import bar" works.
    # We're using bitwise, but there's nothing special about that.
    _API_MODULE = _sys.modules[__name__].bitwise
    _tf_api_dir = _os.path.dirname(_os.path.dirname(_API_MODULE.__file__))
    _current_module = _sys.modules[__name__]
    
    Python
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Tue Mar 05 06:27:59 GMT 2024
    - 6.7K bytes
    - Viewed (3)
  3. fastapi/_compat.py

            or hasattr(origin, "__get_pydantic_core_schema__")
        )
    
    
    def field_annotation_is_scalar(annotation: Any) -> bool:
        # handle Ellipsis here to make tuple[int, ...] work nicely
        return annotation is Ellipsis or not field_annotation_is_complex(annotation)
    
    
    def field_annotation_is_scalar_sequence(annotation: Union[Type[Any], None]) -> bool:
        origin = get_origin(annotation)
    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)
  4. tests/test_tutorial/test_schema_extra_example/test_tutorial005_an.py

                                        "normal": {
                                            "summary": "A normal example",
                                            "description": "A **normal** item works correctly.",
                                            "value": {
                                                "name": "Foo",
                                                "description": "A very nice Item",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Aug 26 18:03:13 GMT 2023
    - 6.7K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_custom_request_and_route/test_tutorial002.py

    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from docs_src.custom_request_and_route.tutorial002 import app
    
    client = TestClient(app)
    
    
    def test_endpoint_works():
        response = client.post("/", json=[1, 2, 3])
        assert response.json() == 6
    
    
    def test_exception_handler_body_access():
        response = client.post("/", json={"numbers": [1, 2, 3]})
        assert response.json() == IsDict(
            {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 1.2K bytes
    - Viewed (0)
  6. docs_src/schema_extra_example/tutorial005_an.py

        item: Annotated[
            Item,
            Body(
                openapi_examples={
                    "normal": {
                        "summary": "A normal example",
                        "description": "A **normal** item works correctly.",
                        "value": {
                            "name": "Foo",
                            "description": "A very nice Item",
                            "price": 35.4,
                            "tax": 3.2,
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Aug 26 18:03:13 GMT 2023
    - 1.5K bytes
    - Viewed (0)
  7. docs_src/schema_extra_example/tutorial005_an_py310.py

        item: Annotated[
            Item,
            Body(
                openapi_examples={
                    "normal": {
                        "summary": "A normal example",
                        "description": "A **normal** item works correctly.",
                        "value": {
                            "name": "Foo",
                            "description": "A very nice Item",
                            "price": 35.4,
                            "tax": 3.2,
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Aug 26 18:03:13 GMT 2023
    - 1.5K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_schema_extra_example/test_tutorial005_an_py310.py

                                        "normal": {
                                            "summary": "A normal example",
                                            "description": "A **normal** item works correctly.",
                                            "value": {
                                                "name": "Foo",
                                                "description": "A very nice Item",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Aug 26 18:03:13 GMT 2023
    - 6.8K bytes
    - Viewed (0)
  9. fastapi/applications.py

                    So you could override this value to trick those tools into using
                    the generated OpenAPI. Have in mind that this is a hack. But if you
                    avoid using features added in OpenAPI 3.1.0, it might work for your
                    use case.
    
                    This is not passed as a parameter to the `FastAPI` class to avoid
                    giving the false idea that FastAPI would generate a different OpenAPI
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 172.2K bytes
    - Viewed (0)
  10. docs_src/schema_extra_example/tutorial005.py

    async def update_item(
        *,
        item_id: int,
        item: Item = Body(
            openapi_examples={
                "normal": {
                    "summary": "A normal example",
                    "description": "A **normal** item works correctly.",
                    "value": {
                        "name": "Foo",
                        "description": "A very nice Item",
                        "price": 35.4,
                        "tax": 3.2,
                    },
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Aug 26 18:03:13 GMT 2023
    - 1.4K bytes
    - Viewed (0)
Back to top