- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 112 for johon (0.04 sec)
-
docs_src/python_types/tutorial011_py39.py
from pydantic import BaseModel class User(BaseModel): id: int name: str = "John Doe" signup_ts: Union[datetime, None] = None friends: list[int] = [] external_data = { "id": "123", "signup_ts": "2017-06-01 12:22", "friends": [1, "2", b"3"], } user = User(**external_data) print(user) # > User id=123 name='John Doe' signup_ts=datetime.datetime(2017, 6, 1, 12, 22) friends=[1, 2, 3] print(user.id)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Sep 02 15:56:35 UTC 2023 - 492 bytes - Viewed (0) -
docs/ru/docs/tutorial/extra-models.md
У Pydantic-моделей есть метод `.dict()`, который возвращает `dict` с данными модели. Поэтому, если мы создадим Pydantic-объект `user_in` таким способом: ```Python user_in = UserIn(username="john", password="secret", email="john******@****.***") ``` и затем вызовем: ```Python user_dict = user_in.dict() ```
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 11.5K bytes - Viewed (0) -
docs/pt/docs/tutorial/extra-models.md
Os modelos Pydantic possuem um método `.dict()` que retorna um `dict` com os dados do modelo. Então, se criarmos um objeto Pydantic `user_in` como: ```Python user_in = UserIn(username="john", password="secret", email="john******@****.***") ``` e depois chamarmos: ```Python user_dict = user_in.dict() ```
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 7.8K bytes - Viewed (0) -
docs/en/docs/tutorial/extra-models.md
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 7.7K bytes - Viewed (0) -
docs/de/docs/tutorial/extra-models.md
Pydantic-Modelle haben eine `.dict()`-Methode, die ein `dict` mit den Daten des Modells zurückgibt. Wenn wir also ein Pydantic-Objekt `user_in` erstellen, etwa so: ```Python user_in = UserIn(username="john", password="secret", email="john******@****.***") ``` und wir rufen seine `.dict()`-Methode auf: ```Python user_dict = user_in.dict() ```
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 8.7K bytes - Viewed (0) -
tests/test_tutorial/test_custom_docs_ui/test_tutorial002.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Aug 19 19:54:04 UTC 2023 - 1.2K bytes - Viewed (0) -
tests/test_tutorial/test_custom_docs_ui/test_tutorial001.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu May 23 22:59:02 UTC 2024 - 1.3K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial006_an.py
from docs_src.security.tutorial006_an import app client = TestClient(app) def test_security_http_basic(): response = client.get("/users/me", auth=("john", "secret")) assert response.status_code == 200, response.text assert response.json() == {"username": "john", "password": "secret"} def test_security_http_basic_no_credentials(): response = client.get("/users/me")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.3K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial006.py
from docs_src.security.tutorial006 import app client = TestClient(app) def test_security_http_basic(): response = client.get("/users/me", auth=("john", "secret")) assert response.status_code == 200, response.text assert response.json() == {"username": "john", "password": "secret"} def test_security_http_basic_no_credentials(): response = client.get("/users/me")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.3K bytes - Viewed (0) -
tests/test_security_http_basic_realm.py
client = TestClient(app) def test_security_http_basic(): response = client.get("/users/me", auth=("john", "secret")) assert response.status_code == 200, response.text assert response.json() == {"username": "john", "password": "secret"} def test_security_http_basic_no_credentials(): response = client.get("/users/me")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.6K bytes - Viewed (0)