Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 159 for name (0.13 sec)

  1. tests/test_tutorial/test_body/test_tutorial001_py310.py

        response = client.post("/items/", json={"name": "Foo", "price": 50.5})
        assert response.status_code == 200
        assert response.json() == {
            "name": "Foo",
            "price": 50.5,
            "description": None,
            "tax": None,
        }
    
    
    @needs_py310
    def test_post_with_str_float(client: TestClient):
        response = client.post("/items/", json={"name": "Foo", "price": "50.5"})
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 15K bytes
    - Viewed (2)
  2. tests/test_tutorial/test_body/test_tutorial001.py

        response = client.post("/items/", json={"name": "Foo", "price": 50.5})
        assert response.status_code == 200
        assert response.json() == {
            "name": "Foo",
            "price": 50.5,
            "description": None,
            "tax": None,
        }
    
    
    def test_post_with_str_float(client: TestClient):
        response = client.post("/items/", json={"name": "Foo", "price": "50.5"})
        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
    - 14.7K bytes
    - Viewed (7)
  3. fastapi/security/http.py

        def __init__(
            self,
            *,
            scheme: str,
            scheme_name: Optional[str] = None,
            description: Optional[str] = None,
            auto_error: bool = True,
        ):
            self.model = HTTPBaseModel(scheme=scheme, description=description)
            self.scheme_name = scheme_name or self.__class__.__name__
            self.auto_error = auto_error
    
        async def __call__(
            self, request: Request
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Apr 19 15:29:38 GMT 2024
    - 13.2K bytes
    - Viewed (0)
  4. tests/test_response_by_alias.py

    @app.get("/no-alias/dict", response_model=ModelNoAlias)
    def no_alias_dict():
        return {"name": "Foo"}
    
    
    @app.get("/no-alias/model", response_model=ModelNoAlias)
    def no_alias_model():
        return ModelNoAlias(name="Foo")
    
    
    @app.get("/no-alias/list", response_model=List[ModelNoAlias])
    def no_alias_list():
        return [{"name": "Foo"}, {"name": "Bar"}]
    
    
    client = TestClient(app)
    
    
    def test_read_dict():
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 11.1K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_body_updates/test_tutorial001_py39.py

    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.body_updates.tutorial001_py39 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py39
    def test_get(client: TestClient):
        response = client.get("/items/baz")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "name": "Baz",
            "description": None,
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Sep 28 04:14:40 GMT 2023
    - 11.8K bytes
    - Viewed (0)
  6. fastapi/security/oauth2.py

                ),
            ] = True,
        ):
            self.model = OAuth2Model(
                flows=cast(OAuthFlowsModel, flows), description=description
            )
            self.scheme_name = scheme_name or self.__class__.__name__
            self.auto_error = auto_error
    
        async def __call__(self, request: Request) -> Optional[str]:
            authorization = request.headers.get("Authorization")
            if not authorization:
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 21.1K bytes
    - Viewed (1)
  7. tests/test_tutorial/test_bigger_applications/test_main_an.py

            "/items?token=jessica", headers={"X-Token": "fake-super-secret-token"}
        )
        assert response.status_code == 200
        assert response.json() == {
            "plumbus": {"name": "Plumbus"},
            "gun": {"name": "Portal Gun"},
        }
    
    
    def test_items_with_no_token_jessica(client: TestClient):
        response = client.get("/items", headers={"X-Token": "fake-super-secret-token"})
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 24.6K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_bigger_applications/test_main_an_py39.py

            "/items?token=jessica", headers={"X-Token": "fake-super-secret-token"}
        )
        assert response.status_code == 200
        assert response.json() == {
            "plumbus": {"name": "Plumbus"},
            "gun": {"name": "Portal Gun"},
        }
    
    
    @needs_py39
    def test_items_with_no_token_jessica(client: TestClient):
        response = client.get("/items", headers={"X-Token": "fake-super-secret-token"})
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 24.9K bytes
    - Viewed (0)
  9. docs/en/docs/advanced/generate-clients.md

    In this case you will have to ensure that each operation ID is **unique** in some other way.
    
    For example, you could make sure that each *path operation* has a tag, and then generate the operation ID based on the **tag** and the *path operation* **name** (the function name).
    
    ### Custom Generate Unique ID Function
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  10. docs/ru/docs/python-types.md

    Вы вводите первый параметр функции, `first_name`, затем точку (`.`), а затем нажимаете `Ctrl+Space`, чтобы запустить дополнение.
    
    Но, к сожалению, ничего полезного не выходит:
    
    <img src="/img/python-types/image01.png">
    
    ### Добавим типы
    
    Давайте изменим одну строчку в предыдущей версии.
    
    Мы изменим именно этот фрагмент, параметры функции, с:
    
    ```Python
        first_name, last_name
    ```
    
    на:
    
    ```Python
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 14.6K bytes
    - Viewed (0)
Back to top