- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 53 for print (0.25 sec)
-
docs_src/dependencies/tutorial008c_an.py
from typing_extensions import Annotated app = FastAPI() class InternalError(Exception): pass def get_username(): try: yield "Rick" except InternalError: print("Oops, we didn't raise again, Britney ๐ฑ") @app.get("/items/{item_id}") def get_item(item_id: str, username: Annotated[str, Depends(get_username)]): if item_id == "portal-gun": raise InternalError(
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Feb 24 23:06:37 GMT 2024 - 710 bytes - Viewed (0) -
docs/em/docs/tutorial/handling-errors.md
```Python hl_lines="2-5 15 21" {!../../../docs_src/handling_errors/tutorial006.py!} ```
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 8.3K bytes - Viewed (0) -
docs/ja/docs/tutorial/handling-errors.md
ใใใฉใซใใฎไพๅคใใณใใฉใ`fastapi.exception_handlers`ใใใคใณใใผใใใฆๅๅฉ็จใใใใจใใงใใพใ: ```Python hl_lines="2 3 4 5 15 21" {!../../../docs_src/handling_errors/tutorial006.py!} ``` ใใฎไพใงใฏใ้ๅธธใซ่กจ็พๅใฎใใใกใใปใผใธใงใจใฉใผใ`print`ใใฆใใพใใ
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 11.8K bytes - Viewed (0) -
docs_src/dependencies/tutorial008d.py
from fastapi import Depends, FastAPI, HTTPException app = FastAPI() class InternalError(Exception): pass def get_username(): try: yield "Rick" except InternalError: print("We don't swallow the internal error here, we raise again ๐") raise @app.get("/items/{item_id}") def get_item(item_id: str, username: str = Depends(get_username)): if item_id == "portal-gun":
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Feb 24 23:06:37 GMT 2024 - 694 bytes - Viewed (0) -
docs_src/dependencies/tutorial008d_an.py
from typing_extensions import Annotated app = FastAPI() class InternalError(Exception): pass def get_username(): try: yield "Rick" except InternalError: print("We don't swallow the internal error here, we raise again ๐") raise @app.get("/items/{item_id}") def get_item(item_id: str, username: Annotated[str, Depends(get_username)]): if item_id == "portal-gun":
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Feb 24 23:06:37 GMT 2024 - 744 bytes - Viewed (0) -
docs_src/dependencies/tutorial008d_an_py39.py
from fastapi import Depends, FastAPI, HTTPException app = FastAPI() class InternalError(Exception): pass def get_username(): try: yield "Rick" except InternalError: print("We don't swallow the internal error here, we raise again ๐") raise @app.get("/items/{item_id}") def get_item(item_id: str, username: Annotated[str, Depends(get_username)]): if item_id == "portal-gun":
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Feb 24 23:06:37 GMT 2024 - 734 bytes - Viewed (0) -
docs/em/docs/tutorial/dependencies/dependencies-with-yield.md
```Python with open("./somefile.txt") as f: contents = f.read() print(contents) ``` ๐, `open("./somefile.txt")` โ ๐ ๐ ๐ค "๐ ๐จโ๐ผ". ๐โ `with` ๐ซ ๐, โซ๏ธ โ ๐ญ ๐ ๐, ๐ฅ ๐ค โ . ๐โ ๐ โ ๐ โฎ๏ธ `yield`, **FastAPI** ๐ ๐ ๐ โซ๏ธ ๐ ๐จโ๐ผ, & ๐ โซ๏ธ โฎ๏ธ ๐ ๐ ๐งฐ.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 8.6K bytes - Viewed (0) -
docs_src/dependencies/tutorial008c.py
from fastapi import Depends, FastAPI, HTTPException app = FastAPI() class InternalError(Exception): pass def get_username(): try: yield "Rick" except InternalError: print("Oops, we didn't raise again, Britney ๐ฑ") @app.get("/items/{item_id}") def get_item(item_id: str, username: str = Depends(get_username)): if item_id == "portal-gun": raise InternalError(
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Feb 24 23:06:37 GMT 2024 - 660 bytes - Viewed (0) -
scripts/docs.py
), ) -> None: """ Build the docs for a language. """ insiders_env_file = os.environ.get("INSIDERS_FILE") print(f"Insiders file {insiders_env_file}") if is_mkdocs_insiders(): print("Using insiders") lang_path: Path = Path("docs") / lang if not lang_path.is_dir(): typer.echo(f"The language translation doesn't seem to exist yet: {lang}")
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Mon Jan 22 19:26:14 GMT 2024 - 10.9K bytes - Viewed (1) -
docs_src/dependencies/tutorial008c_an_py39.py
from fastapi import Depends, FastAPI, HTTPException app = FastAPI() class InternalError(Exception): pass def get_username(): try: yield "Rick" except InternalError: print("Oops, we didn't raise again, Britney ๐ฑ") @app.get("/items/{item_id}") def get_item(item_id: str, username: Annotated[str, Depends(get_username)]): if item_id == "portal-gun": raise InternalError(
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Feb 24 23:06:37 GMT 2024 - 700 bytes - Viewed (0)