- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 19 for Look (0.17 sec)
-
docs_src/custom_response/tutorial004.py
app = FastAPI() def generate_html_response(): html_content = """ <html> <head> <title>Some HTML in here</title> </head> <body> <h1>Look ma! HTML!</h1> </body> </html> """ return HTMLResponse(content=html_content, status_code=200) @app.get("/items/", response_class=HTMLResponse) async def read_items():
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 491 bytes - Viewed (0) -
docs/en/docs/advanced/openapi-callbacks.md
This code won't be executed in your app, we only need it to *document* how that *external API* should look like. But, you already know how to easily create automatic documentation for an API with **FastAPI**. So we are going to use that same knowledge to document how the *external API* should look like... by creating the *path operation(s)* that the external API should implement (the ones your API will call). !!! tip
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu May 02 22:37:31 GMT 2024 - 7.7K bytes - Viewed (0) -
docs/en/docs/tutorial/testing.md
!!! tip If you want to call `async` functions in your tests apart from sending requests to your FastAPI application (e.g. asynchronous database functions), have a look at the [Async Tests](../advanced/async-tests.md){.internal-link target=_blank} in the advanced tutorial. ## Separating tests In a real application, you probably would have your tests in a different file.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 6.2K bytes - Viewed (0) -
docs_src/custom_response/tutorial002.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 352 bytes - Viewed (0) -
tests/test_tutorial/test_custom_response/test_tutorial004.py
client = TestClient(app) html_contents = """ <html> <head> <title>Some HTML in here</title> </head> <body> <h1>Look ma! HTML!</h1> </body> </html> """ def test_get_custom_response(): response = client.get("/items/") assert response.status_code == 200, response.text
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 1.2K bytes - Viewed (0) -
docs/en/docs/tutorial/metadata.md
{!../../../docs_src/metadata/tutorial001.py!} ``` !!! tip You can write Markdown in the `description` field and it will be rendered in the output. With this configuration, the automatic API docs would look like: <img src="/img/tutorial/metadata/image01.png"> ## License identifier Since OpenAPI 3.1.0 and FastAPI 0.99.0, you can also set the `license_info` with an `identifier` instead of a `url`. For example:
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sun Mar 31 23:52:53 GMT 2024 - 5.8K bytes - Viewed (0) -
docs_src/custom_response/tutorial003.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 394 bytes - Viewed (0) -
docs/en/docs/advanced/async-tests.md
Let's look at how we can make that work. ## pytest.mark.anyio
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/security/first-steps.md
All the security utilities that integrate with OpenAPI (and the automatic API docs) inherit from `SecurityBase`, that's how **FastAPI** can know how to integrate them in OpenAPI. ## What it does It will go and look in the request for that `Authorization` header, check if the value is `Bearer ` plus some token, and will return the token as a `str`.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Wed Mar 13 19:02:19 GMT 2024 - 8.9K bytes - Viewed (0) -
docs/en/docs/tutorial/debugging.md
* Select "Python" * Run the debugger with the option "`Python: Current File (Integrated Terminal)`". It will then start the server with your **FastAPI** code, stop at your breakpoints, etc. Here's how it might look: <img src="/img/tutorial/debugging/image01.png"> --- If you use Pycharm, you can: * Open the "Run" menu. * Select the option "Debug...". * Then a context menu shows up.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Jun 22 17:04:16 GMT 2023 - 2.4K bytes - Viewed (0)