- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 118 for function (0.32 sec)
-
docs/en/docs/how-to/extending-openapi.md
By default, what the method `.openapi()` does is check the property `.openapi_schema` to see if it has contents and return them. If it doesn't, it generates them using the utility function at `fastapi.openapi.utils.get_openapi`. And that function `get_openapi()` receives as parameters: * `title`: The OpenAPI title, shown in the docs. * `version`: The version of your API, e.g. `2.5.0`.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Aug 19 19:54:04 GMT 2023 - 3.2K bytes - Viewed (0) -
docs/en/docs/advanced/async-tests.md
## Other Asynchronous Function Calls As the testing function is now asynchronous, you can now also call (and `await`) other `async` functions apart from sending requests to your FastAPI application in your tests, exactly as you would call them anywhere else in your code. !!! tip
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Jan 13 12:07:15 GMT 2024 - 3.9K bytes - Viewed (0) -
docs/en/docs/tutorial/background-tasks.md
```Python hl_lines="14" {!../../../docs_src/background_tasks/tutorial001.py!} ``` `.add_task()` receives as arguments: * A task function to be run in the background (`write_notification`). * Any sequence of arguments that should be passed to the task function in order (`email`).
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Oct 17 05:59:11 GMT 2023 - 5.6K bytes - Viewed (0) -
docs/en/docs/tutorial/path-operation-configuration.md
``` ## Description from docstring As descriptions tend to be long and cover multiple lines, you can declare the *path operation* description in the function <abbr title="a multi-line string as the first expression inside a function (not assigned to any variable) used for documentation">docstring</abbr> and **FastAPI** will read it from there.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Oct 17 05:59:11 GMT 2023 - 5.5K bytes - Viewed (0) -
docs/en/docs/advanced/testing-dependencies.md
For these cases, your **FastAPI** application has an attribute `app.dependency_overrides`, it is a simple `dict`. To override a dependency for testing, you put as a key the original dependency (a function), and as the value, your dependency override (another function). And then **FastAPI** will call that override instead of the original dependency. === "Python 3.10+" ```Python hl_lines="26-27 30"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Oct 17 05:59:11 GMT 2023 - 2.9K bytes - Viewed (0) -
docs_src/generate_clients/tutorial003.py
from fastapi.routing import APIRoute from pydantic import BaseModel def custom_generate_unique_id(route: APIRoute): return f"{route.tags[0]}-{route.name}" app = FastAPI(generate_unique_id_function=custom_generate_unique_id) class Item(BaseModel): name: str price: float class ResponseMessage(BaseModel): message: str class User(BaseModel): username: str
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 04 22:02:18 GMT 2022 - 939 bytes - Viewed (0) -
docs_src/websockets/tutorial002_py310.py
</ul> <script> var ws = null; function connect(event) { var itemId = document.getElementById("itemId") var token = document.getElementById("token") ws = new WebSocket("ws://localhost:8000/items/" + itemId.value + "/ws?token=" + token.value); ws.onmessage = function(event) { var messages = document.getElementById('messages')
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 2.7K bytes - Viewed (0) -
fastapi/background.py
Doc( """ The function to call after the response is sent. It can be a regular `def` function or an `async def` function. """ ), ], *args: P.args, **kwargs: P.kwargs, ) -> None: """ Add a function to be called in the background after the response is sent.
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Apr 02 02:48:51 GMT 2024 - 1.7K bytes - Viewed (0) -
docs/en/docs/js/termynal.js
line.textContent = `${chars.slice(0, i)} ${percent}%`; if (percent>progressPercent) { break; } } } /** * Helper function for animation delays, called with `await`. * @param {number} time - Timeout, in ms. */ _wait(time) { return new Promise(resolve => setTimeout(resolve, time)); } /**
JavaScript - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu May 12 00:06:16 GMT 2022 - 9.3K bytes - Viewed (0) -
docs/en/docs/tutorial/path-params-numeric-validations.md
!!! note "Technical Details" When you import `Query`, `Path` and others from `fastapi`, they are actually functions. That when called, return instances of classes of the same name. So, you import `Query`, which is a function. And when you call it, it returns an instance of a class also named `Query`. These functions are there (instead of just using the classes directly) so that your editor doesn't mark errors about their types.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Jan 11 16:31:18 GMT 2024 - 9.1K bytes - Viewed (0)