Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 574 for Read (0.15 sec)

  1. tests/test_read_with_orm_mode.py

    
    @needs_pydanticv1
    def test_read_with_orm_mode_pv1() -> None:
        class PersonBase(BaseModel):
            name: str
            lastname: str
    
        class Person(PersonBase):
            @property
            def full_name(self) -> str:
                return f"{self.name} {self.lastname}"
    
            class Config:
                orm_mode = True
                read_with_orm_mode = True
    
        class PersonCreate(PersonBase):
    Python
    - Registered: Sun Apr 14 07:19:09 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 2.4K bytes
    - Viewed (0)
  2. tests/test_response_by_alias.py

    
    @app.get("/dict", response_model=Model, response_model_by_alias=False)
    def read_dict():
        return {"alias": "Foo"}
    
    
    @app.get("/model", response_model=Model, response_model_by_alias=False)
    def read_model():
        return Model(alias="Foo")
    
    
    @app.get("/list", response_model=List[Model], response_model_by_alias=False)
    def read_list():
        return [{"alias": "Foo"}, {"alias": "Bar"}]
    
    
    Python
    - Registered: Sun Apr 14 07:19:09 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 11.1K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_path_operation_configurations/test_tutorial006.py

                                "content": {"application/json": {"schema": {}}},
                            }
                        },
                        "tags": ["items"],
                        "summary": "Read Items",
                        "operationId": "read_items_items__get",
                    }
                },
                "/users/": {
                    "get": {
                        "responses": {
                            "200": {
    Python
    - Registered: Sun Apr 14 07:19:09 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.3K bytes
    - Viewed (0)
  4. fastapi/security/oauth2.py

                    For example, a single string with:
    
                    ```python
                    "items:read items:write users:read profile openid"
                    ````
    
                    would represent the scopes:
    
                    * `items:read`
                    * `items:write`
                    * `users:read`
                    * `profile`
                    * `openid`
                    """
                ),
    Python
    - Registered: Sun Apr 14 07:19:09 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 21.1K bytes
    - Viewed (1)
  5. tests/test_tutorial/test_testing/test_tutorial001.py

    from docs_src.app_testing.tutorial001 import client, test_read_main
    
    
    def test_main():
        test_read_main()
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
            "info": {"title": "FastAPI", "version": "0.1.0"},
            "paths": {
                "/": {
                    "get": {
    Python
    - Registered: Sun Apr 14 07:19:09 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 821 bytes
    - Viewed (0)
  6. tests/test_tutorial/test_security/test_tutorial005_an.py

    
    def test_read_items():
        access_token = get_access_token(scope="me items")
        response = client.get(
            "/users/me/items/", headers={"Authorization": f"Bearer {access_token}"}
        )
        assert response.status_code == 200, response.text
        assert response.json() == [{"item_id": "Foo", "owner": "johndoe"}]
    
    
    def test_read_system_status():
        access_token = get_access_token()
    Python
    - Registered: Sun Apr 14 07:19:09 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_extra_data_types/test_tutorial001.py

                                        }
                                    }
                                },
                            },
                        },
                        "summary": "Read Items",
                        "operationId": "read_items_items__item_id__put",
                        "parameters": [
                            {
                                "required": True,
                                "schema": {
    Python
    - Registered: Sun Apr 14 07:19:09 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 7.8K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_testing/test_main_b_an.py

    
    def test_app():
        test_main.test_create_existing_item()
        test_main.test_create_item()
        test_main.test_create_item_bad_token()
        test_main.test_read_nonexistent_item()
        test_main.test_read_item()
    Python
    - Registered: Sun Apr 14 07:19:09 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 303 bytes
    - Viewed (1)
  9. docs_src/metadata/tutorial001_1.py

    from fastapi import FastAPI
    
    description = """
    ChimichangApp API helps you do awesome stuff. 🚀
    
    ## Items
    
    You can **read items**.
    
    ## Users
    
    You will be able to:
    
    * **Create users** (_not implemented_).
    * **Read users** (_not implemented_).
    """
    
    app = FastAPI(
        title="ChimichangApp",
        description=description,
        summary="Deadpool's favorite app. Nuff said.",
        version="0.0.1",
    Python
    - Registered: Sun Apr 14 07:19:09 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 767 bytes
    - Viewed (0)
  10. tests/test_tutorial/test_extra_models/test_tutorial005.py

                                },
                            }
                        },
                        "summary": "Read Keyword Weights",
                        "operationId": "read_keyword_weights_keyword_weights__get",
                    }
                }
            },
    Python
    - Registered: Sun Apr 14 07:19:09 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 1.4K bytes
    - Viewed (0)
Back to top