- Sort Score
- Result 10 results
- Languages All
Results 1031 - 1040 of 1,169 for def2 (0.02 sec)
-
docs/em/docs/tutorial/testing.md
โ ๐ `assert` ๐ โฎ๏ธ ๐ฉ ๐ ๐งฌ ๐ ๐ ๐ช โ (๐, ๐ฉ `pytest`). ```Python hl_lines="2 12 15-18" {!../../docs_src/app_testing/tutorial001.py!} ``` /// tip ๐ ๐ ๐ฌ ๐ข ๐ `def`, ๐ซ `async def`. & ๐ค ๐ฉโ๐ป ๐ ๐ค, ๐ซ โ๏ธ `await`. ๐ โ ๐ โ๏ธ `pytest` ๐ ๐ต ๐คข. /// /// note | "๐ก โน" ๐ ๐ช โ๏ธ `from starlette.testclient import TestClient`.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 5.1K bytes - Viewed (0) -
docs_src/body_multiple_params/tutorial004.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Mar 10 18:49:18 UTC 2023 - 653 bytes - Viewed (0) -
tests/test_tutorial/test_background_tasks/test_tutorial002_an_py310.py
import os from pathlib import Path from fastapi.testclient import TestClient from ...utils import needs_py310 @needs_py310 def test(): from docs_src.background_tasks.tutorial002_an_py310 import app client = TestClient(app) log = Path("log.txt") if log.is_file(): os.remove(log) # pragma: no cover response = client.post("/send-notification/******@****.***?q=some-query")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 631 bytes - Viewed (0) -
tests/test_tutorial/test_background_tasks/test_tutorial002_an_py39.py
import os from pathlib import Path from fastapi.testclient import TestClient from ...utils import needs_py39 @needs_py39 def test(): from docs_src.background_tasks.tutorial002_an_py39 import app client = TestClient(app) log = Path("log.txt") if log.is_file(): os.remove(log) # pragma: no cover response = client.post("/send-notification/******@****.***?q=some-query")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 628 bytes - Viewed (0) -
docs_src/body_multiple_params/tutorial004_an.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 703 bytes - Viewed (0) -
docs_src/body_multiple_params/tutorial004_an_py39.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 674 bytes - Viewed (0) -
docs_src/metadata/tutorial001_1.py
"email": "******@****.***", }, license_info={ "name": "Apache 2.0", "identifier": "MIT", }, ) @app.get("/items/") async def read_items():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 767 bytes - Viewed (0) -
docs_src/path_operation_advanced_configuration/tutorial007.py
@app.post( "/items/", openapi_extra={ "requestBody": { "content": {"application/x-yaml": {"schema": Item.model_json_schema()}}, "required": True, }, }, ) async def create_item(request: Request): raw_body = await request.body() try: data = yaml.safe_load(raw_body) except yaml.YAMLError: raise HTTPException(status_code=422, detail="Invalid YAML") try:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 822 bytes - Viewed (0) -
docs/em/docs/tutorial/sql-databases.md
``` ...& โฉ๏ธ ๐ฅ โ๏ธ: ```Python user = db.query(User).first() ``` โคด๏ธ ๐ฅ ๐ ๐ฃ *โก ๐ ๏ธ ๐ข* & ๐ ๐ต `async def`, โฎ๏ธ ๐ `def`,: ```Python hl_lines="2" @app.get("/users/{user_id}", response_model=schemas.User) def read_user(user_id: int, db: Session = Depends(get_db)): db_user = crud.get_user(db, user_id=user_id) ... ``` /// info
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 25K bytes - Viewed (0) -
docs/fr/docs/tutorial/first-steps.md
Elle sera appelรฉe par **FastAPI** quand une requรชte sur l'URL `/` sera reรงue via une opรฉration `GET`. Ici, c'est une fonction asynchrone (dรฉfinie avec `async def`). --- Vous pourriez aussi la dรฉfinir comme une fonction classique plutรดt qu'avec `async def` : ```Python hl_lines="7" {!../../docs_src/first_steps/tutorial003.py!} ``` /// note
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 10.3K bytes - Viewed (0)