- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 52 for Regent (0.2 sec)
-
docs/en/docs/advanced/events.md
### `startup` event To add a function that should be run before the application starts, declare it with the event `"startup"`: ```Python hl_lines="8" {!../../../docs_src/events/tutorial001.py!} ``` In this case, the `startup` event handler function will initialize the items "database" (just a `dict`) with some values. You can add more than one event handler function.
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 7.8K bytes - Viewed (0) -
docs_src/websockets/tutorial002_py310.py
var content = document.createTextNode(event.data) message.appendChild(content) messages.appendChild(message) }; event.preventDefault() } function sendMessage(event) { var input = document.getElementById("messageText") ws.send(input.value)
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 2.7K bytes - Viewed (0) -
tests/test_tutorial/test_header_params/test_tutorial001_an.py
@pytest.mark.parametrize( "path,headers,expected_status,expected_response", [ ("/items", None, 200, {"User-Agent": "testclient"}), ("/items", {"X-Header": "notvalid"}, 200, {"User-Agent": "testclient"}), ("/items", {"User-Agent": "FastAPI test"}, 200, {"User-Agent": "FastAPI test"}), ], ) def test(path, headers, expected_status, expected_response): response = client.get(path, headers=headers)
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 3.8K bytes - Viewed (0) -
docs_src/header_params/tutorial001_an_py310.py
from typing import Annotated from fastapi import FastAPI, Header app = FastAPI() @app.get("/items/") async def read_items(user_agent: Annotated[str | None, Header()] = None):
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 217 bytes - Viewed (0) -
docs_src/header_params/tutorial001_an_py39.py
from typing import Annotated, Union from fastapi import FastAPI, Header app = FastAPI() @app.get("/items/") async def read_items(user_agent: Annotated[Union[str, None], Header()] = None):
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 230 bytes - Viewed (0) -
.github/workflows/notify-translations.yml
run: echo "$GITHUB_CONTEXT" - uses: actions/checkout@v4 # Allow debugging with tmate - name: Setup tmate session uses: mxschmitt/action-tmate@v3 if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }} with: limit-access-to-actor: true - uses: ./.github/actions/notify-translations with:
Others - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Oct 17 07:19:41 GMT 2023 - 1022 bytes - Viewed (0) -
docs/pt/docs/tutorial/header-params.md
Portanto, você pode usar `user_agent` como faria normalmente no código Python, em vez de precisar colocar as primeiras letras em maiúsculas como `User_Agent` ou algo semelhante. Se por algum motivo você precisar desabilitar a conversão automática de sublinhados para hífens, defina o parâmetro `convert_underscores` de `Header` para `False`:
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Oct 17 05:59:11 GMT 2023 - 3.9K bytes - Viewed (0) -
docs/en/docs/tutorial/header-params.md
But a variable like `user-agent` is invalid in Python. So, by default, `Header` will convert the parameter names characters from underscore (`_`) to hyphen (`-`) to extract and document the headers. Also, HTTP headers are case-insensitive, so, you can declare them with standard Python style (also known as "snake_case").
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Oct 17 05:59:11 GMT 2023 - 5.8K bytes - Viewed (0) -
docs/he/docs/index.md
</p> <p align="center"> <a href="https://github.com/tiangolo/fastapi/actions?query=workflow%3ATest+event%3Apush+branch%3Amaster" target="_blank"> <img src="https://github.com/tiangolo/fastapi/workflows/Test/badge.svg?event=push&branch=master" alt="Test"> </a> <a href="https://codecov.io/gh/tiangolo/fastapi" target="_blank">
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 23:58:47 GMT 2024 - 21.2K bytes - Viewed (0) -
docs/de/docs/index.md
</p> <p align="center"> <a href="https://github.com/tiangolo/fastapi/actions?query=workflow%3ATest+event%3Apush+branch%3Amaster" target="_blank"> <img src="https://github.com/tiangolo/fastapi/workflows/Test/badge.svg?event=push&branch=master" alt="Test"> </a> <a href="https://coverage-badge.samuelcolvin.workers.dev/redirect/tiangolo/fastapi" target="_blank">
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Mar 30 20:28:17 GMT 2024 - 21.2K bytes - Viewed (0)