- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 235 for Dost (0.12 sec)
-
docs/en/docs/tutorial/response-model.md
* Add a **JSON Schema** for the response, in the OpenAPI *path operation*. * This will be used by the **automatic docs**. * It will also be used by automatic client code generation tools. But most importantly: * It will **limit and filter** the output data to what is defined in the return type. * This is particularly important for **security**, we'll see more of that below. ## `response_model` Parameter
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 17.9K bytes - Viewed (0) -
tests/test_tutorial/test_body/test_tutorial001_py310.py
def test_body_float(client: TestClient): 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) -
tests/test_tutorial/test_body/test_tutorial001.py
def test_body_float(client: TestClient): 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"})
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) -
tests/test_tutorial/test_request_forms/test_tutorial001_an.py
client = TestClient(app) return client def test_post_body_form(client: TestClient): response = client.post("/login/", data={"username": "Foo", "password": "secret"}) assert response.status_code == 200 assert response.json() == {"username": "Foo"} def test_post_body_form_no_password(client: TestClient): response = client.post("/login/", data={"username": "Foo"}) assert response.status_code == 422
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 7.5K bytes - Viewed (0) -
tests/test_tutorial/test_handling_errors/test_tutorial005.py
from dirty_equals import IsDict from fastapi.testclient import TestClient from docs_src.handling_errors.tutorial005 import app client = TestClient(app) def test_post_validation_error(): response = client.post("/items/", json={"title": "towel", "size": "XL"}) assert response.status_code == 422, response.text assert response.json() == IsDict( { "detail": [ {
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) -
docs/en/docs/deployment/manually.md
<font color="#4E9A06">INFO</font>: Application startup complete. <font color="#4E9A06">INFO</font>: Uvicorn running on <b>http://0.0.0.0:8000</b> (Press CTRL+C to quit) ``` </div> That would work for most of the cases. 😎 You could use that command for example to start your **FastAPI** app in a container, in a server, etc. ## ASGI Servers Let's go a little deeper into the details.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu May 02 22:37:31 GMT 2024 - 9.2K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial005_an.py
data = {"username": username, "password": password} if scope: data["scope"] = scope response = client.post("/token", data=data) content = response.json() access_token = content.get("access_token") return access_token def test_login(): response = client.post("/token", data={"username": "johndoe", "password": "secret"}) assert response.status_code == 200, response.text
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Wed Mar 13 19:07:10 GMT 2024 - 15.4K bytes - Viewed (0) -
docs_src/app_testing/app_b_an/test_main.py
def test_create_item_bad_token(): response = client.post( "/items/", headers={"X-Token": "hailhydra"}, json={"id": "bazz", "title": "Bazz", "description": "Drop the bazz"}, ) assert response.status_code == 400 assert response.json() == {"detail": "Invalid X-Token header"} def test_create_existing_item(): response = client.post( "/items/",
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Wed Mar 13 19:07:10 GMT 2024 - 1.8K bytes - Viewed (0) -
docs/ko/docs/tutorial/debugging.md
따라서 섹션 ```Python uvicorn.run(app, host="0.0.0.0", port=8000) ``` 이 실행됩니다. --- 해당 모듈(파일)을 가져오면 이런 일이 발생하지 않습니다 그래서 다음과 같은 다른 파일 `importer.py`가 있는 경우: ```Python from myapp import app # Some more code ``` 이 경우 `myapp.py` 내부의 자동 변수에는 값이 `"__main__"`인 변수 `__name__`이 없습니다. 따라서 다음 행 ```Python uvicorn.run(app, host="0.0.0.0", port=8000) ``` 은 실행되지 않습니다.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Apr 02 04:18:08 GMT 2024 - 2.8K bytes - Viewed (0) -
docs/ru/docs/tutorial/first-steps.md
При создании API, "путь" является основным способом разделения "задач" и "ресурсов". #### Операция (operation) "Операция" это один из "методов" HTTP. Таких, как: * `POST` * `GET` * `PUT` * `DELETE` ...и более экзотических: * `OPTIONS` * `HEAD` * `PATCH` * `TRACE`
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 13.1K bytes - Viewed (0)