- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 46 for Magnin (0.15 sec)
-
docs/en/docs/advanced/settings.md
#### `lru_cache` Technical Details `@lru_cache` modifies the function it decorates to return the same value that was returned the first time, instead of computing it again, executing the code of the function every time.
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 15.7K bytes - Viewed (0) -
docs_src/dependencies/tutorial008c_an_py39.py
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 Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Feb 24 23:06:37 GMT 2024 - 700 bytes - Viewed (0) -
docs/en/docs/tutorial/dependencies/dependencies-with-yield.md
## Dependencies with `yield` and `except` If you catch an exception using `except` in a dependency with `yield` and you don't raise it again (or raise a new exception), FastAPI won't be able to notice there was an exception, the same way that would happen with regular Python: === "Python 3.9+" ```Python hl_lines="15-16"
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Feb 24 23:06:37 GMT 2024 - 14.1K bytes - Viewed (0) -
docs/en/docs/how-to/custom-docs-ui-assets.md
{!../../../docs_src/custom_docs_ui/tutorial002.py!} ``` ### Include the custom docs for static files And the same way as with a custom CDN, now you can create the *path operations* for the custom docs. Again, you can re-use FastAPI's internal functions to create the HTML pages for the docs, and pass them the needed arguments:
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Mon Oct 30 09:58:58 GMT 2023 - 7.5K bytes - Viewed (0) -
docs/en/docs/tutorial/dependencies/classes-as-dependencies.md
```Python commons: CommonQueryParams = Depends() ``` You declare the dependency as the type of the parameter, and you use `Depends()` without any parameter, instead of having to write the full class *again* inside of `Depends(CommonQueryParams)`. The same example would then look like: === "Python 3.10+" ```Python hl_lines="19" {!> ../../../docs_src/dependencies/tutorial004_an_py310.py!} ```
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 11.4K bytes - Viewed (0) -
docs_src/dependencies/tutorial008c.py
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 Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Feb 24 23:06:37 GMT 2024 - 660 bytes - Viewed (0) -
docs/en/docs/advanced/security/http-basic-auth.md
And then they can try again knowing that it's probably something more similar to `stanleyjobsox` than to `johndoe`. #### A "professional" attack
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Jan 11 14:33:05 GMT 2024 - 5.9K bytes - Viewed (0) -
docs/en/docs/async.md
So, during that time, the computer can go and do some other work, while "slow-file" π finishes. Then the computer / program π€ will come back every time it has a chance because it's waiting again, or whenever it π€ finished all the work it had at that point. And it π€ will see if any of the tasks it was waiting for have already finished, doing whatever it had to do.
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 23K bytes - Viewed (0) -
docs/en/docs/how-to/sql-databases-peewee.md
```Python hl_lines="18-20" {!../../../docs_src/sql_databases_peewee/sql_app/main.py!} ``` For the **next request**, as we will reset that context variable again in the `async` dependency `reset_db_state()` and then create a new connection in the `get_db()` dependency, that new request will have its own database state (connection, transactions, etc). !!! tip
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Jan 16 13:23:25 GMT 2024 - 23.6K bytes - Viewed (0) -
docs/em/docs/tutorial/dependencies/sub-dependencies.md
π₯ 1οΈβ£ π π π£ π π° π *β‘ π οΈ*, πΌ, π π βοΈ β π§-π, **FastAPI** π π π€ π π§-π π΄ π π π¨. & β«οΈ π π π¨ π² <abbr title="A utility/system to store computed/generated values, to re-use them instead of computing them again.">"πΎ"</abbr> & πΆββοΈ β«οΈ π "βοΈ" π πͺ β«οΈ π π― π¨, β©οΈ π€ π π π° π π¨. π§ π πβ π π π πͺ π π€ π π (π² π π°) π π¨ β©οΈ βοΈ "πΎ" π², π πͺ β π’ `use_cache=False` πβ βοΈ `Depends`: ```Python hl_lines="1"
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Apr 01 09:26:04 GMT 2023 - 3.3K bytes - Viewed (0)