- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 480 for if (0.12 sec)
-
docs_src/app_testing/app_b/main.py
if x_token != fake_secret_token: raise HTTPException(status_code=400, detail="Invalid X-Token header") if item_id not in fake_db: raise HTTPException(status_code=404, detail="Item not found") return fake_db[item_id] @app.post("/items/", response_model=Item) async def create_item(item: Item, x_token: str = Header()): if x_token != fake_secret_token:
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Jan 09 14:44:08 GMT 2024 - 1.1K bytes - Viewed (0) -
docs/en/docs/tutorial/security/get-current-user.md
``` === "Python 3.10+ non-Annotated" !!! tip Prefer to use the `Annotated` version if possible. ```Python hl_lines="3 10-14" {!> ../../../docs_src/security/tutorial002_py310.py!} ``` === "Python 3.8+ non-Annotated" !!! tip Prefer to use the `Annotated` version if possible. ```Python hl_lines="5 12-16" {!> ../../../docs_src/security/tutorial002.py!} ```
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Jan 11 16:31:18 GMT 2024 - 7.6K bytes - Viewed (0) -
docs/en/docs/how-to/index.md
Most of these ideas would be more or less **independent**, and in most cases you should only need to study them if they apply directly to **your project**. If something seems interesting and useful to your project, go ahead and check it, but otherwise, you might probably just skip them. !!! tip
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Aug 19 19:54:04 GMT 2023 - 591 bytes - Viewed (0) -
.github/workflows/test.yml
- name: Install Dependencies if: steps.cache.outputs.cache-hit != 'true' run: pip install -r requirements-tests.txt - name: Install Pydantic v1 if: matrix.pydantic-version == 'pydantic-v1' run: pip install "pydantic>=1.10.0,<2.0.0" - name: Install Pydantic v2 if: matrix.pydantic-version == 'pydantic-v2' run: pip install "pydantic>=2.0.2,<3.0.0"
Others - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 4.4K bytes - Viewed (1) -
docs/en/docs/tutorial/response-model.md
!!! tip If you have strict type checks in your editor, mypy, etc, you can declare the function return type as `Any`. That way you tell the editor that you are intentionally returning anything. But FastAPI will still do the data documentation, validation, filtering, etc. with the `response_model`. ### `response_model` Priority
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) -
docs/en/docs/contributing.md
</div> It will install all the dependencies and your local FastAPI in your local environment. ### Using your local FastAPI If you create a Python file that imports and uses FastAPI, and run it with the Python from your local environment, it will use your cloned local FastAPI source code. And if you update that local FastAPI source code when you run that Python file again, it will use the fresh version of FastAPI you just edited.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Jan 11 17:42:43 GMT 2024 - 14.1K bytes - Viewed (0) -
docs/en/docs/advanced/behind-a-proxy.md
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu May 02 22:37:31 GMT 2024 - 11.6K bytes - Viewed (2) -
docs/en/docs/how-to/graphql.md
## GraphQL with Strawberry If you need or want to work with **GraphQL**, <a href="https://strawberry.rocks/" class="external-link" target="_blank">**Strawberry**</a> is the **recommended** library as it has the design closest to **FastAPI's** design, it's all based on **type annotations**. Depending on your use case, you might prefer to use a different library, but if you asked me, I would probably suggest you try **Strawberry**.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Aug 19 19:54:04 GMT 2023 - 3.4K bytes - Viewed (0) -
docs/es/docs/tutorial/cookie-params.md
``` === "Python 3.10+ non-Annotated" !!! tip Prefer to use the `Annotated` version if possible. ```Python hl_lines="1" {!> ../../../docs_src/cookie_params/tutorial001_py310.py!} ``` === "Python 3.8+ non-Annotated" !!! tip Prefer to use the `Annotated` version if possible. ```Python hl_lines="3" {!> ../../../docs_src/cookie_params/tutorial001.py!} ```
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Apr 19 19:30:26 GMT 2024 - 2.4K bytes - Viewed (0) -
docs_src/bigger_applications/app_an_py39/dependencies.py
from typing import Annotated from fastapi import Header, HTTPException async def get_token_header(x_token: Annotated[str, Header()]): if x_token != "fake-super-secret-token": raise HTTPException(status_code=400, detail="X-Token header invalid") async def get_query_token(token: str): if token != "jessica":
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 409 bytes - Viewed (0)